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

Re: Getting a specific element count from a generic ma

Subject: Re: Getting a specific element count from a generic match
From: "M. David Peterson" <xmlhacker@xxxxxxxxx>
Date: Fri, 14 Apr 2006 04:07:24 -0600
xslt multiple element count
Hi Folks,

Bit late to the game here...

Dr. Kay, as mentioned in email, I will look into this and see what
might be the problem.

I'll ping back this thread when I have more detail.

On 4/14/06, M. David Peterson <xmlhacker@xxxxxxxxx> wrote:
>
> Hi Folks,
>
> Bit late to the game here...
>
> Dr. Kay, as mentioned in email, I will look into this and see what might be the problem.
>
> I'll ping back this thread when I have more detail.
>
>
>
>  On 4/11/06, Michael Kay <mike@xxxxxxxxxxxx> wrote:
> >  > Isn't this purely a fault with the stylesheet, rather than being
> > > specific to saxon.net?
> >
> > The reported problem was that the compile-time error messages were not being
> > displayed: so yes, the stylesheet is known to have errors; the problem is
> > with the display of diagnostics.
> >
> > Michael Kay
> > http://www.saxonica.com/
> >
> > >
> > > Look at the stylesheet:
> > >
> > > > 1 <?xml version="1.0" encoding="utf-8"?>
> > > > 2 <xsl:stylesheet version="2.0"
> > > > 3 x mlns:xsl="http://www.w3.org/1999/XSL/Transform">
> > > > 4
> > > > 5 <xsl:variable name="namelist"
> > > > select="distinct-values(//*/node-name())"/>
> > > > 6
> > > > 7  <xsl:variable name="root" select="/"/>
> > > > 8
> > > > 9 <xsl:template match="/">
> > > > 10   <xsl:for-each select="$namelist">
> > > > 11     <xsl:variable name="thisname" select="name()"/>
> > > > 12     <name value="{$thisname}"
> > > > count="{count($root//*[name() = $thisname])}"/>
> > > > 13   </xsl:for-each>
> > > > 14 </xsl:template>
> > > > 15
> > > > 16 </xsl:stylesheet>
> > >
> > > Here $namelist contains a list of items of xdt:anyAtomicType yet it's
> > > trying to be used as a list of nodes (when name() is called on each
> > > item in the sequence).  Saxon is probably staticly aware of this which
> > > is why its not compiling the stylesheet, whereas other processors wont
> > > reveal the error until runtime....
> >
> >
>
>
>
>
> --
> <M:D/>
>
> M. David Peterson
> http://www.xsltblog.com/



--
<M:D/>

M. David Peterson
http://www.xsltblog.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.