Sullivan, Mark E wrote:
Does xerces provide an easy way strip namespaces from an xml DOM documentIf you have a default namespace then you can refer to the elements from that namespace with Xalan if you put a ":" before the element name. For instance
after it is in memory? I would like to use XPath expressions from the Xalan
distro, but it does not support default namespaces. Unfortunately i do not
have control over the structure of the document, so i cannot change this.
thanks, mark
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns="someNamespace">
<xsl:template match="/">
<count-of-element1>
<xsl:value-of select="count(//:element1)"/>
</count-of-element1>
</xsl:template>
</xsl:stylesheet>
of course you can define a proxy for the namespace and use that, so the following stylesheet is equivalent with the previous one:
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:test="someNamespace">
<xsl:template match="/">
<count-of-element1>
<xsl:value-of select="count(//test:element1)"/>
</count-of-element1>
</xsl:template>
</xsl:stylesheet>
Regards, George
------------------------------------------------------------- George Cristian Bina mailto:[EMAIL PROTECTED] COO - sync.ro Phone +40-51-461480(1) Fax +40-51-461482 Mobile +40-93-224067 SyncRO Soft srl, Bd N. Titulescu 170, Craiova, 1100 - Romania http://www.sync.ro <oXygen/> XML Editor - http://oxygen.sync.ro/
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
