[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: elements in a namespace
> I'm just disappointed in that there's no way to define a default namespace > for references to source tree elements. Hmm which makes it rather inconvenient to take a stylesheet that works with instances of an XML DTD if those instances are then embedded into a larger document using a namespace based mechanism. eg I might have (in fact I have:-) stylesheets for MathML that all look like <xsl:template match="apply/diff" ..... If it ends up that MathML gets embedded into some larger scheme such as docbook (or even html) via a namespace which might be of the form say <math xmlns="http://www.w3.org/Math/MathML/1.0"> <apply> <diff/> ... (I just made that namespace uri up, currently there isn't an official mathml namespace) then I have to change all my stylesheet to have xmlns:mml="http://www.w3.org/Math/MathML/1.0" somewhere (OK) and mml: everywhere (not so good). I can't off hand see how I could write an XSL transformation to add the namespace prefix either, as recognising source tree elements in the stylesheet isn't so easy. (Unless I looked for each of the elements in MathML individually.) Perhaps the moral is: If you think that an XML application may sometimes be used in a namespace, _always_ use it via a namespace. Something to raise at the Math WG teleconference this afternoon.... David XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|