Re: Template Matching an Element Containing a Namespace Spec
Martin Honnen <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.layout.xslt |
|---|---|
| Organization | Liberty Development |
| Message-ID | <[email protected]> |
Patrick Timmins wrote:
> <SOAP-Env:Envelope
> xmlns:SOAP-Env='http://schemas.xmlsoap.org/soap/envelope'>
> <SOAP-Env:Body>
> <OUTER1 xmlns="urn:goobity-hoobity">
> <INNER>
> My Inner 1
> </INNER>
> <INNER>
> My Inner 2
> </INNER>
> </OUTER1>
> </SOAP-Env:Body>
> </SOAP-Env:Envelope>
> <xsl:stylesheet
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0"
xmlns:SOAP-Env="http://schemas.xmlsoap.org/soap/envelope"
xmlns:gh="urn:goobity-hoobity">
> <xsl:apply-templates select="//OUTER1" />
<xsl:apply-templates select="//gh:OUTER1"/>
> <xsl:template match="OUTER1">
<xsl:template match="gh:OUTER1">
> <xsl:template match="//INNER">
<xsl:template match="gh:INNER">
In the stylesheet you can choose any prefix to bind it to the default
namespace URI in the XML input document. But you have to use a prefix
bound to the URI in your XPath expressions and match patterns.
--
Martin Honnen
http://JavaScript.FAQTs.com/