C
Collin VanDyck
Hello!
I'm relatively new to writing DTDs, so be gentle with me
I'm writing a DTD to validate XML documents that script my product which
managed XHTML.
I want to use the DTD to enforce basic, high level structure but I don't
want to account for every single type of element that could be in the
script document.
For instance, I want to allow this:
<script>
<add-page>
<name>testPage</name>
<content>
ALL SORTS OF XHTML CONTENT GOES HERE
</content>
</add-page>
</script>
In my DTD I specify the rules for the script, add-page, name, and
content elements. However, I want to allow all sorts of markup in the
content element without having to account for it in the DTD.
In other words, if the user supplies:
<script>
<add-page>
<name>testPage</name>
<content>
<b>Hi!</b>
</content>
</add-page>
</script>
Then I get an error when validating because 'b' was not defined as an
element.
Any ideas, or is this not possible using DTD ?
thanks,
Collin
I'm relatively new to writing DTDs, so be gentle with me
I'm writing a DTD to validate XML documents that script my product which
managed XHTML.
I want to use the DTD to enforce basic, high level structure but I don't
want to account for every single type of element that could be in the
script document.
For instance, I want to allow this:
<script>
<add-page>
<name>testPage</name>
<content>
ALL SORTS OF XHTML CONTENT GOES HERE
</content>
</add-page>
</script>
In my DTD I specify the rules for the script, add-page, name, and
content elements. However, I want to allow all sorts of markup in the
content element without having to account for it in the DTD.
In other words, if the user supplies:
<script>
<add-page>
<name>testPage</name>
<content>
<b>Hi!</b>
</content>
</add-page>
</script>
Then I get an error when validating because 'b' was not defined as an
element.
Any ideas, or is this not possible using DTD ?
thanks,
Collin