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

Dynamicly Generate a apply-templates match pattern.

Subject: Dynamicly Generate a apply-templates match pattern.
From: "Peter Charles" <petefc@xxxxxxxxxxxxxxxxx>
Date: Wed, 18 Aug 2004 14:33:38 -0700
apply templates match
Hello,

I have an html template into which I would like to place structures
generated from a separate xml document.

My html template looks like this:

<html xmlns:rui="user.interface">
    <header>
        <title>
            <rui:insert type="title" match="pageDisplayName"/>
        </title>
    </header>
    <body>
        <rui:insert type="pageheader" match="document('header.xml')"/>
    </body>
</html>

In my main xslt I have a global variable (content) that holds the node set
for I will transform into my html template:  the node set looks like this:

<results>
    <page>
            <pageDisplayName>Page Title</pageDisplayName>
            <body>
                <content>some content</content>
            </body>
    </page>
</results> 

I would like to be able to transform my html template so that the match
attribute of my rui:insert element is used to generate an apply-templates
select statement.

The template would be something like this:

    <xsl:template match="rui:insert">
        
        <xsl:apply-templates select="$content/@match"/>

	</xsl:template>    

I realize that this is not a legal template match pattern, but if anyone
knows a method to dynamically generate the match pattern, It would be much
appreciated.

Thanks

Peter

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.