Subject: Validating XML Using XSD...
From: "XSL List" <xsl-list@xxxxxxxxxxxxx>
Date: Mon, 18 Nov 2002 04:13:48 -0000
|
Hi All,
I a newbie to validation of XML via XSD, and I am trying to write a Schema to validate some XML that I am using as part of an application that Iam building. I have managed to get the XSD to validate the XML successfully. I am now stuck at a particular point...
I need only to make sure that certain elements and attributes exist within the XML. I need the XML to be allowed to contain elements/attributes that are not specified within the XSD schema. Can anyone help me out with this.
An example of what I mean...
I need a schema that would ensure that the XML contained ALL of the following...
<servers>
<server name="pdc">192.168.0.1</server>
<server name="bdc">192.168.0.2</server>
</servers>
However, I need that same schema to allow the following...
<servers>
<server name="pdc" type="exchange">192.168.0.1</server>
<server name="bdc" type="www">192.168.0.2</server>
</servers>
...here the type attribute has been added, essentially I need the schema to ignore it.
Thanks in anticipation.
Scot.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|