Rainer Häner wrote:

> hallo,
> i want to include single-nodes or fragments of xml-documents.
>  
> simply i can do this with a stylesheet
>  
> <xsl:template match="xlink">
> ...
> <!-- show attributes -->
> <xsl:value-of select="@pathToFile"/>
> <!-- => docs/samples/xml-file.xml -->
> <xsl:value-of select="@xpathExpression"/>
> <!-- => /document/title -->
>  
> <xsl:copy-of select="document(@pathToFile)/document/title"/>
> <!-- okay -->
>  
> <xsl:copy-of select="document(@pathToFile)/@xpathExpression"/>
> <!-- dosn't work -->
> ...
> </xsl:template>
>  
> the xpathExpression is variable, depending on the xml-document, which
> is transformed by the stylesheet:
>  
> suggestions? i there a way do handle this problem with logicsheets, 
> for example:
>
> XSPUtil.includeSource(<xsl:copy-of select="$pathToFile"/>, null, 
> this.resolver, this.contentHandler);
>
> the complete file is included
>

XInclude transformer can include only part of the document.

<xinclude:include href="path/to/file#xpointer(/xpath/expression)"/>

Vadim


> thanks for your help in advance
>
> rainer
>




---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>

Reply via email to