|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: xsl/xslt coding standard
Jim,
> I think Jeni's suggestion of adding to xsl:stylesheet doesnt make
> any sense...for example if your document is HTML format; what
> happens if you also use HTML namespace in a literal result
> element...as part of your result tree ?
You wrap the HTML in an element that isn't HTML and mark that
wrapper element's namespace as being the documentation element
namespace:
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:doc="http://www.example.com/documentation"
xmlns="http://www.w3.org/1999/xhtml"
documentation-element-prefixes="doc">
<xsl:template match="/">
<doc:doc>
<p>This is the <em>main template</em>...</p>
</doc:doc>
...
</xsl:template>
</xsl:stylesheet>
> Also meta data, such as doc, should be able to live on its on, after
> any kind of extraction or transform process (....something like
> Xinclude or even non-xml processing )...which means that putting
> this data in the enclosing stylesheet element as an attribute is not
> a precise enough resolution....though admittedly it would be a pain
> to have to explicitly add namespace declaration to each <meta:doc/>
> tag.
You mean that having a processor extracting documentation from a
stylesheet would have trouble identifying it because it would have to
parse the documentation-element-prefixes attribute in order to work
out which namespace(s) it should be looking at?
I guess that's true, but I was thinking that most
documentation-generating tools would have their own namespace for the
documentation that they extracted, and would thus know in advance
which elements they'd want to extract; I wasn't imagining that there'd
be general documentation-extraction tools that could take any
documentation-oriented markup language known to humankind and
transform that into something readable.
But having said all that, I'm perfectly at ease with a xsl:doc element
or something similar, as long as it doesn't constrain what I put
inside it.
Cheers,
Jeni
---
Jeni Tennison
http://www.jenitennison.com/
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
|

Cart








