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

Re: variable question

Subject: Re: variable question
From: Bruce D'Arcus <bdarcus@xxxxxxxxxxxxx>
Date: Tue, 31 Aug 2004 09:04:41 -0400
Re:  variable question
On Aug 31, 2004, at 8:33 AM, Jeni Tennison wrote:

One solution is to declare the parameter of the function so that it
accepts an empty sequence. Instead of:

<xsl:param name="relatedItem" as="element(mods:relatedItem)" />

which says that $relatedItem must be one-and-only-one
<mods:relatedItem> element, use:

<xsl:param name="relatedItem" as="element(mods:relatedItem)?" />

That solves it.


Here's the example output FYI:

http://www.users.muohio.edu/darcusb/misc/test-author-year.xhtml

You can see where the rule gets applied to the first record. So the function may well look at the mods:relatedItem details (in this case, the book), but that is only to know what to do with the main mods:titleInfo content (the chapter title).

Bruce

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.