Hi all,
I understand namespaces are a big topic in this forum and I have gone through a lot of the material on here, but have a bit of a more specific question.
My source xml is along the lines of:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<City xmlns="http://somenamespace.com">
<Street>
<House>my cottage</House>
.....
As you can see there is a default namespace.
In my xslt I have defined a prefix set to that namespace, and if I use this prefix in any xpath it works fine, e.g:
Code:
<xsl:stylesheet xmlns:xyz="http://somenamespace.com">
...
<xsl:value-of select="xyz:City/xyz:Street/xyz:House" />
...
The value-of is within a template that is called based on the match "*|/", i.e. everything.
Like I say, this works fine, but I have a large stylesheet and want to avoid using xyz: in front of every tag.
Is there a way to tell the stylesheet every tag is in this namespace? Basically so I can use a value-of such as "City/Street/House".
Removing even one of these xyz: prefixes currently returns nothing.
Thanks in advance,