Uploaded image for project: 'Tuscany'
  1. Tuscany
  2. TUSCANY-1915

Invalid namespace defined when using QName

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • Java-SDO-1.0, Java-SDO-Next
    • None
    • None
    • WinXP - IBM Java 1.4.2

    Description

      When my schema defines an element of type QName, I get a name space of _ created. The resulting XML looks like this:

      <?xml version="1.0" encoding="ASCII"?>
      <person:Person xmlns:_="" xmlns:person="http://www.example.org/Person">
      <person:Name>_:James</person:Name>
      <person:Age>30</person:Age>
      </person:Person>

      Notice the xmlns:_="" and the _:James as the value of Name. The Name element has a type of QName. I'll attach my schema and code to this bug.

      In the code, I'm creating the data object, saving it to a string, loading it as an XMLDocument, then saving it again to the output stream. The load seems to be the culprit in this case. If I save it straight after creating it, it works fine.

      Let me know if you need any more information.

      Thanks,
      -Chris

      Attachments

        1. Person.xsd
          0.7 kB
          Chris Mildebrandt
        2. QNameTest.java
          1 kB
          Chris Mildebrandt

        Activity

          People

            Unassigned Unassigned
            eyeofthefrog Chris Mildebrandt
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: