Jump to content

namespace?


damaq
 Share

Recommended Posts

Hello,

 

Probably a basic question..

 

If i have an XML with

 

<AA:estimate>something</AA:estimate>

 

How do i arrange that for example <xsl:value-of select="AA:estimate"/> can be used without the AA.. So i want to refer to it as: <xsl:value-of select="estimate"/>

 

Regards,

DAMAQ

Link to comment
Share on other sites

  • 3 weeks later...

Chiming in here because I have a similar problem.

 

My xml to be transformed is

<cm:name>texthere</cm:name>

I've added xmlns:cm="http://example.org" exactly as it is written to the stylesheet declarations as such

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" ... xmlns:cm="http://example.org">

And my xslt code is

<xsl:variable name="var" select="cm:name"/> 

"var" is returned blank and I'm really at an impasse as to how to access this data.

 

damaq, you might find this helpful: http://w3schools.invisionzone.com/index.php?showtopic=48839&hl=namespace#entry270426

Edited by jbru
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...