Use local-name(). That ignores the namespace declaration: <xsl:for-each select="//*[local-name()='item'] | //*[local-name()='entry']"> ... </xsl:for-each>
On 7/20/06, Kervin L. Pierre <[EMAIL PROTECTED]> wrote: > Hello, > > We have been dealing with this issue off-and-on for a > few months now so I really hope someone has some > insight to this issue for us. > > We've noticed that if an XML document has a default > namespace defined using the 'xmlns' attribute, eg... > > <?xml version="1.0" encoding="UTF-8"?> > <BackgroundReports > xmlns="http://ns.hr-xml.org/2006-02-28" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://ns.hr-xml.org/2006-02-28 > file:///C:/BackgroundReports.xsd" version="2006-02-28" > xml:lang="en"> > [...] > > Then XPath requires a colon prefix to work. So the > regular '/BackgroundReports/@version' does not work > but '/:BackgroundReports/@version' does. > > This causes us problems because what if the user did > not specify a default namespace in the document and > rather the schema file was noted to the parser > separately? Now we have to have two versions of XPath > for each action. > > If I remove the default namespace, then the path > without the colon works, but now the document can not > be validated whilst being parsed. > > Does anyone have any tips/tricks to get ColdFusion to > work well with a XML default namespaces? > > Best regards, > Kervin > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/cf_lists/message.cfm/forumid:4/messageid:247182 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

