on 10-05-2007 5:59 AM
how variables are declared in XSL and how they are used?
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.