XSLTransform Problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I try to transform xml that has default namespac
For example
<Root xmlns="http://BlaBla.Com"><SomeContent></SomeContent></Root

Then if I use the following xslt Iâ?Tm getting no results because it expecting the namespace

<xsl:template match="/"><xsl:value-of select="// SomeContent" /></xsl:template

How can I make the xslt transfor
Run under the default namespac
TN
 
Bnaya,

Unfortunately, you iwll have to change your transformation. The item
represented by <Root
xmlns="http://BlaBla.Com"><SomeContent></SomeContent></Root> is very
different from the one represented by
<Root><SomeContent></SomeContent></Root>. Think of it as being two separate
types (which is what they are). While they might have different
definitions, they are still types.

You will have to change the transformation to take any namespace (I do
not know if this is possible, I'd have to look), or to take nodes with that
specific namespace.

Hope this helps.
 
Back
Top