saxon document() location

J

Johannes Busse

hello NG,

(1) I have a data-structure like the following:

<element name="abc">
<source href="http://some.where.there/file/name.xhtml#location" />
</element> ...
<element> ...


(2) under some.where.there i have the file /file/name.xhtml, which has
a division like

<div name="location">
... some xhtml-content ...
</div>

I want to include only this division of this file.
My solution would be to write an XSLT-stylesheet,
which collects all
locations in all external files, like

<xsl:template match="element">
<xsl:variable name="externalFile" select="XXXX" />
<xsl:variable name="externalLocation" select="YYYY" />
<xsl:copy-of
select="document($externalFile,.)//*[@name="$externalLocation"]
</xsl:template>

my question: how do I have to compute the XXXX and YYYY with saxon? I
guess there should be some functions like "give the file part" or
"give the location part"?

(or is there a more straight forward solution?)

thank you!


herzliche Grüße
Johannes Busse
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,007
Latest member
obedient dusk

Latest Threads

Top