cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Curro, Joseph" <>
Subject RE: [Help!] Concatenating @attributes as parts of XSLT apply-temp late tags
Date Mon, 10 Apr 2000 14:01:04 GMT
I'm not 100% sure if this will work, but you might want to try XPaths
"concat" function.  Something like:

	<xsl:apply-templates select="document(concat("mydirectory/",@file))"

just might do the trick.


-----Original Message-----
From: Stuart Roebuck []
Sent: Monday, April 10, 2000 6:43 AM
Subject: [Help!] Concatenating @attributes as parts of XSLT
apply-template tags

This problem is really causing difficulties...any help very much

I'm having trouble trying to concatenate attributes in apply-template  
tags.  I think the easiest way of explaining the problem is to give an  

I have the following <xsl:template match="..."> XSLT template that works

  <xsl:template match="include">
   <xsl:apply-templates select="document(@file)" />

Given an XML document with the construct:

  <include file="filename.xml" />

It takes the content of the file 'filename.xml' and incorporates it into  
the document.


I want to be able to put that file in a different directory without  
changing the <include...> tag entry.

I therefore what to produce a template something like:

  <xsl:template match="include">
   <xsl:apply-templates select="document(mydirectory/@file)" />  <!-- THIS  

I don't seem to be able to concatenate the attribute reference '@file'  
onto the end of a root file URL.

Am I trying to do something impossible, or is there a syntax to get round  
this kind of problem?

For non-XSLT tags I think I could get away with: 'mydirectory/{@file}' but  
that doesn't seem to work with the <xsl apply-templates...> tag.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message