Lincoln wrote:
How do I get source:fragment in SourceWritingTransformer to contain:

1. A document on the file system. I have tried:
<source:fragment>
  <xi:include href="rect.svg" xmlns:xi="http://www.w3.org/2001/XInclude"/>
</source:fragment>

It seems like this should work, as long as you have the XIncludeTransformer run before the SourceWritingTransformer in your pipeline so the xi:include gets expanded.


and I tied...

<source:fragment>
  <xsl:value-of select="document(rect.svg)"/>
</source:fragment>


2. A xml nodeset at run time. I have tried
<source:fragment>
  <xsl:value-of select="$mySvg"/>
</source:fragment>

Neither of these will work because xsl:value-of only writes out the descendant text nodes. xsl:copy-of should work better.

Currently I can only write a file to the file system if its pasted inside
<source:fragment>
  <svg xmlns="http://www.w3.org/2000/svg"; width="100" height="100">
    <rect width="100" height="100" />
  </svg>
</source:fragment>

If you place a <map:serialize type="xml"/> directly before the SourceWritingTransformer stage (or use a cocoon view) it will show you what that transformer is getting as input. It should look the same whether it comes from the source XML or an XInclude etc. so this will allow you to verify that.


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