E
engwar
How do you created a DTD that will allow for node with the same name
at different places in the XML document?
Here's my XML
<parentNode>
<someNode>
<myNode/>
</someNode>
</parentNode>
<parentNode>
<someOtherNode>
<myNode/>
</someNode>
</parentNode>
Here's my dtd
<!ELEMENT parentNode (someNode|someOtherNode)
<!ELEMENT someNode (myNode)>
<!ELEMENT myNode (#PCDATA)>
<!ELEMENT someOtherNode (myNode)>
<!ELEMENT myNode (#PCDATA)>
The problem is that if both of these nodes can have a myNode child
node then the application I'm using to validate my XML (Oxygen XML
editor) says that my Element type "myNode" must not be declared more
than once.
I'm new to XML so this is probably easy. Is my dtd really incorrect
here?
Thanks.
at different places in the XML document?
Here's my XML
<parentNode>
<someNode>
<myNode/>
</someNode>
</parentNode>
<parentNode>
<someOtherNode>
<myNode/>
</someNode>
</parentNode>
Here's my dtd
<!ELEMENT parentNode (someNode|someOtherNode)
<!ELEMENT someNode (myNode)>
<!ELEMENT myNode (#PCDATA)>
<!ELEMENT someOtherNode (myNode)>
<!ELEMENT myNode (#PCDATA)>
The problem is that if both of these nodes can have a myNode child
node then the application I'm using to validate my XML (Oxygen XML
editor) says that my Element type "myNode" must not be declared more
than once.
I'm new to XML so this is probably easy. Is my dtd really incorrect
here?
Thanks.