LISTSERV mailing list manager LISTSERV 15.5

Help for XML-L Archives


XML-L Archives

XML-L Archives


View:

Next Message | Previous Message
Next in Topic | Previous in Topic
Next by Same Author | Previous by Same Author
Chronologically | Most Recent First
Proportional Font | Monospaced Font

Options:

Join or Leave XML-L
Reply | Post New Message
Search Archives


Subject: Re: Dynamic include
From: Richard Light <[log in to unmask]>
Reply-To:General discussion of Extensible Markup Language <[log in to unmask]>
Date:Wed, 13 Sep 2000 12:19:51 +0100
Content-Type:text/plain
Parts/Attachments:
Parts/Attachments

text/plain (28 lines)


In message <[log in to unmask]>, Iain Campbell
<[log in to unmask]> writes
>Using XSLT's document() function (thanks Richard) I am able to insert the
>contents of a separate file into an XML document resulting from an XSLT
>transformation. However, I would like the included file to be selected
>dependent upon the contents of the initial XML file (ie. the text within the
><article> tag):

Obviously (!) the included document has to be well-formed XML.

Apart from that, the only problem I can see with your code is here:

><xsl:value-of select="document('{$article}')//include"/>

where you should have:

<xsl:value-of select="document($article)//include"/>

The inner quotes mean that you are asking for a document whose filename
is the literal string {$article}

You don't need the curly brackets either.

Richard.

Richard Light
SGML/XML and Museum Information Consultancy
[log in to unmask]

Back to: Top of Message | Previous Page | Main XML-L Page

Permalink



LISTSERV.HEANET.IE

CataList Email List Search Powered by the LISTSERV Email List Manager