You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by "Anton Nikolaevsky (JIRA)" <xe...@xml.apache.org> on 2007/05/03 14:20:15 UTC

[jira] Created: (XERCESC-1697) xml:* attributes duplication

xml:* attributes duplication
----------------------------

                 Key: XERCESC-1697
                 URL: https://issues.apache.org/jira/browse/XERCESC-1697
             Project: Xerces-C++
          Issue Type: Bug
          Components: SAX/SAX2
    Affects Versions: 2.6.0
         Environment: Microsoft Windows XP Pro SP2, Microsoft Visual C++ .NET
            Reporter: Anton Nikolaevsky


Xerces doesn't check if attributes from
"http://www.w3.org/XML/1998/namespace" namespace which can have default value
(e.g., xml:space) are directly specified in the data. So it leads to xml:space
duplication in attributes list during startElement event.

Sample .xml & .xsd are attached. 

For schema fragment
...
            <xsd:element name="name">
                <xsd:complexType>
                    <xsd:simpleContent>
                        <xsd:extension base="xsd:string">
                            <xsd:attribute ref="xml:space"/>
                        </xsd:extension>
                    </xsd:simpleContent>
                </xsd:complexType>
            </xsd:element>
...

and following data fragment
...
		<name xml:space="preserve">John Abraham Smith</name>
...

Xerces reports 2 attributes xml:space within attributes container.



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (XERCESC-1697) xml:* attributes duplication

Posted by "Boris Kolpackov (JIRA)" <xe...@xml.apache.org>.
     [ https://issues.apache.org/jira/browse/XERCESC-1697?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Boris Kolpackov updated XERCESC-1697:
-------------------------------------

    Fix Version/s: 2.9.0
                   3.0.0

Would be nice to fix this for 3.0.0 and 2.9.0.

> xml:* attributes duplication
> ----------------------------
>
>                 Key: XERCESC-1697
>                 URL: https://issues.apache.org/jira/browse/XERCESC-1697
>             Project: Xerces-C++
>          Issue Type: Bug
>          Components: SAX/SAX2
>    Affects Versions: 2.6.0
>         Environment: Microsoft Windows XP Pro SP2, Microsoft Visual C++ .NET
>            Reporter: Anton Nikolaevsky
>             Fix For: 3.0.0, 2.9.0
>
>         Attachments: xml_space_duplication.zip
>
>
> Xerces doesn't check if attributes from
> "http://www.w3.org/XML/1998/namespace" namespace which can have default value
> (e.g., xml:space) are directly specified in the data. So it leads to xml:space
> duplication in attributes list during startElement event.
> Sample .xml & .xsd are attached. 
> For schema fragment
> ...
>             <xsd:element name="name">
>                 <xsd:complexType>
>                     <xsd:simpleContent>
>                         <xsd:extension base="xsd:string">
>                             <xsd:attribute ref="xml:space"/>
>                         </xsd:extension>
>                     </xsd:simpleContent>
>                 </xsd:complexType>
>             </xsd:element>
> ...
> and following data fragment
> ...
> 		<name xml:space="preserve">John Abraham Smith</name>
> ...
> Xerces reports 2 attributes xml:space within attributes container.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (XERCESC-1697) xml:* attributes duplication

Posted by "Anton Nikolaevsky (JIRA)" <xe...@xml.apache.org>.
     [ https://issues.apache.org/jira/browse/XERCESC-1697?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Anton Nikolaevsky updated XERCESC-1697:
---------------------------------------

    Attachment: xml_space_duplication.zip

Sample .xml & .xsd files.

Proposed fix is also attached.

> xml:* attributes duplication
> ----------------------------
>
>                 Key: XERCESC-1697
>                 URL: https://issues.apache.org/jira/browse/XERCESC-1697
>             Project: Xerces-C++
>          Issue Type: Bug
>          Components: SAX/SAX2
>    Affects Versions: 2.6.0
>         Environment: Microsoft Windows XP Pro SP2, Microsoft Visual C++ .NET
>            Reporter: Anton Nikolaevsky
>         Attachments: xml_space_duplication.zip
>
>
> Xerces doesn't check if attributes from
> "http://www.w3.org/XML/1998/namespace" namespace which can have default value
> (e.g., xml:space) are directly specified in the data. So it leads to xml:space
> duplication in attributes list during startElement event.
> Sample .xml & .xsd are attached. 
> For schema fragment
> ...
>             <xsd:element name="name">
>                 <xsd:complexType>
>                     <xsd:simpleContent>
>                         <xsd:extension base="xsd:string">
>                             <xsd:attribute ref="xml:space"/>
>                         </xsd:extension>
>                     </xsd:simpleContent>
>                 </xsd:complexType>
>             </xsd:element>
> ...
> and following data fragment
> ...
> 		<name xml:space="preserve">John Abraham Smith</name>
> ...
> Xerces reports 2 attributes xml:space within attributes container.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Resolved: (XERCESC-1697) xml:* attributes duplication

Posted by "Alberto Massari (JIRA)" <xe...@xml.apache.org>.
     [ https://issues.apache.org/jira/browse/XERCESC-1697?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alberto Massari resolved XERCESC-1697.
--------------------------------------

       Resolution: Duplicate
    Fix Version/s:     (was: 2.9.0)
                       (was: 3.0.0)
                   2.7.0
         Assignee: Alberto Massari

I tried to reproduce it with both 2.8 and 3.0, but "sax2print po.xml" prints a single xml:space attribute in both <name> elements. So I think this is a duplicate of  XERCESC-1533

Alberto

> xml:* attributes duplication
> ----------------------------
>
>                 Key: XERCESC-1697
>                 URL: https://issues.apache.org/jira/browse/XERCESC-1697
>             Project: Xerces-C++
>          Issue Type: Bug
>          Components: SAX/SAX2
>    Affects Versions: 2.6.0
>         Environment: Microsoft Windows XP Pro SP2, Microsoft Visual C++ .NET
>            Reporter: Anton Nikolaevsky
>            Assignee: Alberto Massari
>             Fix For: 2.7.0
>
>         Attachments: xml_space_duplication.zip
>
>
> Xerces doesn't check if attributes from
> "http://www.w3.org/XML/1998/namespace" namespace which can have default value
> (e.g., xml:space) are directly specified in the data. So it leads to xml:space
> duplication in attributes list during startElement event.
> Sample .xml & .xsd are attached. 
> For schema fragment
> ...
>             <xsd:element name="name">
>                 <xsd:complexType>
>                     <xsd:simpleContent>
>                         <xsd:extension base="xsd:string">
>                             <xsd:attribute ref="xml:space"/>
>                         </xsd:extension>
>                     </xsd:simpleContent>
>                 </xsd:complexType>
>             </xsd:element>
> ...
> and following data fragment
> ...
> 		<name xml:space="preserve">John Abraham Smith</name>
> ...
> Xerces reports 2 attributes xml:space within attributes container.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (XERCESC-1697) xml:* attributes duplication

Posted by "David Bertoni (JIRA)" <xe...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XERCESC-1697?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12493389 ] 

David Bertoni commented on XERCESC-1697:
----------------------------------------

I also have a patch for this.  I'll compare the two and commit something soon.

> xml:* attributes duplication
> ----------------------------
>
>                 Key: XERCESC-1697
>                 URL: https://issues.apache.org/jira/browse/XERCESC-1697
>             Project: Xerces-C++
>          Issue Type: Bug
>          Components: SAX/SAX2
>    Affects Versions: 2.6.0
>         Environment: Microsoft Windows XP Pro SP2, Microsoft Visual C++ .NET
>            Reporter: Anton Nikolaevsky
>         Attachments: xml_space_duplication.zip
>
>
> Xerces doesn't check if attributes from
> "http://www.w3.org/XML/1998/namespace" namespace which can have default value
> (e.g., xml:space) are directly specified in the data. So it leads to xml:space
> duplication in attributes list during startElement event.
> Sample .xml & .xsd are attached. 
> For schema fragment
> ...
>             <xsd:element name="name">
>                 <xsd:complexType>
>                     <xsd:simpleContent>
>                         <xsd:extension base="xsd:string">
>                             <xsd:attribute ref="xml:space"/>
>                         </xsd:extension>
>                     </xsd:simpleContent>
>                 </xsd:complexType>
>             </xsd:element>
> ...
> and following data fragment
> ...
> 		<name xml:space="preserve">John Abraham Smith</name>
> ...
> Xerces reports 2 attributes xml:space within attributes container.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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