Uploaded image for project: 'XalanC'
  1. XalanC
  2. XALANC-445

generate-id() inserts periods into name which limits usage

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.6
    • Fix Version/s: CurrentCVS
    • Component/s: XalanC
    • Labels:
      None

      Description

      "The generate-id function returns a string that uniquely identifies the node in the argument node-set that is first in document order. The unique identifier must consist of ASCII alphanumeric characters and must start with an alphabetic character. Thus, the string is syntactically an XML name."

      (from http://www.w3.org/TR/xslt#function-generate-id)

      I have someone arguing with me that Xalan doesn't do this right because it returns names like this "Nxxxxxxxx.yyyyyyyy" (where the x's and y's are hex digits). The period in the middle is the sticking point. He says this is not an ASCII alphanumeric character. For what he is doing with the names (something with JavaScript) periods are not legal characters and he is stuck.

      Unforunately there is no single clear definition of "ASCII alphanumeric character" that I can find. Some of the definitions include all ASCII characters in "alphanumeric" while others include only letters and numbers. XML names are clearly defined and they can include periods (among several other non-letter/non-number characters).

      It can be argued that everything is working fine but it would probably be better if some other character than a period was used in the middle there.

      This specifically is for Xalan 1.6 but the code (in the getSuffix function of FunctionGenerateID) is the same in Xalan 1.9 as well and probably other versions.

        Attachments

          Activity

            People

            • Assignee:
              dbertoni David N Bertoni
              Reporter:
              billseurer William D. seurer
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: