473,379 Members | 1,355 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

Problem with xml:variable in xsl:for-each

Hi!

I have simple code to rebuild where is a lot of loops which looks like this
one:

<xsl:for-each select="TextBox">

<xsl:if test="@dataSource='formUlicaOR'">

{<xsl:value-of select="@text"/>}

</xsl:if>

</xsl:for-each>
As You know reviewing document a lot of time to get one variable in each
time is not good idea. But I can't do this in one loop, becouse this tags
can be set in diferent position in each time.
I tried to do something like this:

<xsl:for-each select="TextBox">

<xsl:if test="@dataSource='formUlicaOR'">

<xsl:variable name="formNazwaOR" select="@text"/>

</xsl:if>

</xsl:for-each>
But after end of for-each loop the veriables was unapproachable.

If You can give me some advice what i should do - I will be thankful.
Konki


Jul 20 '05 #1
1 998
Hi,

Tempore 10:17:05, die Wednesday 06 July 2005 AD, hinc in foro {comp.text.xml} scripsit Konkee <lu**********************@speednet.pl>:
I tried to do something like this:

<xsl:for-each select="TextBox">

<xsl:if test="@dataSource='formUlicaOR'">

<xsl:variable name="formNazwaOR" select="@text"/>

</xsl:if>

</xsl:for-each>


make the 'xsl:variable' element wrap the 'xsl:for-each':

<xsl:variable name="formNazwaOR">
<xsl:for-each select="TextBox">
<xsl:if test="@dataSource='formUlicaOR'">
<xsl:value-of select="@text"/>
</xsl:if>
</xsl:for-each>
</xsl:variable>

but I don't really get why the following code won't work:
<xsl:variable name="formNazwaOR" select="TextBox[@dataSource='formUlicaOR']"/>

regards,
--
Joris Gillis (http://users.telenet.be/root-jg/me.html)
Spread the wiki (http://www.wikipedia.org)
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Tom | last post by:
Hey all, I've been planning to get myself started with DocBook for quite some time now, so when I unexpectedly encountered a task for which DocBook might actually be very useful, I thought I'd...
3
by: Jacques | last post by:
I'm experiencing the following problem The source xml file uses a prefix (wpl:) and look like this (shortened): ----------------------------------------------------------------- <?xml...
3
by: wassil | last post by:
i am newbie and i want create my own web build on XMLand XSL technology. i would like to know if exist some SW where is possible easy create a web page (something like Wysiwyg XML/XSL editor)...
2
by: mmgarciaiii | last post by:
Hi everyone, I am performing an XSL transformation on IIS 5 with a dot net application and I am getting the following error message: This is an unexpected token. The expected token is...
2
by: mmgarciaiii | last post by:
Hi everyone, I am performing an XSL transformation on IIS 5 with a dot net application and I am getting the following error message: This is an unexpected token. The expected token is...
3
by: Martin Olson | last post by:
I'm trying to output valid xhtml 1.0 transitional with xslt -- my question is when dealing with elements that have self-closing tags such as <img /> and <input />... I'm getting closing tags on...
1
by: telescient telescient via .NET 247 | last post by:
(Type your message here) How to transform xml variable to xsl file using asp.net using vb.net -------------------------------- From: telescient telescient ----------------------- Posted by a...
19
by: rnbrady | last post by:
Hi folks New around here. This post may be a duplicate, I think I bungled the previous one. I've recently started out with XML and XSL and I'm very impressed with both. My use is non-web in...
1
by: Praveen | last post by:
Have a common function in Javascript which do transform for all .xsl's. XSL object is loaded like this. var xslobj=new ActiveXObject("MSXML2.FreeThreadedDOMDocument.4.0"); xslobj.async = false;...
1
by: Sala | last post by:
Hi ExpertS! I'll create one website in asp.net with c#. If i am using Xml Xsl, Is support all d controls like asp.net controls? bcos i'll use image files and video files in this website. So If...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.