[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] XPath equivalent to xsl:apply-templates?
Hi Folks, I have inserted XPath code into an XML document, e.g., <identifier>$ARPT_row/ICAO</identifier> I wrote some code that extracts the XPath code and generates an XSLT template: <xsl:template match="airports/airport/identifier"> <xsl:param name="ARPT_row" tunnel="yes"/> <identifier> <xsl:value-of select="$ARPT_row/ICAO"/> </identifier> </xsl:template> In some cases, I want to generate an XSLT template that has an xsl:apply-templates, e.g., <xsl:template match="airports"> <xsl:param name="ARPT_row" tunnel="yes"/> <airports> <xsl:for-each select="$ARPT.XML/ARPT/row"> <xsl:apply-templates select="current()/*"> <xsl:with-param name="ARPT_row" tunnel="yes" select="."/> </xsl:apply-templates> </xsl:for-each> </airports> </xsl:template> What XPath code to put in the XML document <airports> element: <airports>???</airports> The xsl:for-each can be replaced with the XPath "for" statement: <airports>for $i in $ARPT.XML/ARPT/row return ???</airports> Do you have suggestions for an XPath that results in generating xsl:apply-templates? Is there an XPath equivalent to xsl:apply-templates? (Not sure if that question makes sense) [As I recall Dimitre is working to show how every construct in XSLT can be represented in XPath. Okay, Dimitre, what's the XPath equivalent of xsl:apply-templates?] /Roger
|
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
|