Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
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. If anyone could help me out a bit, it would be much


<!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/D TD/xhtml11.dtd" >

<!-- Then add aaa-attrs to the common attributes -->

<!ENTITY % Common.attrib


David  Manheim wrote:

Quoted text here. Click to load it

I guess your post is missing the end... From what I can see so far:

You must declare your version of 'Common.attrib' before you reference the
An entity declaration is ignore, if the entity already exist. So in order to
'override' something from the original DTD, you must make your declarations
before referencing it.

On a side note: I used the Core.extra.attrib entity for custom attributes
shared by all elements. As this is empty by default, you won't have to
'copy'n modify' stuff from the DTD. And I guess that's the preferred and
intended way to do this.

Benjamin Niemann
Email: pink at odahoda dot de
WWW: http://www.odahoda.de /

Site Timeline