turugina #6635(2008/07/01 04:25 GMT) [ XSLT ] Rating0/0=0.00
XSLT 2.0 ならregexが使えるので、
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:my="uri:ja.doukaku.org:my-functions" exclude-result-prefixes="my" > <xsl:output method="text" /> <xsl:template match="/" > <xsl:value-of select="my:remove_comment('AAA')" /> <xsl:text>
</xsl:text> <xsl:value-of select="my:remove_comment('AAA/*BBB*/')" /> <xsl:text>
</xsl:text> <xsl:value-of select="my:remove_comment('AAA/*BBB')" /> <xsl:text>
</xsl:text> <xsl:value-of select="my:remove_comment('AAA/*BBB*/CCC')" /> <xsl:text>
</xsl:text> <xsl:value-of select="my:remove_comment('AAA/*BBB/*CCC*/DDD*/EEE')" /> <xsl:text>
</xsl:text> <xsl:value-of select="my:remove_comment('AAA/a//*BB*B**/CCC')" /> <xsl:text>
</xsl:text> </xsl:template> <xsl:function name="my:remove_comment" as="xs:string"> <xsl:param name="str" as="xs:string" /> <xsl:value-of select="fn:replace($str, '/\*.*?(\*/|$)', '')" /> </xsl:function> </xsl:stylesheet>
Rating0/0=0.00-0+
[ reply ]
turugina
#6635()
[
XSLT
]
Rating0/0=0.00
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:my="uri:ja.doukaku.org:my-functions" exclude-result-prefixes="my" > <xsl:output method="text" /> <xsl:template match="/" > <xsl:value-of select="my:remove_comment('AAA')" /> <xsl:text>
</xsl:text> <xsl:value-of select="my:remove_comment('AAA/*BBB*/')" /> <xsl:text>
</xsl:text> <xsl:value-of select="my:remove_comment('AAA/*BBB')" /> <xsl:text>
</xsl:text> <xsl:value-of select="my:remove_comment('AAA/*BBB*/CCC')" /> <xsl:text>
</xsl:text> <xsl:value-of select="my:remove_comment('AAA/*BBB/*CCC*/DDD*/EEE')" /> <xsl:text>
</xsl:text> <xsl:value-of select="my:remove_comment('AAA/a//*BB*B**/CCC')" /> <xsl:text>
</xsl:text> </xsl:template> <xsl:function name="my:remove_comment" as="xs:string"> <xsl:param name="str" as="xs:string" /> <xsl:value-of select="fn:replace($str, '/\*.*?(\*/|$)', '')" /> </xsl:function> </xsl:stylesheet>Rating0/0=0.00-0+
[ reply ]