xerces-j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Glavassevich (JIRA)" <xerces-j-...@xml.apache.org>
Subject [jira] Assigned: (XERCESJ-1442) XML Schema 1.1: Defect when compare two target namespaces
Date Thu, 27 May 2010 19:23:36 GMT

     [ https://issues.apache.org/jira/browse/XERCESJ-1442?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Michael Glavassevich reassigned XERCESJ-1442:
---------------------------------------------

    Assignee: Khaled Noaman

> XML Schema 1.1: Defect when compare two target namespaces
> ---------------------------------------------------------
>
>                 Key: XERCESJ-1442
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1442
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: XML Schema 1.1 Structures
>    Affects Versions: 2.9.1
>            Reporter: Kun Xu
>            Assignee: Khaled Noaman
>            Priority: Trivial
>             Fix For: 2.10.0
>
>         Attachments: XSDElementTraverser_patch.txt
>
>
> When we compare two target namespaces in the following schema file,  parser reports an
unexpected error "Since element 'element1' contains the targetNamespace attribute and does
not have a targetNamespace attribute or its value is different from the value of targetNamespace
of 'element1', there.....", which contradicts the fact (element and schema have the same target
namespace). 
> XSD:
> <?xml version="1.0"?>
> <schema xmlns="http://www.w3.org/2001/XMLSchema"
> 		xmlns:tns="http://www.schemaTest.org/schema11_S3_2_3"
> 		targetNamespace="http://www.schemaTest.org/schema11_S3_2_3"		
> 		elementFormDefault="unqualified"
> 		attributeFormDefault="qualified">
> 	<complexType name="type1">
> 		<sequence>
> 			<element name="element1" type="integer" targetNamespace="http://www.schemaTest.org/schema11_S3_2_3"/>
> 			<element name="element2" type="integer"/>
> 		</sequence>		
> 	</complexType>
> 	<element name="root" type="tns:type1"/>
> </schema>
> Reason:
> We use "!=" to compare two strings but they are two different objects, therefore the
result will be false even they have the same value.
> Suggestion:
> simply change "!=" to "!equals()".  Thanks.

-- 
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: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org


Mime
View raw message