Hi, Alessandro.

Alessandro Zummo <azummo-li...@towertech.it> wrote on 01/02/2010 09:29:38 
AM:
>   I'm using the barcode4j extension for xalan with
>  a template like this one:
> 
> [...]
> <barcode:barcode message="00000" orientation="0"> 
>         <barcode:code128>
>           <barcode:height>8mm</barcode:height>
>         </barcode:code128>
> </barcode:barcode>
> 
>  which works nicely. However, the extension generates
>  a complete svg document, while I'd need only an inner node.
> 
>  Is there a way to process the output of the extension?

You could store the result of the extension in a variable as a result-tree 
fragment, and then process the fragment using the node-set extension 
function.  That allows you to apply path expressions to the result-tree 
fragment.  For instance, you could do something like this:

<xsl:variable name="my-bar-code">
<barcode:barcode message="00000" orientation="0"> 
        <barcode:code128>
          <barcode:height>8mm</barcode:height>
        </barcode:code128>
</barcode:barcode>
</xsl:variable>

<xsl:copy-of xmlns:exsl="http://exslt.org/common";
       select="exsl:node-set($my-bar-code)/svg:svg/path/to/inner/node"/>

I hope that helps.

Thanks,

Henry
------------------------------------------------------------------
Henry Zongaro
XML Transformation & Query Development
IBM Canada Lab   T/L 313-6044;  Phone +1 905 413-6044
mailto:zong...@ca.ibm.com

Reply via email to