cancel
Showing results for 
Search instead for 
Did you mean: 

Query on variables in XSL language

Former Member
0 Kudos

how variables are declared in XSL and how they are used?

Accepted Solutions (1)

Accepted Solutions (1)

former_member181999
Contributor
0 Kudos

Hello

Folk,

<b>XSLT Transform</b>

The root element that declares the document to be an XSL style sheet is <xsl: stylesheet> or <xsl: transform>.

Note: <xsl: stylesheet> and <xsl: transform> are completely synonymous and either can be used.

<b>The correct way to declare an XSL style sheet according to the W3C XSLT Recommendation is:</b>

Or:

<b>To get access to the XSLT elements, attributes and features we must declare the XSLT namespace at the top of the document.</b>The xmlns:xsl="http://www.w3.org/1999/XSL/Transform" points to the official W3C XSLT namespace. If you use this namespace, you must also include the attribute version="1.0".

I hope I answered your question. It was nice answering your question. Feel free to reach SDN if you have any questions.

Thanks in advance for your co-operation

Ashok Babu

Enterprise Business process Architect

SAP XI Senior Consultant

Answers (2)

Answers (2)

udo_martens
Active Contributor
0 Kudos

Hi Sankar,

you can declare with

<xsl:variable name="myVariable" select="myXPathExpression> </xsl:variable>

An alternative is to create the content between the tags:

<xsl:variable name="myVariable">myContent></xsl:variable>

They are <b>not</b> real variable (nomen est non omen), as they cant change the value! If you want to have something like variables in other languages (f e Java or ABAP), you have to construct tricky <a href="/people/udo.martens/blog/2006/04/26/xslt-recursive-templates Templates</a>

Regards,

Udo

Former Member
0 Kudos

Hi,

There is a gr8n source of information on XSL is,

<b>http://www.w3.org/Style/XSL/</b>

Regards,

Akshay.

    • reward points if find useful.