Uploaded image for project: 'XMLBeans'
  1. XMLBeans
  2. XMLBEANS-57

scomp failure for XSD namespace "DAV:"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Version 1.0.3
    • Version 2 Beta 1
    • Compiler
    • None
    • Faced this problem on Windows XP professional SUN JDK 1.4.2
      XMLBeans 1.0.3

    Description

      I had a problem compiling a WebDAV XSD like so:

      <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
      elementFormDefault="qualified" targetNamespace="DAV:" xmlns="DAV:" > ... </xs:schema>

      The scomp command was choking on the "DAV:" when it tried to generate a
      package name from the XSD.

      The problem was happening due to a namespace of "DAV:" in the XSD. I changed the org.apache.xmlbeans.impl.common.NameUtil Java file line 529 to

      if (buf.length() > 0)

      { return buf.substring(0, buf.length() - 1); // chop off extra dot }

      else

      { return buf.toString(); // chop off extra dot }

      From

      return buf.substring(0, buf.length() - 1); // chop off extra dot

      Now, it seems to work...

      Attachments

        Activity

          People

            Unassigned Unassigned
            subrav Subramanian Venkatesan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: