Subject: RE: [xsl] container list display problem From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Thu, 02 May 2002 15:46:38 -0400 |
I haven't tried to understand your detailed logic but the parent::c02[last()] test looks wrong. A node has exactly one parent so the predicate [last()] is always true.
Regards, Wendell
Michael,
I am sure I'm doing this wrong as I am a newbie at coding XSL. I am trying to find if the parent of the container ¯ the parent of the <did> that houses the <container> tag ¯ also has the same container number. So if the subseries ends and another series starts, but they are both microfilmed on the same reel, then the reel number is not repeated.
How do I test that in XSL? I tried your suggestion, but unfortunately it doesn't solve the problem.
Thanks very much for responding so quickly. I am really amazed at the generosity of people on this list to help even newbies like me.
Loren
¯------------------------------------------------------------ Date: Wed, 1 May 2002 15:01:55 +0100 From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx> Subject: RE: [xsl] container list display problem
> I have been using a style sheet that supports an XML DTD > called EAD - Encoded Archival Description. .... > > <xsl:when test="(../preceding-sibling::c03[1]//did/container > @type='reel']=$reelnumber > or parent::c02[last()]/did/container[@type='reel']=$reelnumber)"> > I haven't tried to understand your detailed logic but the parent::c02[last()] test looks wrong. A node has exactly one parent so the predicate [last()] is always true. You obviously don't want to select the "last parent" because there is only one. Perhaps you want to test whether the parent is the last child of its own parent? In that case the condition would be parent[not(following-sibling::*)].
====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] container list display pr, Loren Scherbak | Thread | RE: [xsl] container list display pr, Wendell Piez |
Re: [xsl] <xsl:for-each> Looping he, Zoe Peng | Date | Re: [xsl] <xsl:for-each> Looping he, J.Pietschmann |
Month |