Subject: [xsl] xsl:copy, mode and source code From: Dave Jarvis <djarvis@xxxxxxxxxxxxxxxx> Date: Fri, 27 Aug 2004 10:05:44 -0700 |
<axe:message type="response"> <pingResult><axe:value-of select="pingOutput" /></pingResult> </axe:message>
<axe:message type="response"> <nesting level="1"> <pingResult><axe:value-of select="pingOutput" /></pingResult> </nesting> </axe:message>
<xsl:template match="axe:message[@type='response']"> AGENT_m.append( <xsl:apply-templates mode="response" /> ); </xsl:template>
<xsl:template match="@*|node()" mode="response"> X<xsl:copy><xsl:apply-templates select="@*|node()" /></xsl:copy> </xsl:template>
<xsl:template match="*" mode="response"> Y<xsl:apply-templates /> </xsl:template>
<!-- Used by "axe:var", but may be applicable here ... --> <xsl:template match="*|text()"> "<xsl:copy-of select="." />" <xsl:if test="position() != last()">+</xsl:if> </xsl:template>
AGENT_m.append( X X Y AGENT_pingOutput );
AGENT_m.append( "<pingResult>" + AGENT_pingOutput + "</pingResult>" );
<xsl:template match="@*|node()"> "<<xsl:value-of select="name()" />>"+ <xsl:apply-templates /> + "</<xsl:value-of select="name()" />>" </xsl:template>
Sincerely, Dave Jarvis
P.S. I'm using libxslt from http://xmlsoft.org/XSLT/.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] [slightly OT]Universal Tu, Jerry Kimmel | Thread | RE: [xsl] xsl:copy, mode and source, Michael Kay |
RE: [xsl] [slightly OT]Universal Tu, Jerry Kimmel | Date | [xsl] Generating an HTML with a nav, Shlomi Fish |
Month |