Re: [xsl] xsl/xslt coding standard

Subject: Re: [xsl] xsl/xslt coding standard
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Sat, 17 Aug 2002 12:04:12 +0100

> 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
> 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

<xsl:stylesheet version="2.0"

<xsl:template match="/">
    <p>This is the <em>main template</em>...</p>

> 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.



Jeni Tennison

 XSL-List info and archive:

Current Thread