W3C home > Mailing lists > Public > xmlschema-dev@w3.org > August 2004

RE: BinaryBase64 Schema Validation Problem

From: Zafar Abbas <zafara@microsoft.com>
Date: Thu, 12 Aug 2004 12:16:58 -0700
Message-ID: <563BD3496D37BB4B9F4E8F896A58F2B30238BC51@RED-MSG-50.redmond.corp.microsoft.com>
To: "Francis Lang" <francislang@redlinesoftware.co.uk>, <xmlschema-dev@w3.org>

You will have to import a schema for the urn:schemas-microsoft-com:datatypes namespace in your parent schema, and then add a reference to the 'dt' attribute on the element PDFFILE.

-----Original Message-----
From: xmlschema-dev-request@w3.org [mailto:xmlschema-dev-request@w3.org] On Behalf Of Francis Lang
Sent: Thursday, August 12, 2004 5:41 AM
To: xmlschema-dev@w3.org
Subject: BinaryBase64 Schema Validation Problem


I'm not sure if you'll be able to help me/maybe you know someone who can?
Basically 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: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" />

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

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

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 anything you may know about it.

Many thanks,

Francis Lang
Received on Thursday, 12 August 2004 19:18:26 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:23 UTC