Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

BinaryBase64 Schema Validation

Status
Not open for further replies.

blondebier

Programmer
Joined
Jun 19, 2003
Messages
142
Location
GB
I have written a schema to validate a response from a web service. It works well except I cannot get the BinaryBase64 tag to validate.

Part of the schema goes like this:

<xsd:complexType name="tyDocument">
<xsd:sequence>
<xsd:element name="DocumentType" minOccurs="1" maxOccurs="1" type="xsd:string" />
<xsd:element name="DocumentStatus" minOccurs="1" maxOccurs="1" type="xsd:string" />
<xsd:element name="PDFFILE" minOccurs="0" maxOccurs="1" type="xsd:base64Binary" />
</xsd:sequence>
</xsd:complexType>

Part of the xml that I’m trying to validate goes like this:

<Document>
<DocumentType>PDF</DocumentType>
<DocumentStatus>Document Produced</DocumentStatus>
<PDFFILE xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="bin.base64"></PDFFILE>
</Document>

The error message I get says, “Error: (-2147467259) The attribute '{urn:schemas-microsoft-com:datatypes}dt' on this element is not defined in the DTD/Schema.
at line 41, column 79”

Any idea how I get it to validate this XML? The problem is that the attribute in the XML cannot change. It has to be: xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="bin.base64"

Can I add this attribute to the schema easily so that it will validate it?

I’d appreciate any pointers.

Cheers,
Francis
 
Status
Not open for further replies.

Similar threads

Replies
0
Views
239
  • Locked
  • Question Question
Replies
0
Views
292

Part and Inventory Search

Sponsor

Back
Top