You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Rick Hillegas (JIRA)" <de...@db.apache.org> on 2006/09/19 23:00:23 UTC

[jira] Created: (DERBY-1868) Merge argument descriptors into SQLState strings so that SQLState documentation can be generated by a program

Merge argument descriptors into SQLState strings so that SQLState documentation can be generated by a program
-------------------------------------------------------------------------------------------------------------

                 Key: DERBY-1868
                 URL: http://issues.apache.org/jira/browse/DERBY-1868
             Project: Derby
          Issue Type: Improvement
          Components: Build tools
    Affects Versions: 10.2.1.0
            Reporter: Rick Hillegas
             Fix For: 10.2.2.0


See DERBY-1566. That JIRA introduced a program, written by David, which generates human-readable tables of message strings for inclusion in the Reference Guide. The tool doesn't patch in friendly arguments. That leaves the message strings peppered with unfriendly placeholders like {0}. {1}, etc.. Laura painstakingly editted the tables, by hand substituting in friendlier arguments like <userName> and <tableName>.

We need to move Laura's substitutions into the source code so that David's program can automatically plug them in. This will save us a lot of grief when we generate future releases. Dan and Andrew have proposed approaches to this problem. Those approaches are discussed in DERBY-1566. Here is Andrew's comment on Dan's proposal:

"While Dan's suggestion here:

http://mail-archives.apache.org/mod_mbox/db-derby-dev/200608.mbox/%3c44F62247.2080500@apache.org%3e

to generate the message file and doc from a single XML file would be ideal, a simpler approach to implement would be to maintain the meanings of the markers in another properties file, identified by message key and marker number. So, e.g. the new properties file would contain:

01500.0=<constraintName>
01500.1=<tableName>

Then ErrorMessageGenerator could look up the value of the markers by SQLState and MessageFormat marker number in the properties file, although this approach would require maintaining two files instead of one."

I glossed this further: "If we adopt Andrew's approach, I would recommend co-locating the argument descriptiors in the same properties file which contains the messages. This will help keep the argument descriptors from drifting out of sync with the messages themselves--that is a substantial advantage of Dan's approach."



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DERBY-1868) Merge argument descriptors into SQLState strings so that SQLState documentation can be generated by a program

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1868?page=all ]

Knut Anders Hatlen updated DERBY-1868:
--------------------------------------

    Attachment: antlib.diff

I'm not able to build Derby after these changes, probably because my ant installation doesn't have ant.jar under "${ant.home}/lib/ant.jar". The attached patch, which changes the classpath entry to "${ant.library.dir}/ant.jar", makes it possible to build Derby in my environment. Rick, could you test whether ${ant.library.dir} works in your environment? Thanks.

> Merge argument descriptors into SQLState strings so that SQLState documentation can be generated by a program
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-1868
>                 URL: http://issues.apache.org/jira/browse/DERBY-1868
>             Project: Derby
>          Issue Type: Improvement
>          Components: Build tools
>    Affects Versions: 10.2.1.6
>            Reporter: Rick Hillegas
>         Assigned To: Rick Hillegas
>             Fix For: 10.2.2.0
>
>         Attachments: antlib.diff, derby-1868-lineEndings-v01.diff, derby-1868-merged-v01.diff, derby-1868-merged-v02.diff, messages.dtd, messages.xml
>
>
> See DERBY-1566. That JIRA introduced a program, written by David, which generates human-readable tables of message strings for inclusion in the Reference Guide. The tool doesn't patch in friendly arguments. That leaves the message strings peppered with unfriendly placeholders like {0}. {1}, etc.. Laura painstakingly editted the tables, by hand substituting in friendlier arguments like <userName> and <tableName>.
> We need to move Laura's substitutions into the source code so that David's program can automatically plug them in. This will save us a lot of grief when we generate future releases. Dan and Andrew have proposed approaches to this problem. Those approaches are discussed in DERBY-1566. Here is Andrew's comment on Dan's proposal:
> "While Dan's suggestion here:
> http://mail-archives.apache.org/mod_mbox/db-derby-dev/200608.mbox/%3c44F62247.2080500@apache.org%3e
> to generate the message file and doc from a single XML file would be ideal, a simpler approach to implement would be to maintain the meanings of the markers in another properties file, identified by message key and marker number. So, e.g. the new properties file would contain:
> 01500.0=<constraintName>
> 01500.1=<tableName>
> Then ErrorMessageGenerator could look up the value of the markers by SQLState and MessageFormat marker number in the properties file, although this approach would require maintaining two files instead of one."
> I glossed this further: "If we adopt Andrew's approach, I would recommend co-locating the argument descriptiors in the same properties file which contains the messages. This will help keep the argument descriptors from drifting out of sync with the messages themselves--that is a substantial advantage of Dan's approach."

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (DERBY-1868) Merge argument descriptors into SQLState strings so that SQLState documentation can be generated by a program

Posted by "Rick Hillegas (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1868?page=comments#action_12445627 ] 
            
Rick Hillegas commented on DERBY-1868:
--------------------------------------

Where should various files live? Does the following sound agreeable?

1) The xml message source and its dtd grammar can live next to the generated messages_en.properties in java/engine/org/apache/derby/loc.

2) The generated dita file (the dita input for the SQLState page in the Reference Guide) can go in a new generated directory: classes/doc.

3) We can add a build tool to java/build/org/apache/derbyBuild. This tool will generate the engine's messages_en.properties and the dita file.


> Merge argument descriptors into SQLState strings so that SQLState documentation can be generated by a program
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-1868
>                 URL: http://issues.apache.org/jira/browse/DERBY-1868
>             Project: Derby
>          Issue Type: Improvement
>          Components: Build tools
>    Affects Versions: 10.2.1.6
>            Reporter: Rick Hillegas
>         Assigned To: Rick Hillegas
>             Fix For: 10.2.2.0
>
>         Attachments: derby-1868-lineEndings-v01.diff, messages.dtd, messages.xml
>
>
> See DERBY-1566. That JIRA introduced a program, written by David, which generates human-readable tables of message strings for inclusion in the Reference Guide. The tool doesn't patch in friendly arguments. That leaves the message strings peppered with unfriendly placeholders like {0}. {1}, etc.. Laura painstakingly editted the tables, by hand substituting in friendlier arguments like <userName> and <tableName>.
> We need to move Laura's substitutions into the source code so that David's program can automatically plug them in. This will save us a lot of grief when we generate future releases. Dan and Andrew have proposed approaches to this problem. Those approaches are discussed in DERBY-1566. Here is Andrew's comment on Dan's proposal:
> "While Dan's suggestion here:
> http://mail-archives.apache.org/mod_mbox/db-derby-dev/200608.mbox/%3c44F62247.2080500@apache.org%3e
> to generate the message file and doc from a single XML file would be ideal, a simpler approach to implement would be to maintain the meanings of the markers in another properties file, identified by message key and marker number. So, e.g. the new properties file would contain:
> 01500.0=<constraintName>
> 01500.1=<tableName>
> Then ErrorMessageGenerator could look up the value of the markers by SQLState and MessageFormat marker number in the properties file, although this approach would require maintaining two files instead of one."
> I glossed this further: "If we adopt Andrew's approach, I would recommend co-locating the argument descriptiors in the same properties file which contains the messages. This will help keep the argument descriptors from drifting out of sync with the messages themselves--that is a substantial advantage of Dan's approach."

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DERBY-1868) Merge argument descriptors into SQLState strings so that SQLState documentation can be generated by a program

Posted by "Rick Hillegas (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1868?page=all ]

Rick Hillegas updated DERBY-1868:
---------------------------------

    Attachment: messages.xml
                messages.dtd

I have attached a first cut at an xml descriptor file and its grammer. This can be used to generate both the engine's messages_en.properties and the SQLState tables in the Reference Guide. I would appreciate the community's advice on how to improve this source file.

In particular, there are two axes on which I considered laying out this data. One has to be the primary and the other the secondary axis:

1) According to whether the messages are documented in the SQLState section of the Reference Guide.

2) According to whether the message handles are defined in SQLState.java or MessageId.java.

I opted for (1) as the primary axis and (2) as the secondary axis. This makes it easy to tell at a glance whether a message is documented. However, it involves mixing handles from SQLState.java and MessageId.java in the same section of the source code.

Your opinions are appreciated. This is an opportunity to improve how we manage our internationalized engine messages.

> Merge argument descriptors into SQLState strings so that SQLState documentation can be generated by a program
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-1868
>                 URL: http://issues.apache.org/jira/browse/DERBY-1868
>             Project: Derby
>          Issue Type: Improvement
>          Components: Build tools
>    Affects Versions: 10.2.1.6
>            Reporter: Rick Hillegas
>         Assigned To: Rick Hillegas
>             Fix For: 10.2.2.0
>
>         Attachments: derby-1868-lineEndings-v01.diff, messages.dtd, messages.xml
>
>
> See DERBY-1566. That JIRA introduced a program, written by David, which generates human-readable tables of message strings for inclusion in the Reference Guide. The tool doesn't patch in friendly arguments. That leaves the message strings peppered with unfriendly placeholders like {0}. {1}, etc.. Laura painstakingly editted the tables, by hand substituting in friendlier arguments like <userName> and <tableName>.
> We need to move Laura's substitutions into the source code so that David's program can automatically plug them in. This will save us a lot of grief when we generate future releases. Dan and Andrew have proposed approaches to this problem. Those approaches are discussed in DERBY-1566. Here is Andrew's comment on Dan's proposal:
> "While Dan's suggestion here:
> http://mail-archives.apache.org/mod_mbox/db-derby-dev/200608.mbox/%3c44F62247.2080500@apache.org%3e
> to generate the message file and doc from a single XML file would be ideal, a simpler approach to implement would be to maintain the meanings of the markers in another properties file, identified by message key and marker number. So, e.g. the new properties file would contain:
> 01500.0=<constraintName>
> 01500.1=<tableName>
> Then ErrorMessageGenerator could look up the value of the markers by SQLState and MessageFormat marker number in the properties file, although this approach would require maintaining two files instead of one."
> I glossed this further: "If we adopt Andrew's approach, I would recommend co-locating the argument descriptiors in the same properties file which contains the messages. This will help keep the argument descriptors from drifting out of sync with the messages themselves--that is a substantial advantage of Dan's approach."

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Resolved: (DERBY-1868) Merge argument descriptors into SQLState strings so that SQLState documentation can be generated by a program

Posted by "Rick Hillegas (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1868?page=all ]

Rick Hillegas resolved DERBY-1868.
----------------------------------

    Resolution: Fixed

There are plenty of improvments which people can make, but this task itself is done, so I'm resolving and closing this issue.

> Merge argument descriptors into SQLState strings so that SQLState documentation can be generated by a program
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-1868
>                 URL: http://issues.apache.org/jira/browse/DERBY-1868
>             Project: Derby
>          Issue Type: Improvement
>          Components: Build tools
>    Affects Versions: 10.2.1.6
>            Reporter: Rick Hillegas
>         Assigned To: Rick Hillegas
>             Fix For: 10.3.0.0
>
>         Attachments: antlib.diff, derby-1868-lineEndings-v01.diff, derby-1868-merged-v01.diff, derby-1868-merged-v02.diff, derby-1868-merged-v03.diff, messages.dtd, messages.xml
>
>
> See DERBY-1566. That JIRA introduced a program, written by David, which generates human-readable tables of message strings for inclusion in the Reference Guide. The tool doesn't patch in friendly arguments. That leaves the message strings peppered with unfriendly placeholders like {0}. {1}, etc.. Laura painstakingly editted the tables, by hand substituting in friendlier arguments like <userName> and <tableName>.
> We need to move Laura's substitutions into the source code so that David's program can automatically plug them in. This will save us a lot of grief when we generate future releases. Dan and Andrew have proposed approaches to this problem. Those approaches are discussed in DERBY-1566. Here is Andrew's comment on Dan's proposal:
> "While Dan's suggestion here:
> http://mail-archives.apache.org/mod_mbox/db-derby-dev/200608.mbox/%3c44F62247.2080500@apache.org%3e
> to generate the message file and doc from a single XML file would be ideal, a simpler approach to implement would be to maintain the meanings of the markers in another properties file, identified by message key and marker number. So, e.g. the new properties file would contain:
> 01500.0=<constraintName>
> 01500.1=<tableName>
> Then ErrorMessageGenerator could look up the value of the markers by SQLState and MessageFormat marker number in the properties file, although this approach would require maintaining two files instead of one."
> I glossed this further: "If we adopt Andrew's approach, I would recommend co-locating the argument descriptiors in the same properties file which contains the messages. This will help keep the argument descriptors from drifting out of sync with the messages themselves--that is a substantial advantage of Dan's approach."

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (DERBY-1868) Merge argument descriptors into SQLState strings so that SQLState documentation can be generated by a program

Posted by "David Van Couvering (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1868?page=comments#action_12446326 ] 
            
David Van Couvering commented on DERBY-1868:
--------------------------------------------

Hi, Rick, thanks for your work on this.  It's great that our poor doc people won't have to weed through new messages for each release.  

I do have some comments, perhaps to be fixed in subsequent revisions:

- In MessageBuilder.java PROPERTIES-BOILERPLATE and REF_GUIDE_NOTES - It seems odd to me that the generated files should have license headers.  I would think that the license header belongs in MessageBuilder.java and messages.xml, but not in the files it generates.

- In messages.xml, it would be good to tell a newbie how to add a new message - in particular, how they use and what happens with the <arg> element

- As it stands today, translators will have to translate two files: the messages_en.properties file and the documentation file that contains the messages.  Wouldn't it make more sense to translate the messages.xml file and the MessageBuilder should generate appropriate properties files and dita files for each language (although I don't know where translated documentation ends up). 

Thanks,

David

> Merge argument descriptors into SQLState strings so that SQLState documentation can be generated by a program
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-1868
>                 URL: http://issues.apache.org/jira/browse/DERBY-1868
>             Project: Derby
>          Issue Type: Improvement
>          Components: Build tools
>    Affects Versions: 10.2.1.6
>            Reporter: Rick Hillegas
>         Assigned To: Rick Hillegas
>             Fix For: 10.2.2.0
>
>         Attachments: derby-1868-lineEndings-v01.diff, derby-1868-merged-v01.diff, derby-1868-merged-v02.diff, messages.dtd, messages.xml
>
>
> See DERBY-1566. That JIRA introduced a program, written by David, which generates human-readable tables of message strings for inclusion in the Reference Guide. The tool doesn't patch in friendly arguments. That leaves the message strings peppered with unfriendly placeholders like {0}. {1}, etc.. Laura painstakingly editted the tables, by hand substituting in friendlier arguments like <userName> and <tableName>.
> We need to move Laura's substitutions into the source code so that David's program can automatically plug them in. This will save us a lot of grief when we generate future releases. Dan and Andrew have proposed approaches to this problem. Those approaches are discussed in DERBY-1566. Here is Andrew's comment on Dan's proposal:
> "While Dan's suggestion here:
> http://mail-archives.apache.org/mod_mbox/db-derby-dev/200608.mbox/%3c44F62247.2080500@apache.org%3e
> to generate the message file and doc from a single XML file would be ideal, a simpler approach to implement would be to maintain the meanings of the markers in another properties file, identified by message key and marker number. So, e.g. the new properties file would contain:
> 01500.0=<constraintName>
> 01500.1=<tableName>
> Then ErrorMessageGenerator could look up the value of the markers by SQLState and MessageFormat marker number in the properties file, although this approach would require maintaining two files instead of one."
> I glossed this further: "If we adopt Andrew's approach, I would recommend co-locating the argument descriptiors in the same properties file which contains the messages. This will help keep the argument descriptors from drifting out of sync with the messages themselves--that is a substantial advantage of Dan's approach."

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Assigned: (DERBY-1868) Merge argument descriptors into SQLState strings so that SQLState documentation can be generated by a program

Posted by "Rick Hillegas (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1868?page=all ]

Rick Hillegas reassigned DERBY-1868:
------------------------------------

    Assignee: Rick Hillegas

> Merge argument descriptors into SQLState strings so that SQLState documentation can be generated by a program
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-1868
>                 URL: http://issues.apache.org/jira/browse/DERBY-1868
>             Project: Derby
>          Issue Type: Improvement
>          Components: Build tools
>    Affects Versions: 10.2.1.6
>            Reporter: Rick Hillegas
>         Assigned To: Rick Hillegas
>             Fix For: 10.2.2.0
>
>         Attachments: derby-1868-lineEndings-v01.diff
>
>
> See DERBY-1566. That JIRA introduced a program, written by David, which generates human-readable tables of message strings for inclusion in the Reference Guide. The tool doesn't patch in friendly arguments. That leaves the message strings peppered with unfriendly placeholders like {0}. {1}, etc.. Laura painstakingly editted the tables, by hand substituting in friendlier arguments like <userName> and <tableName>.
> We need to move Laura's substitutions into the source code so that David's program can automatically plug them in. This will save us a lot of grief when we generate future releases. Dan and Andrew have proposed approaches to this problem. Those approaches are discussed in DERBY-1566. Here is Andrew's comment on Dan's proposal:
> "While Dan's suggestion here:
> http://mail-archives.apache.org/mod_mbox/db-derby-dev/200608.mbox/%3c44F62247.2080500@apache.org%3e
> to generate the message file and doc from a single XML file would be ideal, a simpler approach to implement would be to maintain the meanings of the markers in another properties file, identified by message key and marker number. So, e.g. the new properties file would contain:
> 01500.0=<constraintName>
> 01500.1=<tableName>
> Then ErrorMessageGenerator could look up the value of the markers by SQLState and MessageFormat marker number in the properties file, although this approach would require maintaining two files instead of one."
> I glossed this further: "If we adopt Andrew's approach, I would recommend co-locating the argument descriptiors in the same properties file which contains the messages. This will help keep the argument descriptors from drifting out of sync with the messages themselves--that is a substantial advantage of Dan's approach."

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DERBY-1868) Merge argument descriptors into SQLState strings so that SQLState documentation can be generated by a program

Posted by "Rick Hillegas (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1868?page=all ]

Rick Hillegas updated DERBY-1868:
---------------------------------

    Attachment: derby-1868-merged-v03.diff

Committed derby-1868-merged-v03.diff at subversion revision 470862. This adds to message.xml a sentence which directs message writers to the website for guidance on how to write messages.

> Merge argument descriptors into SQLState strings so that SQLState documentation can be generated by a program
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-1868
>                 URL: http://issues.apache.org/jira/browse/DERBY-1868
>             Project: Derby
>          Issue Type: Improvement
>          Components: Build tools
>    Affects Versions: 10.2.1.6
>            Reporter: Rick Hillegas
>         Assigned To: Rick Hillegas
>             Fix For: 10.2.2.0
>
>         Attachments: antlib.diff, derby-1868-lineEndings-v01.diff, derby-1868-merged-v01.diff, derby-1868-merged-v02.diff, derby-1868-merged-v03.diff, messages.dtd, messages.xml
>
>
> See DERBY-1566. That JIRA introduced a program, written by David, which generates human-readable tables of message strings for inclusion in the Reference Guide. The tool doesn't patch in friendly arguments. That leaves the message strings peppered with unfriendly placeholders like {0}. {1}, etc.. Laura painstakingly editted the tables, by hand substituting in friendlier arguments like <userName> and <tableName>.
> We need to move Laura's substitutions into the source code so that David's program can automatically plug them in. This will save us a lot of grief when we generate future releases. Dan and Andrew have proposed approaches to this problem. Those approaches are discussed in DERBY-1566. Here is Andrew's comment on Dan's proposal:
> "While Dan's suggestion here:
> http://mail-archives.apache.org/mod_mbox/db-derby-dev/200608.mbox/%3c44F62247.2080500@apache.org%3e
> to generate the message file and doc from a single XML file would be ideal, a simpler approach to implement would be to maintain the meanings of the markers in another properties file, identified by message key and marker number. So, e.g. the new properties file would contain:
> 01500.0=<constraintName>
> 01500.1=<tableName>
> Then ErrorMessageGenerator could look up the value of the markers by SQLState and MessageFormat marker number in the properties file, although this approach would require maintaining two files instead of one."
> I glossed this further: "If we adopt Andrew's approach, I would recommend co-locating the argument descriptiors in the same properties file which contains the messages. This will help keep the argument descriptors from drifting out of sync with the messages themselves--that is a substantial advantage of Dan's approach."

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DERBY-1868) Merge argument descriptors into SQLState strings so that SQLState documentation can be generated by a program

Posted by "Rick Hillegas (JIRA)" <de...@db.apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1868?page=all ]

Rick Hillegas updated DERBY-1868:
---------------------------------

    Attachment: derby-1868-lineEndings-v01.diff

When I run the generator on xp/cygwin, it generates a file with windows-style line endings (carriage-return + linefeed). This confuses subversion when I try to check the generated file into the docs source tree. Attaching derby-1868-lineEndings-v01.diff, which causes the program to emit UNIX-style line endings (linefeed) suitable for checkin.

> Merge argument descriptors into SQLState strings so that SQLState documentation can be generated by a program
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-1868
>                 URL: http://issues.apache.org/jira/browse/DERBY-1868
>             Project: Derby
>          Issue Type: Improvement
>          Components: Build tools
>    Affects Versions: 10.2.1.5
>            Reporter: Rick Hillegas
>             Fix For: 10.2.2.0
>
>         Attachments: derby-1868-lineEndings-v01.diff
>
>
> See DERBY-1566. That JIRA introduced a program, written by David, which generates human-readable tables of message strings for inclusion in the Reference Guide. The tool doesn't patch in friendly arguments. That leaves the message strings peppered with unfriendly placeholders like {0}. {1}, etc.. Laura painstakingly editted the tables, by hand substituting in friendlier arguments like <userName> and <tableName>.
> We need to move Laura's substitutions into the source code so that David's program can automatically plug them in. This will save us a lot of grief when we generate future releases. Dan and Andrew have proposed approaches to this problem. Those approaches are discussed in DERBY-1566. Here is Andrew's comment on Dan's proposal:
> "While Dan's suggestion here:
> http://mail-archives.apache.org/mod_mbox/db-derby-dev/200608.mbox/%3c44F62247.2080500@apache.org%3e
> to generate the message file and doc from a single XML file would be ideal, a simpler approach to implement would be to maintain the meanings of the markers in another properties file, identified by message key and marker number. So, e.g. the new properties file would contain:
> 01500.0=<constraintName>
> 01500.1=<tableName>
> Then ErrorMessageGenerator could look up the value of the markers by SQLState and MessageFormat marker number in the properties file, although this approach would require maintaining two files instead of one."
> I glossed this further: "If we adopt Andrew's approach, I would recommend co-locating the argument descriptiors in the same properties file which contains the messages. This will help keep the argument descriptors from drifting out of sync with the messages themselves--that is a substantial advantage of Dan's approach."

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (DERBY-1868) Merge argument descriptors into SQLState strings so that SQLState documentation can be generated by a program

Posted by "Rick Hillegas (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1868?page=comments#action_12446396 ] 
            
Rick Hillegas commented on DERBY-1868:
--------------------------------------

Thanks, Knut Anders. Your patch works for me. I committed it at subversion revision 470128.

> Merge argument descriptors into SQLState strings so that SQLState documentation can be generated by a program
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-1868
>                 URL: http://issues.apache.org/jira/browse/DERBY-1868
>             Project: Derby
>          Issue Type: Improvement
>          Components: Build tools
>    Affects Versions: 10.2.1.6
>            Reporter: Rick Hillegas
>         Assigned To: Rick Hillegas
>             Fix For: 10.2.2.0
>
>         Attachments: antlib.diff, derby-1868-lineEndings-v01.diff, derby-1868-merged-v01.diff, derby-1868-merged-v02.diff, messages.dtd, messages.xml
>
>
> See DERBY-1566. That JIRA introduced a program, written by David, which generates human-readable tables of message strings for inclusion in the Reference Guide. The tool doesn't patch in friendly arguments. That leaves the message strings peppered with unfriendly placeholders like {0}. {1}, etc.. Laura painstakingly editted the tables, by hand substituting in friendlier arguments like <userName> and <tableName>.
> We need to move Laura's substitutions into the source code so that David's program can automatically plug them in. This will save us a lot of grief when we generate future releases. Dan and Andrew have proposed approaches to this problem. Those approaches are discussed in DERBY-1566. Here is Andrew's comment on Dan's proposal:
> "While Dan's suggestion here:
> http://mail-archives.apache.org/mod_mbox/db-derby-dev/200608.mbox/%3c44F62247.2080500@apache.org%3e
> to generate the message file and doc from a single XML file would be ideal, a simpler approach to implement would be to maintain the meanings of the markers in another properties file, identified by message key and marker number. So, e.g. the new properties file would contain:
> 01500.0=<constraintName>
> 01500.1=<tableName>
> Then ErrorMessageGenerator could look up the value of the markers by SQLState and MessageFormat marker number in the properties file, although this approach would require maintaining two files instead of one."
> I glossed this further: "If we adopt Andrew's approach, I would recommend co-locating the argument descriptiors in the same properties file which contains the messages. This will help keep the argument descriptors from drifting out of sync with the messages themselves--that is a substantial advantage of Dan's approach."

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (DERBY-1868) Merge argument descriptors into SQLState strings so that SQLState documentation can be generated by a program

Posted by "Rick Hillegas (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1868?page=comments#action_12446300 ] 
            
Rick Hillegas commented on DERBY-1868:
--------------------------------------

Committed derby-1868-merged-v01.diff at subversion revision 469975.

> Merge argument descriptors into SQLState strings so that SQLState documentation can be generated by a program
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-1868
>                 URL: http://issues.apache.org/jira/browse/DERBY-1868
>             Project: Derby
>          Issue Type: Improvement
>          Components: Build tools
>    Affects Versions: 10.2.1.6
>            Reporter: Rick Hillegas
>         Assigned To: Rick Hillegas
>             Fix For: 10.2.2.0
>
>         Attachments: derby-1868-lineEndings-v01.diff, derby-1868-merged-v01.diff, messages.dtd, messages.xml
>
>
> See DERBY-1566. That JIRA introduced a program, written by David, which generates human-readable tables of message strings for inclusion in the Reference Guide. The tool doesn't patch in friendly arguments. That leaves the message strings peppered with unfriendly placeholders like {0}. {1}, etc.. Laura painstakingly editted the tables, by hand substituting in friendlier arguments like <userName> and <tableName>.
> We need to move Laura's substitutions into the source code so that David's program can automatically plug them in. This will save us a lot of grief when we generate future releases. Dan and Andrew have proposed approaches to this problem. Those approaches are discussed in DERBY-1566. Here is Andrew's comment on Dan's proposal:
> "While Dan's suggestion here:
> http://mail-archives.apache.org/mod_mbox/db-derby-dev/200608.mbox/%3c44F62247.2080500@apache.org%3e
> to generate the message file and doc from a single XML file would be ideal, a simpler approach to implement would be to maintain the meanings of the markers in another properties file, identified by message key and marker number. So, e.g. the new properties file would contain:
> 01500.0=<constraintName>
> 01500.1=<tableName>
> Then ErrorMessageGenerator could look up the value of the markers by SQLState and MessageFormat marker number in the properties file, although this approach would require maintaining two files instead of one."
> I glossed this further: "If we adopt Andrew's approach, I would recommend co-locating the argument descriptiors in the same properties file which contains the messages. This will help keep the argument descriptors from drifting out of sync with the messages themselves--that is a substantial advantage of Dan's approach."

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (DERBY-1868) Merge argument descriptors into SQLState strings so that SQLState documentation can be generated by a program

Posted by "Rick Hillegas (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1868?page=all ]

Rick Hillegas closed DERBY-1868.
--------------------------------


> Merge argument descriptors into SQLState strings so that SQLState documentation can be generated by a program
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-1868
>                 URL: http://issues.apache.org/jira/browse/DERBY-1868
>             Project: Derby
>          Issue Type: Improvement
>          Components: Build tools
>    Affects Versions: 10.2.1.6
>            Reporter: Rick Hillegas
>         Assigned To: Rick Hillegas
>             Fix For: 10.3.0.0
>
>         Attachments: antlib.diff, derby-1868-lineEndings-v01.diff, derby-1868-merged-v01.diff, derby-1868-merged-v02.diff, derby-1868-merged-v03.diff, messages.dtd, messages.xml
>
>
> See DERBY-1566. That JIRA introduced a program, written by David, which generates human-readable tables of message strings for inclusion in the Reference Guide. The tool doesn't patch in friendly arguments. That leaves the message strings peppered with unfriendly placeholders like {0}. {1}, etc.. Laura painstakingly editted the tables, by hand substituting in friendlier arguments like <userName> and <tableName>.
> We need to move Laura's substitutions into the source code so that David's program can automatically plug them in. This will save us a lot of grief when we generate future releases. Dan and Andrew have proposed approaches to this problem. Those approaches are discussed in DERBY-1566. Here is Andrew's comment on Dan's proposal:
> "While Dan's suggestion here:
> http://mail-archives.apache.org/mod_mbox/db-derby-dev/200608.mbox/%3c44F62247.2080500@apache.org%3e
> to generate the message file and doc from a single XML file would be ideal, a simpler approach to implement would be to maintain the meanings of the markers in another properties file, identified by message key and marker number. So, e.g. the new properties file would contain:
> 01500.0=<constraintName>
> 01500.1=<tableName>
> Then ErrorMessageGenerator could look up the value of the markers by SQLState and MessageFormat marker number in the properties file, although this approach would require maintaining two files instead of one."
> I glossed this further: "If we adopt Andrew's approach, I would recommend co-locating the argument descriptiors in the same properties file which contains the messages. This will help keep the argument descriptors from drifting out of sync with the messages themselves--that is a substantial advantage of Dan's approach."

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (DERBY-1868) Merge argument descriptors into SQLState strings so that SQLState documentation can be generated by a program

Posted by "Rick Hillegas (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1868?page=comments#action_12446401 ] 
            
Rick Hillegas commented on DERBY-1868:
--------------------------------------

Hi David,

Thanks for reviewing this patch. Some responses follow:

1) License headers appeared in the previous, non-generated versions of messages_en.properties and rrefexcept71493.dita. I erred on the side of caution and included license headers in the generated versions. License headers might still make sense for the following reasons:

- messages_en.properties is shipped with the product

- rrefexcept71493, although generated, is still independently checked into the source repository

Although they are generated, I could see them being construed as "creative" works deserving the license header. I always get muddled around these legal issues and am inclined to err on the side of caution. Do you think there is some harm done by doing this?

2) I like your suggestion about having translators translate messages.xml and have MessageBuilder generate locale-specific versions of rrefexcept71493.dita. So, instead of one messages.xml, we could have messages.xml.en, messages.xml.ja_JP, etc. It would be helpful to move the boilerplate out of MessageBuilder into messages.xml.*. Note that today's shift to xml-based descriptors has not increased the translator's burden Yesterday, translators still had to tranlate both of the files you mentioned. Your suggestion is a great one--but it's someone else's follow-on itch!

> Merge argument descriptors into SQLState strings so that SQLState documentation can be generated by a program
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-1868
>                 URL: http://issues.apache.org/jira/browse/DERBY-1868
>             Project: Derby
>          Issue Type: Improvement
>          Components: Build tools
>    Affects Versions: 10.2.1.6
>            Reporter: Rick Hillegas
>         Assigned To: Rick Hillegas
>             Fix For: 10.2.2.0
>
>         Attachments: antlib.diff, derby-1868-lineEndings-v01.diff, derby-1868-merged-v01.diff, derby-1868-merged-v02.diff, messages.dtd, messages.xml
>
>
> See DERBY-1566. That JIRA introduced a program, written by David, which generates human-readable tables of message strings for inclusion in the Reference Guide. The tool doesn't patch in friendly arguments. That leaves the message strings peppered with unfriendly placeholders like {0}. {1}, etc.. Laura painstakingly editted the tables, by hand substituting in friendlier arguments like <userName> and <tableName>.
> We need to move Laura's substitutions into the source code so that David's program can automatically plug them in. This will save us a lot of grief when we generate future releases. Dan and Andrew have proposed approaches to this problem. Those approaches are discussed in DERBY-1566. Here is Andrew's comment on Dan's proposal:
> "While Dan's suggestion here:
> http://mail-archives.apache.org/mod_mbox/db-derby-dev/200608.mbox/%3c44F62247.2080500@apache.org%3e
> to generate the message file and doc from a single XML file would be ideal, a simpler approach to implement would be to maintain the meanings of the markers in another properties file, identified by message key and marker number. So, e.g. the new properties file would contain:
> 01500.0=<constraintName>
> 01500.1=<tableName>
> Then ErrorMessageGenerator could look up the value of the markers by SQLState and MessageFormat marker number in the properties file, although this approach would require maintaining two files instead of one."
> I glossed this further: "If we adopt Andrew's approach, I would recommend co-locating the argument descriptiors in the same properties file which contains the messages. This will help keep the argument descriptors from drifting out of sync with the messages themselves--that is a substantial advantage of Dan's approach."

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DERBY-1868) Merge argument descriptors into SQLState strings so that SQLState documentation can be generated by a program

Posted by "Rick Hillegas (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1868?page=all ]

Rick Hillegas updated DERBY-1868:
---------------------------------

    Attachment: derby-1868-merged-v01.diff

Attaching derby-1868-merge-v01.diff. This makes the changes necessary for this JIRA:

1) Removes the now obsolete ErrorMessageGenerator.

2) Replaces it with a new Ant Task, MessageBuilder. This new task runs during the Derby build at the same time that the splitmessages target runs. MessageBuilder takes an xml file of message descriptors and generates the engine's messages_en.properties as well as the SQLState tables in the Reference Guide (rrefexcept71493.dita).

3) Makes corresponding changes to the build file in engine/org/apache/derby/loc.

4) Removes the engine's messages_en.properties from version control since this file is now generated.

5) Adds the corresponding descriptor file and its grammar: messages.xml and messages.dtd.

Derbyall ran cleanly for me. This patch touches the following files:

D      java/build/org/apache/derbyBuild/ErrorMessageGenerator.java
A      java/build/org/apache/derbyBuild/MessageBuilder.java
M      java/build/org/apache/derbyBuild/build.xml
A      java/engine/org/apache/derby/loc/messages.dtd
D      java/engine/org/apache/derby/loc/messages_en.properties
M      java/engine/org/apache/derby/loc/build.xml
A      java/engine/org/apache/derby/loc/messages.xml


> Merge argument descriptors into SQLState strings so that SQLState documentation can be generated by a program
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-1868
>                 URL: http://issues.apache.org/jira/browse/DERBY-1868
>             Project: Derby
>          Issue Type: Improvement
>          Components: Build tools
>    Affects Versions: 10.2.1.6
>            Reporter: Rick Hillegas
>         Assigned To: Rick Hillegas
>             Fix For: 10.2.2.0
>
>         Attachments: derby-1868-lineEndings-v01.diff, derby-1868-merged-v01.diff, messages.dtd, messages.xml
>
>
> See DERBY-1566. That JIRA introduced a program, written by David, which generates human-readable tables of message strings for inclusion in the Reference Guide. The tool doesn't patch in friendly arguments. That leaves the message strings peppered with unfriendly placeholders like {0}. {1}, etc.. Laura painstakingly editted the tables, by hand substituting in friendlier arguments like <userName> and <tableName>.
> We need to move Laura's substitutions into the source code so that David's program can automatically plug them in. This will save us a lot of grief when we generate future releases. Dan and Andrew have proposed approaches to this problem. Those approaches are discussed in DERBY-1566. Here is Andrew's comment on Dan's proposal:
> "While Dan's suggestion here:
> http://mail-archives.apache.org/mod_mbox/db-derby-dev/200608.mbox/%3c44F62247.2080500@apache.org%3e
> to generate the message file and doc from a single XML file would be ideal, a simpler approach to implement would be to maintain the meanings of the markers in another properties file, identified by message key and marker number. So, e.g. the new properties file would contain:
> 01500.0=<constraintName>
> 01500.1=<tableName>
> Then ErrorMessageGenerator could look up the value of the markers by SQLState and MessageFormat marker number in the properties file, although this approach would require maintaining two files instead of one."
> I glossed this further: "If we adopt Andrew's approach, I would recommend co-locating the argument descriptiors in the same properties file which contains the messages. This will help keep the argument descriptors from drifting out of sync with the messages themselves--that is a substantial advantage of Dan's approach."

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DERBY-1868) Merge argument descriptors into SQLState strings so that SQLState documentation can be generated by a program

Posted by "Rick Hillegas (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1868?page=all ]

Rick Hillegas updated DERBY-1868:
---------------------------------

    Fix Version/s: 10.3.0.0
                       (was: 10.2.2.0)

Reassigning to 10.3 since that's where the work will show up.

> Merge argument descriptors into SQLState strings so that SQLState documentation can be generated by a program
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-1868
>                 URL: http://issues.apache.org/jira/browse/DERBY-1868
>             Project: Derby
>          Issue Type: Improvement
>          Components: Build tools
>    Affects Versions: 10.2.1.6
>            Reporter: Rick Hillegas
>         Assigned To: Rick Hillegas
>             Fix For: 10.3.0.0
>
>         Attachments: antlib.diff, derby-1868-lineEndings-v01.diff, derby-1868-merged-v01.diff, derby-1868-merged-v02.diff, derby-1868-merged-v03.diff, messages.dtd, messages.xml
>
>
> See DERBY-1566. That JIRA introduced a program, written by David, which generates human-readable tables of message strings for inclusion in the Reference Guide. The tool doesn't patch in friendly arguments. That leaves the message strings peppered with unfriendly placeholders like {0}. {1}, etc.. Laura painstakingly editted the tables, by hand substituting in friendlier arguments like <userName> and <tableName>.
> We need to move Laura's substitutions into the source code so that David's program can automatically plug them in. This will save us a lot of grief when we generate future releases. Dan and Andrew have proposed approaches to this problem. Those approaches are discussed in DERBY-1566. Here is Andrew's comment on Dan's proposal:
> "While Dan's suggestion here:
> http://mail-archives.apache.org/mod_mbox/db-derby-dev/200608.mbox/%3c44F62247.2080500@apache.org%3e
> to generate the message file and doc from a single XML file would be ideal, a simpler approach to implement would be to maintain the meanings of the markers in another properties file, identified by message key and marker number. So, e.g. the new properties file would contain:
> 01500.0=<constraintName>
> 01500.1=<tableName>
> Then ErrorMessageGenerator could look up the value of the markers by SQLState and MessageFormat marker number in the properties file, although this approach would require maintaining two files instead of one."
> I glossed this further: "If we adopt Andrew's approach, I would recommend co-locating the argument descriptiors in the same properties file which contains the messages. This will help keep the argument descriptors from drifting out of sync with the messages themselves--that is a substantial advantage of Dan's approach."

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (DERBY-1868) Merge argument descriptors into SQLState strings so that SQLState documentation can be generated by a program

Posted by "Daniel John Debrunner (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/DERBY-1868?page=comments#action_12446050 ] 
            
Daniel John Debrunner commented on DERBY-1868:
----------------------------------------------

Looks good, with many opportunities for additional functionality (in the future).

 - creating the Java constants (SQLState.java) from the XML file
 - adding "what to do" text in the XML file for use in the documentation

Nice job Rick.


> Merge argument descriptors into SQLState strings so that SQLState documentation can be generated by a program
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-1868
>                 URL: http://issues.apache.org/jira/browse/DERBY-1868
>             Project: Derby
>          Issue Type: Improvement
>          Components: Build tools
>    Affects Versions: 10.2.1.6
>            Reporter: Rick Hillegas
>         Assigned To: Rick Hillegas
>             Fix For: 10.2.2.0
>
>         Attachments: derby-1868-lineEndings-v01.diff, derby-1868-merged-v01.diff, messages.dtd, messages.xml
>
>
> See DERBY-1566. That JIRA introduced a program, written by David, which generates human-readable tables of message strings for inclusion in the Reference Guide. The tool doesn't patch in friendly arguments. That leaves the message strings peppered with unfriendly placeholders like {0}. {1}, etc.. Laura painstakingly editted the tables, by hand substituting in friendlier arguments like <userName> and <tableName>.
> We need to move Laura's substitutions into the source code so that David's program can automatically plug them in. This will save us a lot of grief when we generate future releases. Dan and Andrew have proposed approaches to this problem. Those approaches are discussed in DERBY-1566. Here is Andrew's comment on Dan's proposal:
> "While Dan's suggestion here:
> http://mail-archives.apache.org/mod_mbox/db-derby-dev/200608.mbox/%3c44F62247.2080500@apache.org%3e
> to generate the message file and doc from a single XML file would be ideal, a simpler approach to implement would be to maintain the meanings of the markers in another properties file, identified by message key and marker number. So, e.g. the new properties file would contain:
> 01500.0=<constraintName>
> 01500.1=<tableName>
> Then ErrorMessageGenerator could look up the value of the markers by SQLState and MessageFormat marker number in the properties file, although this approach would require maintaining two files instead of one."
> I glossed this further: "If we adopt Andrew's approach, I would recommend co-locating the argument descriptiors in the same properties file which contains the messages. This will help keep the argument descriptors from drifting out of sync with the messages themselves--that is a substantial advantage of Dan's approach."

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (DERBY-1868) Merge argument descriptors into SQLState strings so that SQLState documentation can be generated by a program

Posted by "Rick Hillegas (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/DERBY-1868?page=all ]

Rick Hillegas updated DERBY-1868:
---------------------------------

    Attachment: derby-1868-merged-v02.diff

Commit derby-1868-merged-v02.diff at subversion revision 470008. This causes the clobber target to delete the generated messages_en.properties. This also hides that generated file from subversion.

> Merge argument descriptors into SQLState strings so that SQLState documentation can be generated by a program
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-1868
>                 URL: http://issues.apache.org/jira/browse/DERBY-1868
>             Project: Derby
>          Issue Type: Improvement
>          Components: Build tools
>    Affects Versions: 10.2.1.6
>            Reporter: Rick Hillegas
>         Assigned To: Rick Hillegas
>             Fix For: 10.2.2.0
>
>         Attachments: derby-1868-lineEndings-v01.diff, derby-1868-merged-v01.diff, derby-1868-merged-v02.diff, messages.dtd, messages.xml
>
>
> See DERBY-1566. That JIRA introduced a program, written by David, which generates human-readable tables of message strings for inclusion in the Reference Guide. The tool doesn't patch in friendly arguments. That leaves the message strings peppered with unfriendly placeholders like {0}. {1}, etc.. Laura painstakingly editted the tables, by hand substituting in friendlier arguments like <userName> and <tableName>.
> We need to move Laura's substitutions into the source code so that David's program can automatically plug them in. This will save us a lot of grief when we generate future releases. Dan and Andrew have proposed approaches to this problem. Those approaches are discussed in DERBY-1566. Here is Andrew's comment on Dan's proposal:
> "While Dan's suggestion here:
> http://mail-archives.apache.org/mod_mbox/db-derby-dev/200608.mbox/%3c44F62247.2080500@apache.org%3e
> to generate the message file and doc from a single XML file would be ideal, a simpler approach to implement would be to maintain the meanings of the markers in another properties file, identified by message key and marker number. So, e.g. the new properties file would contain:
> 01500.0=<constraintName>
> 01500.1=<tableName>
> Then ErrorMessageGenerator could look up the value of the markers by SQLState and MessageFormat marker number in the properties file, although this approach would require maintaining two files instead of one."
> I glossed this further: "If we adopt Andrew's approach, I would recommend co-locating the argument descriptiors in the same properties file which contains the messages. This will help keep the argument descriptors from drifting out of sync with the messages themselves--that is a substantial advantage of Dan's approach."

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira