Hey Scott

The doctype that you are using:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>

doesn't contain the elements that you are using in your code:

<window>
   <titlebar>mycontent</titlebar>
   <content>mycontent</content>
</window>

...so your document is invalid.  I'm not going to jump up & down about
it must be valid or you will burn in the infernal pits for eternity,
but I can say that if its not valid you're going to have a bastard of
a time debugging it & working out whats a bug in your code & whats a
bug in a browser.

So how do you get this stuff to validate? XHTML's got a feature that
allows you to specify your own doctypes to extend the default set of
tags & attributes, or to override what is already there. I don't know
a huge amount about this but some googling could turn up some useful
stuff. The main reason why this feature has been discussed over the
past year or so is that XHTML doesn't have a target attribute on <a>
tags so people have been tweaking doctypes to add it in & stay valid.

But.... I'm pretty sure that in most cases creating your own doctype
is not going to be the easiest or best idea. My gut feel is that a bit
of XSL is probably more suited to what you are trying to do.

Could you convert:

<window>
   <titlebar>mycontent</titlebar>
   <content>mycontent</content>
</window>

into:

<div class="window">
   <div class="titlebar">mycontent</div>
   <div class="content">mycontent</div>
</div>

using XSL?


Cheers

Mark (who will be in training until tuesday so don't expect any quick
follow up).
*****************************************************
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
***************************************************** 

Reply via email to