I am trying to use a tag name with the NameStartChar of ':' as specified in the
w3c Candidate Recommendation for XML 1.1, the production for 'NameStartChar'.
I have been successful in using many other characters that are also specified
as allowed in XML 1.1 as starting characters, such as '_', etc. However when I
tried to introduce a ':' while using namespaces, I get a SAX parse exception
(shown below). Perhaps this is because the PrefixedName would look like:
'astro::test.03' since I am essentially trying to create a LocalPart ':test.03'?
Here is the SAX Exception
--------------------------
Catalog Parsing SAX Exception: Error: Catalog
URI=file:/files/sqe/jaxpnext/jaxp-test/test/jaxp-tests/astro/lib/catalog.xsd
Line=111: s4s-att-invalid-value: Invalid attribute value for 'name' in
element 'element': cvc-datatype-valid.1.2.1.
org.xml.sax.SAXException: Error: Catalog
URI=file:/files/sqe/jaxpnext/jaxp-test/test/jaxp-tests/astro/lib/catalog.xsd
Line=111: s4s-att-invalid-value: Invalid attribute value for 'name' in
element 'element': cvc-datatype-valid.1.2.1.
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Ab
stractSAXParser.java:1196)
at test.astro.Pipeline.process(Unknown Source)
at test.astro.Main.runQuery(Unknown Source)
at test.astro.TestDriver.runquery1(Unknown Source)
at test.astro.TestDriver.testmode1(Unknown Source)
at test.astro.TestDriver.main(Unknown Source)
Here is the file 'catalog.xsd' mentioned above, and the offending line 111:
----------------------------------------------------------------------------
1 <xs:schema
2 xmlns:xs="http://www.w3.org/2001/XMLSchema"
3 targetNamespace="http://www.astro.com/astro"
4 xmlns:astro="http://www.astro.com/astro"
5 elementFormDefault="qualified"
6 attributeFormDefault="qualified"
7 >
...
103 <xs:element name="stardb">
104 <xs:complexType>
105 <xs:sequence>
106
107 <!-- for testing purposes -->
>> 111 <xs:element name=":test.03" type="xs:string"/>
113
114 <!-- astro data elements -->
115 <xs:element name="star" type="astro:starType"
116 minOccurs="0" maxOccurs="unbounded"/>
117 </xs:sequence>
118 </xs:complexType>
119 </xs:element>
120 <!-- The real part of the catalog ends here -->
121
122 </xs:schema>
Here also is the a fragment of the XML doc so you can see the use of the tag:
<?xml version="1.1" encoding="UTF-8"?>
<stardb xmlns="http://www.astro.com/astro"
xsi:schemaLocation="http://www.astro.com/astro catalog.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<_test01></_test01>
<test-02></test-02>
<:test.03></:test.03>
// other lines deleted...
</stardb>
w3c Candidate Recommendation for XML 1.1, the production for 'NameStartChar'.
I have been successful in using many other characters that are also specified
as allowed in XML 1.1 as starting characters, such as '_', etc. However when I
tried to introduce a ':' while using namespaces, I get a SAX parse exception
(shown below). Perhaps this is because the PrefixedName would look like:
'astro::test.03' since I am essentially trying to create a LocalPart ':test.03'?
Here is the SAX Exception
--------------------------
Catalog Parsing SAX Exception: Error: Catalog
URI=file:/files/sqe/jaxpnext/jaxp-test/test/jaxp-tests/astro/lib/catalog.xsd
Line=111: s4s-att-invalid-value: Invalid attribute value for 'name' in
element 'element': cvc-datatype-valid.1.2.1.
org.xml.sax.SAXException: Error: Catalog
URI=file:/files/sqe/jaxpnext/jaxp-test/test/jaxp-tests/astro/lib/catalog.xsd
Line=111: s4s-att-invalid-value: Invalid attribute value for 'name' in
element 'element': cvc-datatype-valid.1.2.1.
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Ab
stractSAXParser.java:1196)
at test.astro.Pipeline.process(Unknown Source)
at test.astro.Main.runQuery(Unknown Source)
at test.astro.TestDriver.runquery1(Unknown Source)
at test.astro.TestDriver.testmode1(Unknown Source)
at test.astro.TestDriver.main(Unknown Source)
Here is the file 'catalog.xsd' mentioned above, and the offending line 111:
----------------------------------------------------------------------------
1 <xs:schema
2 xmlns:xs="http://www.w3.org/2001/XMLSchema"
3 targetNamespace="http://www.astro.com/astro"
4 xmlns:astro="http://www.astro.com/astro"
5 elementFormDefault="qualified"
6 attributeFormDefault="qualified"
7 >
...
103 <xs:element name="stardb">
104 <xs:complexType>
105 <xs:sequence>
106
107 <!-- for testing purposes -->
>> 111 <xs:element name=":test.03" type="xs:string"/>
113
114 <!-- astro data elements -->
115 <xs:element name="star" type="astro:starType"
116 minOccurs="0" maxOccurs="unbounded"/>
117 </xs:sequence>
118 </xs:complexType>
119 </xs:element>
120 <!-- The real part of the catalog ends here -->
121
122 </xs:schema>
Here also is the a fragment of the XML doc so you can see the use of the tag:
<?xml version="1.1" encoding="UTF-8"?>
<stardb xmlns="http://www.astro.com/astro"
xsi:schemaLocation="http://www.astro.com/astro catalog.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<_test01></_test01>
<test-02></test-02>
<:test.03></:test.03>
// other lines deleted...
</stardb>