[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Structured metadata within XSLT?

Subject: Structured metadata within XSLT?
From: Ed Staub <estaub@xxxxxxxx>
Date: Mon, 13 Nov 2000 09:51:52 -0500
xslt metadata
I'm interested in adorning stylesheets with structured information about
them.  

For instance, a template might include documentation about its intended
usage, structured in such a way that it could be processed by parsing the
stylesheet.  This could be of great use in providing better tools for using
XSLT.

AFAIK, the only "official" mechanism for including metadata in a stylesheet
is 
	<!-- comment -->
This obviously doesn't support XML-based structure within it.

I believe that "phantom" unimplemented extension elements can be used to
provide structure, if a null <xsl:fallback/> is provided with each use.  For
example:

<xsl:template name="adder">
	<xsl:param name="addend1"/>
	<xsl:param name="addend2"/>
	<myspace:templateDoc>   <!-- myspace is an extension element prefix
-->
		<description>Adds two numbers together.>
		<params>
			<param name="addend1" type=xsd:integer>First number
to add.</param>
			<param name="addend2" type=xsd:integer>Second number
to add.</param>
		</params>
		<result>The sum is output as an integer.</result>
		<xsl:fallback/>
	</myspace:templateDoc>
	<xsl:value-of select="$addend1 + $addend2"/>	<!-- much ado about
very little -->
</xsl:template>

I believe this is a hack; I would very much prefer that XSLT provide generic
elements specifically for metadata.  Something like W3C Schema's
<annotation>,<appinfo>, and <documentation> elements would be sufficient;
see http://www.w3.org/TR/xmlschema-1/#Annotation_details.  

I have two questions:

1.) Can anyone see any problems with the extension-element-based usage
pattern in the example?

2.) Is anyone on the W3C XSL WG supportive enough of this notion to
recommend that the WG add "encapsulating metadata" (or similar) to the XSLT
Version 2 requirements?


Thanks,

-Ed Staub


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.