SitePoint Sponsor |
|
User Tag List
Results 1 to 13 of 13
-
Oct 25, 2006, 02:00 #1
- Join Date
- Oct 2006
- Posts
- 6
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Can XHTML support user defined tags?
Hi
I am new to use XHTML.
We have in our project some output which suppost to embed into XHTML,
Something like this.
<div id="xxx" class="yyy">
<UserDefinedtag1 a="5834" b="855" result="0">
<UserDefinedtag2 a="5834" b="855" result="0"/>
<UserDefinedtag2 a="5844" b="853" result="0"/>
</UserDefinedtag1>
</div>
does XHTML support user defined tags?
-
Oct 25, 2006, 03:34 #2
- Join Date
- Nov 2004
- Location
- Ankh-Morpork
- Posts
- 12,158
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Well, you can supply your own DTD and make it validate, but no browser will understand the semantics of those tags.
Birnam wood is come to Dunsinane
-
Oct 25, 2006, 04:04 #3
- Join Date
- Oct 2006
- Posts
- 6
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thanks AutisticCuckoo,
Is that mean XHTML does not support user defined tag in normal condition?
The only difference btween HTML and XHTML is well-formed tags.
What is meant by EXtensible in XHTML(EXtensible HyperText Markup Language) ?
-
Oct 25, 2006, 04:33 #4
- Join Date
- Sep 2006
- Location
- Nottingham, UK
- Posts
- 3,133
- Mentioned
- 1 Post(s)
- Tagged
- 0 Thread(s)
Best thing is probably to use XSLT to tranform it into XHTML. You can make up your own tags as AutisticCuckoo said, but nothing will happen with them as the browser won't know what to do with them. They won't be displayed.
-
Oct 25, 2006, 04:42 #5
- Join Date
- Oct 2006
- Posts
- 6
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thanks a lot for such quick reply Stormrider,
I jst got one more problem in id attribute for component while validating xhtml.
my
id="links/user_links?ID=5834&sessionID=A2ED57A34E438F0C6"
it give character "/" is not allowed in the value of attribute "id".
So is there any limitation or criteria on id value?
-
Oct 25, 2006, 04:56 #6
- Join Date
- Sep 2006
- Location
- Nottingham, UK
- Posts
- 3,133
- Mentioned
- 1 Post(s)
- Tagged
- 0 Thread(s)
I think ID can only be alphanumeric, but I'm not sure on the requirements for this... anyone else?
-
Oct 25, 2006, 05:24 #7
- Join Date
- Dec 2002
- Location
- Aylmer, QC, Canada
- Posts
- 409
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
4.1.3 Characters and cases
In CSS 2.1, identifiers (including element names, classes, and IDs in selectors) can contain only the characters [A-Za-z0-9] and ISO 10646 characters U+00A1 and higher, plus the hyphen (-) and the underscore (_); they cannot start with a digit, or a hyphen followed by a digit. Only properties, values, units, pseudo-classes, pseudo-elements, and at-rules may start with a hyphen (-); other identifiers (e.g. element names, classes, or IDs) may not. Identifiers can also contain escaped characters and any ISO 10646 character as a numeric code (see next item). For instance, the identifier "B&W?" may be written as "B\&W\?" or "B\26 W\3F".
-
Oct 25, 2006, 05:42 #8
- Join Date
- Oct 2006
- Posts
- 6
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thanks Karinne,
I am still not clear about id.
XHTML attribute 'id' is anywhere related to CSS2.1 specification?
do we have any such W3C draft for XHTML attributes?
-
Oct 25, 2006, 05:43 #9
Originally Posted by mitra4umohit
-
Oct 25, 2006, 05:45 #10
- Join Date
- Nov 2004
- Location
- Ankh-Morpork
- Posts
- 12,158
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by mitra4umohit
It's rather more complicated than that.
You can extend XHTML, but you need to write a plug-in for all browser to make any sort of semantic sense of it, like people have done for some extensions (SVG, MathML, ...).
Extensibility is not as useful as one might like to believe.Birnam wood is come to Dunsinane
-
Oct 25, 2006, 05:46 #11
- Join Date
- Dec 2002
- Location
- Aylmer, QC, Canada
- Posts
- 409
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by mitra4umohit
ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons (":"), and periods (".").
And here are the differences between XHTML and HTML
-
Oct 25, 2006, 07:25 #12
- Join Date
- Oct 2006
- Posts
- 6
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thank you Karinne
-
Oct 25, 2006, 07:43 #13
- Join Date
- Dec 2002
- Location
- Aylmer, QC, Canada
- Posts
- 409
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
No problem ... glad I could help.
Bookmarks