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

Re: Total Missing documents for each Event‏

Subject: Re: Total Missing documents for each Event‏
From: David Carlisle <davidc@xxxxxxxxx>
Date: Fri, 09 Apr 2010 17:00:02 +0100
Re:  Total Missing documents for each Event‏
Either I'm not understanding your requirements or your code is vastly more complicated than needed (or both)

i think you just want

<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="event_template">
<xsl:variable name="x"
<xsl:for-each select="event">
For event <xsl:value-of select="position()"/>
list is: <xsl:value-of select="$x[not(.=current()/document_type/@sp_document_type)]"
<xsl:text> count </xsl:text>
<xsl:value-of select="count($x[not(.=current()/document_type/@sp_document_type)])"/>
additional docs: <xsl:value-of select="document_type/@sp_document_type[not(.=$x)]"
<xsl:text> count </xsl:text>
<xsl:value-of select="count(document_type/@sp_document_type[not(.=$x)])"/>


which makes

$ saxon9 list.xml list.xsl <?xml version="1.0" encoding="UTF-8"?>

For event 1
list is: PSC Minutes,Internal Approval,Rationale,Trade Instructions,IPS count 5
additional docs: count 0
For event 2
list is: PSC Minutes,Internal Approval,Trade Instructions,IPS count 4
additional docs: count 0
For event 3
list is: PSC Minutes,Internal Approval,Rationale,Trade Instructions,IPS,Final Client Models count 6
additional docs: Analyst count 1

The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs. ________________________________________________________________________

Current Thread


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.
First Name
Last Name
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.