xsl-list
[Top] [All Lists]

Re: [xsl] XSL - Documentation

2009-05-14 05:15:23
David Carlisle wrote:

The restriction is only a restriction on the authoring of the
documentation, not where it appears. With the method I suggested if you
put a (namespaced) id attribute on any element internal to the template
then you can sticka <xhtml:span (or div or p or anything elese)  with a
namedspaced ref attribute and that documentation will be taken as
documenting the xslt instruction with the id, and shown just before that
instruction.

So the only thing you can't directly document using this method is a
literal result element, but that isn't so much of a restriction as you
can always use an emty xsl:text to carry the documenttation.

Do you mean the doco 'external' to the template now
idrefs into the template? Is that it?

Sneaky - and effective! Tiny bit more processing than weaving,
but meets the need.

Full xhtml solution Ken!


<xhtml:p>This template matches foo and makes a table</xhtml:p>
<xhtml:span doc:ref="aaa">
this is a literal result element to make a table
</xhtml:span>
<xsl:template match="foo">
...
<xsl:text doc:id="aaa"/>
<table>
<thead>...


</xsl:template>






regards

--
Dave Pawson
XSLT XSL-FO FAQ.
http://www.dpawson.co.uk

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>