-
XDR schemas within DOM document
I am attempting to use the DOMDocument object to create and edit XML files
with inline XDR schemas. Using Microsoft's cryptic documentation, I believe
I have correctly instructed the DOMDocument object to created a valid
sample schema, which produces the following XML output:
<?xml version="1.0"?>
<DocumentContent xmlns:data="x-schema:#InlineSchema">
<Schema name="InlineSchema" xmlns="urn:schemas-microsoft.com:xml-data"
xmlns:dt="urn:schemas-microsoft-com:datatypes">
<ElementType name="Hierarchy" minOccurs="1" maxOccurs="1" content="eltOnly">
<element type="TreeNode"/>
</ElementType>
<ElementType name="TreeNode" minOccurs="0" maxOccurs="*" content="eltOnly">
<AttributeType name="NodeKey" dt:type="id"/>
<AttributeType name="Caption" dt:type="string"/>
<element type="TreeNode"/>
</ElementType>
</Schema>
<Hierarchy/>
</DocumentContent>
However, when invoking the Validate method of the DOMDocument object, it
always returns the response: "Validate failed because the root element had
no associated DTD/schema"
Likewise, any methods which rely on explicit data type definitions (such
as nodefromID) also return null results.
Can anyone please explain what I need to do in order to activate the defined
schema? Also, if anyone can suggest a reference source which explains DOM
more clearly than Microsoft's
own documentation, it would be very helpful.
Many thanks for your help
Tim Coulter
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks