[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: HTML + CSS to XML + CSS - what about namespaces?
Hi Lisa, > Before: > <a href="http://www.w3.org/">online</a> > > After: > <html:a html:href="http://www.w3.org/" > xmlns:html="http://www.w3.org/TR/REC-html40">online</html:a> > > My question is this: > The initial html document may (and probably would) have had accompanying CSS > style sheets, but now these style sheets refer to elements as they were > before transformation (ie. without the explicit namespace). Is there any way > to incorporate namespace into CSS, or do I need to recreate the style > sheets? Two thoughts: 1. The simplest way may be perhaps using a default namespace declaration: <a xmlns="http://www.w3.org/TR/REC-html40" href=...."> ... I.e. you have to modify your XSL stylesheets accordingly. Now you have all your HTML elements within the HTML namespace and the CSS isn't affected. 2. Regarding your given example: I think this should be <html:a href="http://www.w3.org/" xmlns:html="http://www.w3.org/TR/REC-html40">online</html:a> i.e. the href attribute is *not* prefixed. I belongs to the a element of the HTML namespace and that's it. Comments? Cheers, Oliver /-------------------------------------------------------------------\ | ob|do Dipl.Inf. Oliver Becker | | --+-- E-Mail: obecker@i... | | op|qo WWW: http://www.informatik.hu-berlin.de/~obecker | \-------------------------------------------------------------------/ *************************************************************************** This is xml-dev, the mailing list for XML developers. To unsubscribe, mailto:majordomo@x...&BODY=unsubscribe%20xml-dev List archives are available at http://xml.org/archives/xml-dev/ ***************************************************************************
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|