Sign In/My Account | View Cart  
advertisement

Article:
 Little Back Corners
Subject:
Date: 2004-02-26 03:26:46
From: Ian Young

I'm not sure I've fully understood the context of the question being answered.
In an XSLT stylesheet, one would simply declare a namespace for the default namespace in the input document and use that in XPath expressions:


<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dft="http://mydomain/schemas" xmlns:gml="http://www.opengis.net/gml">
<xsl:output method="text" encoding="UTF-8"/>
<xsl:template match="/">
<xsl:value-of select="count(//dft:FeatureCollection/gml:featureMember)"/>
</xsl:template>
</xsl:stylesheet>


Wouldn't you be able to do that when using XPath expressions outside XSLT?


No Previous Message Previous Message   Next Message Next Message


Titles Only Titles Only Newest First

  • 2004-02-26 11:28:12 Oleg Tkachenko [Reply]

    Sure. With additional namespace-binding infrastrucure of course.
    E.g. in MSXML there is SelectionNamespaces property and in .NET there is XmlNamespaceManager to facilitate exactly this issue.



Sponsored By: