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

Re: How can I declare node sets explicitly?

Subject: Re: How can I declare node sets explicitly?
From: Eric van der Vlist <vdv@xxxxxxxxxxxx>
Date: Fri, 13 Oct 2000 17:09:04 +0200
xsl declare node set
Matthias,

"Matthias O. Will" wrote:
> 
> Kay Michael wrote:
> 
> > The select attribute of xsl:apply-templates must be a node-set, not a string.
> >
> I would like to specify a node set explicity and declare it in a
> variable. For the moment, I am doing something like,
> 
> <xsl:apply-templates="(field1)|(field2)|(field3)"/>
> 
> but in order to provide easier extensibility, I would like to declare
> this elsewhere. However, as you pointed out,

Depending of what kind of extensibility you are looking for ;=) you may
consider defining your list of field as an entity...

for instance:

<!DOCTYPE xsl:stylesheet [
<!ENTITY fields "(field1)|(field2)|(field3)">
]>

and then

<xsl:apply-templates="&fields;"/>

Hope this helps.

Eric
> 
> <xsl:variable name="local_field">
>     (field1)|(field2)|field3)
> </xsl:variable>
> 
> won't work because then $local_field is a string and not a node set.
> 
> Do you have any suggestion for me?
> 
> Thanks for your help and best regards,
> Matthias
> 
> --
> Matthias O. Will (m.o.will@xxxxxx)                       <><
> Institute of Computer Science,       University of Freiburg
> Georges-Koehler-Allee, Bldg. 51, D-79110 Freiburg,  Germany
> Phone:   +49-761-203-8170             Fax: +49-761-203-8162
> URL:     http://ad.informatik.uni-freiburg.de/~will
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

-- 
------------------------------------------------------------------------
Eric van der Vlist       Dyomedea                    http://dyomedea.com
http://xmlfr.org         http://4xt.org              http://ducotede.com
------------------------------------------------------------------------


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.