Hi,
Can anyone tell me if it is possible to create a XSD schema document
that will only allow certain elements to be displayed as available
within the instance document depending on say a parameter the user has
entered in the parent element?
For example:
In the instance document I have the following...
<file-layout xmlns="test"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="test file:/D:/test.xsd"
name="myLayout"
locale="en_GB"
lastModifiedBy="Joe Bloggs"
type="BINARY">
'type' is a required attribute. Depending on if the user selects ASCII
or BINARY from the selection I want the instance document to then
display an appropriate child element.
For example, there may be a choice of either <ascii-parse> or
<binary-parse> as child elements. Both are distinctly different, and I
want the schema document (using the choice made by the user when
selecting 'type') to manage the validity of the instance document and
not have my code that reads in the instance document to have to check
to see if the user has made a mistake by say selecting type=ASCII and
then selecting <binary-parse> as the child element.
Any help would be appreciated.
Thanks.