[ http://issues.apache.org/jira/browse/XERCESJ-1100?page=comments#action_12330874 ]
Arthur Ryman commented on XERCESJ-1100: --------------------------------------- Michael, Thx. We'll try that. > Error when <import> refers to a schema inlined in another XML document > ---------------------------------------------------------------------- > > Key: XERCESJ-1100 > URL: http://issues.apache.org/jira/browse/XERCESJ-1100 > Project: Xerces2-J > Type: Bug > Versions: 2.7.1 > Environment: Any JDK > Reporter: Arthur Ryman > > The XSD spec states that the schemaLocation attribute of the <import> element > MAY point to a <schema> element that is contained in another XML document. > However, Xerces reports an error when the root element is not a <schema> > element. It should examine the full URL, including the fragment identifier to > identify the part of the document being refered to. This problem occurs in > practice in WSDL documents where <schema> may be inlined inside the WSDL > <types> element, both in WSDL 1.1 and WSDL 2.0. For example, we need imports > like this to work where the other schema is refered to via an id: > <xs:import > > namespace="http://greath.example.com/2004/schemas/reservationItems" > schemaLocation="#items" /> > We are attempting to make the Apache Woden WSDL validator fully spec > compliant and need the support in Xerces. Here is an example WSDL 2.0 > document: > (available at the W3C CVS resository > http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/good/SchemaId-1G/schemaIds.wsdl) > <?xml version="1.0" encoding="utf-8" ?> > <description xmlns="http://www.w3.org/2005/05/wsdl" > > targetNamespace="http://greath.example.com/2004/services/retrieveDetails" > xmlns:tns="http://greath.example.com/2004/services/retrieveDetails" > > xmlns:wdetails="http://greath.example.com/2004/schemas/reservationDetails" > xmlns:xs="http://www.w3.org/2001/XMLSchema" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://www.w3.org/2005/05/wsdl > ../../../xmlcatalog/wsdl/wsdl20.xsd http://www.w3.org/2001/XMLSchema > ../../../xmlcatalog/xsd/XMLSchema.xsd"> > <documentation> > This document describes the GreatH Retrieve Reservation Details > Web service. > </documentation> > <types> > <xs:schema id="items" > > targetNamespace="http://greath.example.com/2004/schemas/reservationItems"> > <xs:element name="confirmationNumber" type="xs:string" > /> > <xs:element name="checkInDate" type="xs:date" /> > <xs:element name="checkOutDate" type="xs:date" /> > <xs:element name="roomType" type="xs:string" /> > <xs:element name="smoking" type="xs:boolean" /> > </xs:schema> > <xs:schema id="details" > > targetNamespace="http://greath.example.com/2004/schemas/reservationDetails" > > xmlns:items="http://greath.example.com/2004/schemas/reservationItems"> > <xs:import > > namespace="http://greath.example.com/2004/schemas/reservationItems" > schemaLocation="#items" /> > <xs:element name="reservationDetails"> > <xs:complexType> > <xs:sequence> > <xs:element > ref="items:confirmationNumber" /> > <xs:element > ref="items:checkInDate" /> > <xs:element > ref="items:checkOutDate" /> > <xs:element > ref="items:roomType" /> > <xs:element ref="items:smoking" > /> > </xs:sequence> > </xs:complexType> > </xs:element> > </xs:schema> > </types> > <interface name="retrieveDetailsInterface"> > <operation name="retrieve" > pattern="http://www.w3.org/2004/03/wsdl/in-out"> > <input messageLabel="In" element="#none" /> > <output messageLabel="Out" > element="wdetails:reservationDetails" /> > </operation> > </interface> > </description> -- 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
