[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xerces-c-dev
Subject:    [jira] Commented: (XERCESC-1497) 2.6 & 2.7 don't support validate a xml with two or more schema file
From:       "Alberto Massari (JIRA)" <xerces-c-dev () xml ! apache ! org>
Date:       2005-09-19 10:18:55
Message-ID: 1733415860.1127125135706.JavaMail.jira () ajax ! apache ! org
[Download RAW message or body]

    [ http://issues.apache.org/jira/browse/XERCESC-1497?page=comments#action_12329821 \
] 

Alberto Massari commented on XERCESC-1497:
------------------------------------------

Hi Savorjava,
the schema files have two errors in it:

1) resource_lists.xsd defines this "listType" as a sequence of

      <xs:element name="display-name" type="display-nameType" minOccurs="0"/>
      <xs:sequence minOccurs="0" maxOccurs="unbounded">
        <xs:choice>
          [...]
          <xs:any namespace="##other" processContents="lax" minOccurs="0" \
maxOccurs="unbounded"/>  </xs:choice>
      </xs:sequence>
      <xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>

and this is ambiguous because the unbound choice contains a xs:any that is the same \
of the xs:any of the main sequence. So, in an XML like this

<display-name>...</display-name>
<entry>...</entry>
<prefix:other>...</prefix:other>

the validator doesn't know if the "prefix:other" element should be validated against \
the "<xs:any namespace="##other" processContents="lax" minOccurs="0" \
maxOccurs="unbounded"/>" or the " <xs:any namespace="##other" minOccurs="0" \
maxOccurs="unbounded"/>"

2) rls_service.xsd declares a prefix "rl" and uses it to refer to the "rl:listType" \
type, but it doesn't import the corresponding schema. There should be a

	<xs:import namespace="urn:ietf:params:xml:ns:resource-lists" \
schemaLocation="resource_lists.xsd"/>

as the first child of the xs:schema element

> 2.6 & 2.7 don't support validate a xml with two or more schema files.
> ---------------------------------------------------------------------
> 
> Key: XERCESC-1497
> URL: http://issues.apache.org/jira/browse/XERCESC-1497
> Project: Xerces-C++
> Type: Bug
> Reporter: Savorjava
> Attachments: draft-ietf-simple-xcap-list-usage-05.txt, resource_lists.xsd, \
> rls_services.xsd 
> I have tried to validate following xml with two schema files, one is \
> resource_list.xsd and another one is rls_services.xsd, I have place these files on \
> my local disk and made my own EntityResolver for them. when I run my program, \
> Xerces can tell me something wrong with rls-service schema, but Xerces cannot tell \
> me the problems with resource-list schema. but in the following xml I have two \
> elements come from resource-list schema: rl:entry and rl:entry-ref. xml:
> <?xml version="1.0" encoding="UTF-8" standalone="no" ?><rls-services xmlns="urn:
> ietf:params:xml:ns:rls-services" xmlns:rl="urn:ietf:params:xml:ns:resource-lists
> " xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:
> ietf:params:xml:ns:resource-lists resource_lists.xsd urn:ietf:params:xml:ns:rls-
> services rls_services.xsd http://www.w3.org/2001/xml.xsd xml.xsd">
> <service uri="sip:mybuddies@example.com">
> <resource-list>http://xcap.example.com/resource-lists/users/joe/index/~~/re
> source-lists/list%5b@name=%22l1%22%5d</resource-list>
> <packages>
> <package>presence</package>
> </packages>
> </service>
> <service uria="sip:marketing@example.com">
> <list name="marketing">
> <rl:entryabc uri="123"/>
> <rl:entry-ref abc="sip:sudhir@example.com"/>
> </list>
> <packages>
> <package>presence</package>
> </packages>
> </service>
> </rls-services>
> -----------------------------------------
> output info:
> Error at file E:\works\IMS\PS\XML/test.xml, line 4, char 231
> Message: Complex type 'listType' violates the Unique Particle Attribution rule
> in its components '##other' and '##other'
> Error at file E:\works\IMS\PS\XML/test.xml, line 4, char 231
> Message: Complex type '__AnonC3' violates the Unique Particle Attribution rule
> in its components '##other' and '##other'
> systemId: rls_services.xsd
> baseURI: E:\works\IMS\PS\XML/test.xml
> FileName: rls_services.xsd
> Error at file E:\works\IMS\PS\XML/rls_services.xsd, line 18, char 52
> Message: Schema Representation Constraint: Namespace 'urn:ietf:params:xml:ns:r
> esource-lists' is referenced without <import> declaration
> systemId: xml.xsd
> baseURI: E:\works\IMS\PS\XML/test.xml
> FileName: xml.xsd
> Error at file E:\works\IMS\PS\XML/test.xml, line 4, char 231
> Message: Schema in xml.xsd has a different target namespace from the one speci
> fied in the instance document http://www.w3.org/2001/xml.xsd.
> Error at file E:\works\IMS\PS\XML/test.xml, line 11, char 47
> Message: Attribute 'uria' is not declared for element 'service'
> Error at file E:\works\IMS\PS\XML/test.xml, line 11, char 47
> Message: Required attribute 'uri' was not provided

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic