Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="UTF-8"?>
- <document xmlns="my:coolNamespace"
- xmlns:dork="my:geekyNamespace">
- <note>This is totally cool.</note>
- <dork:note>Oops, I'm not cool.</dork:note>
- <lanparty xmlns="my:geekyNamespace"
- xmlns:dork="my:coolNamespace">
- <note>Awesome, now I'm kind of cool.</note>
- <dork:note>Yeah I'm no good at these games.</dork:note>
- </lanparty>
- </document>
- <?xml version="1.0" encoding="UTF-8"?>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:cool="my:coolNamespace"
- xmlns:geek="my:geekyNamespace">
- <xsl:output method="text"/>
- <xsl:template match="/">
- Cool person says:
- <xsl:apply-templates select="//cool:note"/>
- Geeky person says:
- <xsl:apply-templates select="//geek:note"/>
- </xsl:template>
- <xsl:template match="*[local-name() = 'note']">
- <xsl:value-of select="."/><xsl:text>
</xsl:text>
- </xsl:template>
- </xsl:stylesheet>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement