xsl-list
[Top] [All Lists]

Template to return XML

2003-10-16 22:45:47
Hello,

I need a template to return a subset of XML from the xml source.  I'm trying
to populate a variable with this information.  How can I do this?
Example:

<A>
    <B>
        <ASDF/>
        <QWEA/>
        <FEASI/>
    </B>
    <C/>
</A>


So, a template that will return (as an example) <B> and its subset of data.
Something like

<xsl:template name="get_subset_xml">
    .... select the <b> node
</xsl:template>

More importantly, how do I assign a variable to this new subset?
So:

<xsl:variable name="some_subset" select="get_subset_xml"/>

where $some_suset is:
    <B>
        <ASDF/>
        <QWEA/>
        <FEASI/>
    </B>


Is this possible?
Karl


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



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