|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: "Instantiating a template" ?
Sony Antony wrote:
1. I saw a mention about "data driven" vs "template driven" paradigms for XSLT transformations. But I could not see any detailed description of these 2 fundamentally different strategies. I thought XSLT is essentially data driven with the input XML solely deciding which templates to pick for execution.
The "pull" style is often used if the source is well known and usually "data" like XML under full control of the parties working on it (standardized or agreed upon before and machine generated). The "push" style, which relies on matching templates, is better suited for "document" style XML, especially if there is mixed content. 2. I also saw a lot of mention about "Instantiating" a template. What exactly is "Instantiating". I thought its just "executing" the template like a subroutine. "Instantiating" means nodes are put into the result tree. You can think of it as "executing" if you like. 3. Is there a technique/function that will show me the type of a node ( Element vs Attribute vs text ) at run time.
<xsl:template match="node()"> <xsl:apply-templates select="." mode="node-type"/> <xsl:apply-templates/> </xsl:template> 4. What s the difference between the following 3 template defs <xsl:template match="*"> <xsl:template match="node()"> <xsl:template match="//*">
5. If I have the following 2 templates <xsl:template match="*"> stuff1 </xsl:template> <xsl:template match="a/b/c"> stuff2 </xsl:template>
J.Pietschmann 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








