|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Searching in Sub-children from an Array
Houman Khorasani wrote: Hi > Just out of curiosity; do you have a simple example how this > should work as meta data? Sounds interesting... I'm not sure what you mean. Do you want a meta-stylesheet sample? The principle is verry simple: you have an XML document (looking alike XSLT or not) and your stylesheet transform it itself in a stylesheet. So a generated stylesheet, that can be in turn used to transform other XML input. I think it was the subject of the Mike's talk at XML 2006. By the way Mike, do you plan to make some paper available from your talk? Here is a simple example, not verry usefull, but giving the idea: (drkm)[27] ~/xslt/tests$ cat meta-stylesheet.xsl <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:x_="http://www.w3.org/1999/XSL/TransformAlias" version="2.0"> <xsl:namespace-alias stylesheet-prefix="x_" result-prefix="xsl"/> <xsl:output indent="yes"/> <xsl:template match="/"> <x_:stylesheet version="2.0"> <x_:template match="/"> <html> <head> <title>...</title> </head> <body> <xsl:apply-templates select="page/para"/> </body> </html> </x_:template> </x_:stylesheet> </xsl:template> <xsl:template match="para"> <x_:for-each select="{ @select }"> <p> <x_:value-of select="."/> </p> </x_:for-each> </xsl:template> </xsl:stylesheet> (drkm)[28] ~/xslt/tests$ cat meta-stylesheet.xml <page> <para select="any XPath expression selecting nodes"/> </page> (drkm)[29] ~/xslt/tests$ saxon meta-stylesheet.xml \ meta-stylesheet.xsl <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"> <xsl:template match="/"> <html> <head> <title>...</title> </head> <body> <xsl:for-each select="any XPath expression selecting nodes"> <p> <xsl:value-of select="."/> </p> </xsl:for-each> </body> </html> </xsl:template> </xsl:stylesheet> (drkm)[30] ~/xslt/tests$ Regards, --drkm ___________________________________________________________________________ Dicouvrez une nouvelle fagon d'obtenir des riponses ` toutes vos questions ! Profitez des connaissances, des opinions et des expiriences des internautes sur Yahoo! Questions/Riponses http://fr.answers.yahoo.com
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Cast Your Vote
We need your help – Vote for DataDirect XML Products!
Winners and finalists announced at SOA World Conference in November. 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
|







