You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by bu...@apache.org on 2001/06/20 18:15:46 UTC

[Bug 2250] New: - duplicate attributes in XML document, error not reported

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2250

*** shadow/2250	Wed Jun 20 09:15:46 2001
--- shadow/2250.tmp.3949	Wed Jun 20 09:15:46 2001
***************
*** 0 ****
--- 1,51 ----
+ +============================================================================+
+ | duplicate attributes in XML document, error not reported                   |
+ +----------------------------------------------------------------------------+
+ |        Bug #: 2250                        Product: Xerces-J                |
+ |       Status: NEW                         Version: 1.4                     |
+ |   Resolution:                            Platform: PC                      |
+ |     Severity: Normal                   OS/Version: Windows NT/2K           |
+ |     Priority: Other                     Component: Schema-Structures       |
+ +----------------------------------------------------------------------------+
+ |  Assigned To: xerces-j-dev@xml.apache.org                                  |
+ |  Reported By: mhuffman@ca.ibm.com                                          |
+ |      CC list: Cc:                                                          |
+ +----------------------------------------------------------------------------+
+ |          URL:                                                              |
+ +============================================================================+
+ |                              DESCRIPTION                                   |
+ According to Namespaces in XML spec:
+ 
+ http://www.w3.org/TR/REC-xml-names/#uniqAttrs
+ 
+ an XML document cannot have an element containing 2 or more attributes where 
+ the attributes have the same local name and different namespace prefixes *IF* 
+ the namespace prefixes both resolve to the *SAME* namespace.
+ 
+ Here is an example which is invalid and no error is reported by the parser:
+ 
+ 3_2ii13a.xml
+ ============
+ <?xml version="1.0"?>
+ <ns1:root xmlns:xsi         ="http://www.w3.org/2001/XMLSchema-instance"
+           xmlns:ns1         ="http://www.Test.org/3_2ii"
+           xmlns:ns2         ="http://www.Test.org/3_2ii"
+           xsi:schemaLocation="http://www.Test.org/3_2ii
+                               3_2ii13.xsd"
+           ns1:attr="1"
+           ns2:attr="2"/>
+ 
+ 3_2ii13.xsd
+ ===========
+ <?xml version="1.0"?>
+ <schema xmlns               ="http://www.w3.org/2001/XMLSchema"
+         targetNamespace     ="http://www.Test.org/3_2ii"
+         attributeFormDefault="qualified">
+ 
+ <element name="root">
+   <complexType>
+     <attribute name="attr" type="integer"/>
+   </complexType>
+ </element>
+ 
+ </schema>
\ No newline at end of file

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org