Welcome to WebmasterWorld Guest from 23.23.62.93

Forum Moderators: incrediBILL

Message Too Old, No Replies

Custom DTD: document type does not allow element "s" here

Trying to add the s element to XHTML 1.1 element, how to allow s element?

   
2:53 pm on Aug 18, 2011 (gmt 0)

WebmasterWorld Senior Member jab_creations is a WebmasterWorld Top Contributor of All Time 10+ Year Member



I'm trying to add strike support to an editor I'm working on though HTML5 has too many issues and XHTML 1.1 works beautifully for the most part. The s element is a valid part of HTML5 and seems at least decently supported so I'm trying to add it to my XHTML 1.1 doctype as so...

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" [<!ELEMENT s (PCDATA | Inline*)>]>


Unfortunately I get the following error with the W3C validator...

document type does not allow element "s" here


I'm not sure how to allow the element though?

- John
1:00 am on Aug 19, 2011 (gmt 0)

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Where is "here"? Are you sure there isn't an earlier issue that is cascading to the s element's position?
2:19 am on Aug 19, 2011 (gmt 0)

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month



I was going to say "later issue". You can't get much earlier than the DTD :) I've seen the "element such-and-such isn't allowed here" line more often than I care to say, but never in response to something occurring after the actual word "ELEMENT". Usually it's a complaint involving &. Conversely, if there's a problem with the DTD itself, usually the validator digs in its heels and refuses to proceed.
3:04 am on Aug 19, 2011 (gmt 0)

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Ah, now I think I get it. Are you sure the W3C validator supports a customized DTD?
1:57 pm on Aug 19, 2011 (gmt 0)

WebmasterWorld Senior Member jab_creations is a WebmasterWorld Top Contributor of All Time 10+ Year Member



A paragraph or span element, preferably both just so I can see how to add support for multiple elements (the separator) as this seems to be poorly documented (or to somehow select a "class" of text-module related elements if such classes exist).

Yes, it does Ted. My site's frameset adds a rule for the border attribute which is necessary to remove the border (you can't with CSS in any way).

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd" [<!ATTLIST frameset border CDATA #IMPLIED>]>


- John