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

RE: Easy question, big headache.

Subject: RE: Easy question, big headache.
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Tue, 11 Mar 2008 08:33:24 -0000
RE:  Easy question
> And I need to output some of these records, but not all of 
> them. The rules upon which I decide to output are complex, 
> and I won't bore you with the details.

Unfortunately it all depends on the detail.

If you can express the rules in an XPath expression EXP, then you can do:

<xsl:for-each select="record[EXP]">
  <xsl:copy-of select="."/>
  <xsl:if test="position() mod 5 = 0">
    <marker/>
  </xsl:if>
</xsl:for-each>

In XSLT 2.0 this always works - because EXP can call a stylesheet function
that can do any computation you like. In 1.0 it rather depends on EXP.
> 
> In any other language, it's easy easy:
> 

Writing in a language you know is always easier than in one that's new!

Michael Kay
http://www.saxonica.com/

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

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-2013 All Rights Reserved.