Re: [xml] Does libxml2 support multiple schemas?




Sorry for the unclear description.

For example, the following is a SOAP message with WS-Security

To make sure if the SOAP message is valid or not, I have to validate it against

SOAP12.xsd,
xml.xsd,
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd
http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
xmldsig-core-schema.xsd
Also,
the schema for Web Services itself

, isn't it?

Is it possible to make these schemas compiled using libxml2?
Just like the concept of XMLGrammarPool of Xerces-J?

Thanks for your response.

BRs.
Gloria


************************************************************************************************************************************************************************
<soap:Envelope xmlns:soap=" http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="urn:CCLAddInt" xmlns:types="urn:CCLAddInt/encodedTypes" xmlns:xsd=" http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soap:Header>
<wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsu:Created wsu:Id="Id-0554b3a3-3da1-4248-85ad-a49dc05fae28">2004-12-02T10:38:31Z</wsu:Created><wsu:Expires wsu:Id="Id-63efbc04-8b99-45b4-9ecd-8860463beeda">2004-12-02T10:48:31Z</wsu:Expires></wsu:Timestamp>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:BinarySecurityToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd " EncodingType="xsse:Base64Binary" ValueType="xsse:509v3" wsu:Id="SecurityToken-1dc0e5ec-700c-4806-887d-810f377cb52d">MIICGDCCAYECBEE/vFYwDQYJKoZIhvcNAQEEBQAwUzELMAkGA1UEBhMCdHcxDDAKBgNVBAgTA3dz
ZzEMMAoGA1UEBxMDd3NnMQwwCgYDVQQKEwN3c2cxDDAKBgNVBAsTA3dzZzEMMAoGA1UEAxMDd3Nn
MB4XDTA0MDkwOTAyMTM0MloXDTA0MTIwODAyMTM0MlowUzELMAkGA1UEBhMCdHcxDDAKBgNVBAgT
A3dzZzEMMAoGA1UEBxMDd3NnMQwwCgYDVQQKEwN3c2cxDDAKBgNVBAsTA3dzZzEMMAoGA1UEAxMD
d3NnMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDJ8Ft+ZpwBMhVVog+WqriZBMA5JWnQXsnD
kyjPELxwYVPIhEcf0oPpdvdnjp1cU05Edh29Hf5o9PxnsUnFjyrZ3xeQgajOpCMsXuYxNijf5yPr
JnonIWKwR8mI1cjXoKXNkYU/3VcGZZl2vhQHg5GRmVVBzshBLXcWYmgOWwyYgQIDAQABMA0GCSqG
SIb3DQEBBAUAA4GBAKOUDMZlREnaxVBcQCuclUMlxie/u659IGHeA1IAtmzDitqKasIKM/ffpx8Z
Qby0+cGiKyOLdjUDqjHGId1X/ixwE8lMpr2hqeEuMmkUL4LP5GE2xXOvAh5AA2rarff69Sdmy4OL
cjOuJ3kjKKwOzvZN8Fn8id6+wbnim4Dr+3bo</wsse:BinarySecurityToken>
<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:SignedInfo>
<ds:CanonicalizationMethod Algorithm=" http://www.w3.org/TR/2001/REC-xml-c14n-20010315"></ds:CanonicalizationMethod>
<ds:SignatureMethod Algorithm=" http://www.w3.org/2000/09/xmldsig#rsa-sha1"></ds:SignatureMethod>
<ds:Reference URI="#Id-54911a36-6abf-4cef-8dc2-8013d63aeef8">
<ds:Transforms>
<ds:Transform Algorithm=" http://www.w3.org/2001/10/xml-exc-c14n#"></ds:Transform>
</ds:Transforms>
<ds:DigestMethod Algorithm=" http://www.w3.org/2000/09/xmldsig#sha1"></ds:DigestMethod>
<ds:DigestValue>vFEbplcogLbolJoae8sXTfhvBNo=</ds:DigestValue>
</ds:Reference>
<ds:Reference URI="#Id-0554b3a3-3da1-4248-85ad-a49dc05fae28">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"></ds:Transform>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></ds:DigestMethod>
<ds:DigestValue>tpNUwQiMKejpSLDusVhKYyiYCQI=</ds:DigestValue>
</ds:Reference>
<ds:Reference URI="#Id-63efbc04-8b99-45b4-9ecd-8860463beeda">
<ds:Transforms>
<ds:Transform Algorithm=" http://www.w3.org/2001/10/xml-exc-c14n#"></ds:Transform>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"></ds:DigestMethod >
<ds:DigestValue>Dr7z/Lx6WDIp1bN6yF/L37Hk0w4=</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue>
Q/wZGRSzoUqSitE3LisGbig+tLciLFZ8eI3SAqf4HjV1FvjZTuvD+RPahz4rSAnMu/L15RvI7vrI
wDOia7KFtrC2THmzNNZ3q58YnxWwZV8nDRNB2YSEEhHzSa39Nko/Qp5Ch8u3Zju4PzZU0jrtXCUx
//iggfzEvYernho/cvk=
</ds:SignatureValue>
<ds:KeyInfo>
<wsse:SecurityTokenReference>
<wsse:Reference URI="#SecurityToken-1dc0e5ec-700c-4806-887d-810f377cb52d"></wsse:Reference>
</wsse:SecurityTokenReference>
</ds:KeyInfo>
</ds:Signature>
</wsse:Security>
</soap:Header>
<soap:Body xmlns:wsu=" http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Id-54911a36-6abf-4cef-8dc2-8013d63aeef8"><tns:addInt soap:encodingStyle=" http://schemas.xmlsoap.org/soap/encoding/"><in0 xsi:type="xsd:int">123</in0><in1 xsi:type="xsd:int">456</in1></tns:addInt></soap:Body></soap:Envelope>



On 7/17/05, Daniel Veillard <veillard redhat com> wrote:
No idea as I don't understand the question.
You can validate a document tree against as many schemas as you want.
Each may return a different validity status in isolation.
I have no idea how SOAP is supposed to be validated nor how the
.xsd you named are supposed to be used.

Daniel

--
Daniel Veillard      | Red Hat Desktop team http://redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]