LISTSERV mailing list manager LISTSERV 16.0

Help for EAD Archives


EAD Archives

EAD Archives


EAD@LISTSERV.LOC.GOV


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

EAD Home

EAD Home

EAD  February 2008

EAD February 2008

Subject:

Re: Testing sibling nodes

From:

[log in to unmask]

Reply-To:

Encoded Archival Description List <[log in to unmask]>

Date:

Fri, 1 Feb 2008 08:45:33 +0100

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (39 lines)

Hello Bob, 

Bob Walser on Thursday 31 January 2008 20:17:

> I have an XSL question. I'm trying to select <c0x> entries with 
> certain <pername>s in the <unittitle> (always a child of <did>) but 
> my xsl only finds those where the searched-for name occurs first 
> (when there are multiple names). How can I fix the test? Here is what I 
> have:
>                 <xsl:for-each select="//*[@otherlevel='init' and 
> (contains(./did//persname, $SearchName) or 
> contains(./did//persname/@normal, $SearchName))]">
>                         <xsl:call-template name="init-display"/>
>                 </xsl:for-each>
> The problem is that (contains(./did//persname $SearchName)) only 
> tests the first <persname> in a given unittitle. Can someone tell me 
> how to address this?



You're working in XSLT 1.0, which gives you the first instance and lets
you get away with it. 

In XSLT 2.0 you'd get a Run-time error. In Saxon:
XPTY0004: A sequence of more than one item is not allowed as the first
argument of contains() ("Frans Laarmans", "Jules Valenpint", ...) 
Transformation failed: Run-time errors were reported


You might try 

<xsl:for-each select="//*[@otherlevel='init']/did//persname[contains(., $SearchName) 
or contains(@normal, $SearchName)]">


Cheers, 

Dirk van Laanen

Top of Message | Previous Page | Permalink

Advanced Options


Options

Error during command authentication.

Error - unable to initiate communication with LISTSERV (errno=111). The server is probably not started.

Log In

Log In

Get Password

Get Password


Subscribe or Unsubscribe

Subscribe or Unsubscribe


Archives

ATOM RSS1 RSS2



LISTSERV.LOC.GOV

CataList Email List Search Powered by the LISTSERV Email List Manager