|
Posted by Horace A. 'Kicker' Vallas on September 28, 2007, 5:34 pm
Please log in for more thread options hi Andre
And thanks! The second methid works fine and does allow the w3
validator to pass - but, when viewing pages, FF and IE display the
closing "]>" characters -- Opera looks fine and does not show
those two characters
I couldn't get the first method to work (meaning to pass the
validator) --- probably not pointing to the edited file correctly
or something
anyway - thanks again!
André Gillibert wrote:
> Horace A. 'Kicker' Vallas wrote:
>
>
>> QUESTION:
>>
>> does anyone know how we can add a new ELEMENT to an existing w3
>> dtd - or tell the doctype to add it or use an additional dtd in
>> the doctype etc. etc. etc.
>>
>
> You can create a custom external declaration subset file, derived from the
> W3C one:
> 1) Download
> http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
> 2) Edit it to add your element:
>
> <!ELEMENT ourtag EMPTY>
> <!ATTLIST ourtag id CDATA #REQUIRED>
> <!ENTITY % head.misc "(script|style|meta|link|object|isindex|ourtag)*">
>
> 3) Use a system identifier refering to your file in the document type
> declaration. You may also define a registred or unregistred formal public
> identifier.
>
> Or, you may add these declarations in the internal declaration subset:
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
> [
> <!ELEMENT ourtag EMPTY>
> <!ATTLIST ourtag id CDATA #REQUIRED>
> <!ENTITY % head.misc "(script|style|meta|link|object|isindex|ourtag)*">
> <!--
> overrides the declaration contained in xhtml1-transitional.dtd
> ... Just hope that it won't be modified someday -->
> ]>
> <html xmlns="http://www.w3.org/1999/xhtml">
> <head>
> <title>Extra element test!</title>
> <ourtag id="id"/>
> </head>
> <body>
> <p>Hello</p>
> </body>
> </html>
>
> Of course, keep in mind that your page will be valid XML, but won't
> conform to the XHTML 1.0 recommandation.
> You mustn't expect normal user agents to render your page properly.
> They may choke on this element. Most probably, they'll ignore it.
>
> If you want to extend the XHTML language, you may also use XML namespaces.
> The document won't be strictly conforming to the recommandation, but it
> may at least be conforming.
> XML namespaces are supposed to be the "normal" way of extending the
> language.
> http://www.w3.org/TR/xhtml1/#docconf
>
--
Horace ...once known as "Kicker" :-)
================================================================
...drop by and chat if I'm online http://www.hav.com/chat/ ...or chuckle at a little left hand
fingertip torture http://www.hav.com/junk/
After silence, that which comes nearest to expressing the
inexpressible is music - Aldous Huxley, "Music at Night", 1931
... and that which comes nearest to explaining the inexplicable
is my insistence on trying to play it - hav '06 :-))
================================================================
Horace Vallas hav.Software http://www.hav.com/ 4660 Francisco Rd. hav@hav.com
Pensacola, Fl. 32504
USA 850-207-7009
Thawte Web Of Trust Notary in Pensacola, Fl.
http://www.hav.com/?content=/thawteWOTnotary.htm ================================================================
What is a Vet? ... He is the barroom loudmouth, dumber than five
wooden planks, whose overgrown frat-boy behavior is outweighed a
hundred times in the cosmic scales by four hours of exquisite
bravery near the 38th parallel. ... - Unknown
================================================================
|