Hello All, Here is my problem: i have an xml file which has some values and also this file is certificate signed. my xsd schema file knows how to handle only the values, while when adding the signature lines the schema fails. the error is: The element 'Header' has invalid child element 'Signature' in namespace 'http://www.w3.org/2000/09/xmldsig#'. List of possible elements expected 'Signature' here is my code following, Thanks :) File test.xml: <pre lang="xml"> <Header> <tank> <code>1</code> <level>0</level> </tank> <Signature xmlns="http://www.w3.org/2000/09/xmldsig#"> <SignedInfo> ... <SignedInfo> </Signature> </Header>
<?xml version="1.0"?> <xs:schema id="SchemaTest" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefalut="qualified" attributeFormDefault="unqualified"> <xs:element name="Header"> <xs:complexType> <xs:sequence> <xs:element name="tank"> <xs:complexType> <xs:sequence> <xs:element name="code"/> <xs:element name="level"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="Signature"> <xs:complexType> <xs:sequence> <xs:element name="SignedInfo"> <xs:complexType> <xs:sequence> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:schema>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)