Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- XHTML DTD
- David Manheim
July 14, 2005, 7:08 am
rate this thread
I am writing an XHTML extension, to add some attributes to all xhtml
objects, so that for any object, I can have "<a href="http://aol.com "
text="This is a note that is useful for me">
I tried the following dtd, and I'm not sure why it won't work: it
accepts the html tags in the file, but not any of the extended tags.
I'm not sure why.
<!ENTITY % aaa-attrs
"required (true | false) #IMPLIED
readonly (true | false) #IMPLIED
random %Text; #IMPLIED"
<!ENTITY % xhtml11.dtd
PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd " >
<!-- Then add aaa-attrs to the common attributes -->
<!ENTITY % Common.attrib
Re: XHTML DTD
Defining Common.attrib before you include the XHTML 1.1 DTD
won't help since parameter entites must be defined before they are
used, and unless they are defined in the internal subset you will have
a lot of undefined PEs in Common.attrib. The %Text; PE reference you're
using in aaa-attrs is also undefined.
Furthermore, you define aaa-attrs but then you use %aaa-attrs.attrib;.
As David Carlisle said in your multi-posted message to comp.text.xml,
you can use Common.extra.attrib which is "empty" by default. However,
this won't really work either since the readonly attribute will be
defined twice for some element types.