[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Outputting A tag information
Hello, I have a XML document <p>aaaaa<a href="http://www.domain1.com/">Text1</a>bbbbb<a href="http://www.domain2.com/">Text2</a>ccccc</p> I am trying to output this in Text format as: aaaaa Text1 http://www.domain1.com/ bbbbb Text2 http://www.domain2.com/ ccccc Here's the code I am using. I see text output for P tag but I do not see any results for 'a' tag. It looks like it does not match with 'a' tag. <xsl:apply-templates select="document($xmlfile)" mode="proc-txt"/> <xsl:template match="//p" mode="proc-txt"> <xsl:text> </xsl:text>  <xsl:value-of disable-output-escaping="yes" select="string(normalize-space(.))"/>  </xsl:template> <xsl:template match="a" mode="proc-txt"> <xsl:variable name="oldurl" select="@href"/> <xsl:choose> <xsl:when test="contains($oldurl,'?')"> <xsl:text> </xsl:text><xsl:value-of disable-output-escaping="yes" select="string(concat($oldurl, '&', 'ETS=[[etsnum]]', '&', 'PID=[[profileid]]'))" />  </xsl:when> <xsl:otherwise> <xsl:text> </xsl:text><xsl:value-of disable-output-escaping="yes" select="string(concat($oldurl, '?', 'ETS=[[etsnum]]', '&', 'PID=[[profileid]]'))" />  </xsl:otherwise> </xsl:choose> </xsl:template> Any help is greatly appreciated. Thanks Vivek 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
|