[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XSL questions

Subject: Re: XSL questions
From: David Carlisle <davidc@xxxxxxxxx>
Date: Fri, 2 Jun 2006 00:41:42 +0100
Re:  XSL questions
> I can use another editor to make the change. The problem is the html
> tags don't serve its funcation when a html file is genereated with the
> XSL file.  

> Not a solution?

As I say XSLT doesn't care about validity if you want html elements in
there then it will generate them. The file you showed wasn't HTML
(having Para element etc,so presumably you are extracting the html from
there with another process. If that is breaking the html then you will
need to look at that.

> The id is an attribute of the node looping. I guess I should count the
> node itself. But, the editor doesn't allow me.

Sorry I can't guess what you intend here. count() tells you the number of
nodes in the node set supplied as its argument, if you count a node set
consisting of "the node itself" then you will clearly get the answer 1,
always. Presumably you mean something else?


> That serves the same function. But, it is not what I am asking for. I
> need to find out whether there is an element met the condition after
> the loop. 

You are querying the source document which is unchanging so whether the
elements meet the condition is the same bfore after or during the loop.
<xsl:variable name="x" select=..."/>
<xsl:for-each select="$x">
...
</xsl:for-each>
<xsl:if test="$x[$current_id = @relatedPerson]"> some nodes met the
condition</xsl:if>

David


________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

Current Thread

Back To School Sale!

Save 30% off all Stylus Studio 2008 Products when you purchase from our Online Shop.

Offer ends August 31, 2008.

Coupon Code
TRTY-C4JV-OFF

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.