OZONE Asylum
Forums
XML - XSL - XSLT - XHTML - CSS - DOM
Exactly what is XHTML
This page's ID:
21753
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
[quote] Am i correct in saying that XML is used to translate the XHTML document to other platforms such as PDA's? [/quote] Not sure, but an Xhtml document is, in essence, an XML document. Many PDAs don't need more translation and can read xhtml as is. XHTML is a [i]sub-set[/i] of Xml, so basically, any xhtml page is already an xml document. [quote] The purpose is to be able to share structured information between formats, including html. [/quote] Yeah, that's one of the purposes. Basically, I am sorry I made a simple thing look complicated, so here are a few recommendations: a) write any text document of your own, name it "*.xml", and open it in Iexplore. Magic! Iexplore displays the structure of your xml document as a tree if it is well formatted. Beware of accents and such, make your first xml document as simple as possible. It just needs the following line at the top: <?xml version="1.0"?> The rest should be your own markups, whatever they may be: [chicken][/chicken], [bread][/bread] b) when you tie an XSL stylesheet to your xml, it will be parsed and transformed. Hop to http://www.w3schools.org to see how some xml could be changed to html using xsl. c) basically, the DTD of a document, or it's namespace, tell us the grammar of that document. Did you ever try to follow the link to the xhtml dtd? Yes, that line you add in all your xhtml "doctype" declaration. Here: http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd Surprise: dtd stands for "document type definition" and it is yet another text file. Basically, understand this: xhtml is a subset of xml, html is not. So any xhtml page is xml, but not all xml documents are xhtml. What makes xhtml strict is it's dtd: it defines the grammar of that subset of xml. DTDs, xml files, xsl files are all text files, can be made with notepad and read/used/viewed/ with IE (and Mozilla for that matter). You only need a dtd if you want to make your new subset of xml public and available, so that others write it the same way you do. In the dtd link above, note how all html4 elements are redefined: [code] <!ELEMENT table (caption?, (col*|colgroup*), thead?, tfoot?, (tbody+|tr+))> <!ELEMENT caption %Inline;> <!ELEMENT thead (tr)+> <!ELEMENT tfoot (tr)+> <!ELEMENT tbody (tr)+> <!ELEMENT colgroup (col)*> <!ELEMENT col EMPTY> <!ELEMENT tr (th|td)+> <!ELEMENT th %Flow;> <!ELEMENT td %Flow;> [/code] This sole document, and the fact browsers are equipped to display xhtml, make xhtml work. When your page is validated by the w3c, it is validated against this. for example, the line <!ELEMENT thead (tr)+> means that the ELEMENT or TAG named "thead" (lowercase) can only contain one to many (tr) elements. (tr)+ here means one to many. Similarly, the <!ELEMENT tr (th|td)+> statement means that tr tags can contain one to many th/td elements. etc.. [small](Edited by [internallink=947]InI[/internallink] on 05-12-2004 12:42)[/small]
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »