Sign In/My Account | View Cart  
advertisement

Article:
 Little Back Corners
Subject: Namespaces, namespace prefixes and node names...
Date: 2004-03-05 08:22:17
From: Philip Fennell

There is another area where this 'feature' of XPath also shows itself, and thats when you are processing other documents that have been obtained using the document() function.


If, for example, you are processing an RDF file that contains information about related resources:


<xsl:variable name="resources" select="document(resources.rdf)"/>
<xsl:apply-templates select="$resources"/>


Your template matches will have to use the XPath expressions like the following:


<xsl:template match="node()[local-name() = 'Description']">

<xsl:value-of select="node()[local-name() = 'title']"/>


Which is tedious to say the least!


Thank heavens for JEdit's abbreviations :-)



Previous Message Previous Message   Next Message Next Message


Sponsored By: