barcode 39 with xsl fop, parametrization
Here should go questions about transforming XML with XSLT and FOP.
			- 
				folal
 - Posts: 1
 - Joined: Mon Jul 21, 2008 6:24 pm
 
barcode 39 with xsl fop, parametrization
I have to parametrize dinamically the barcode39 height, bat this code doesn't work:
<xsl:variable name="hBarcode" select="//report/parametri/parametro[@nomeParametro='heightBarcode']"/>
<xsl:variable name="barcode-cfg">
<barcode>
<code39>
<module-height>{$hBarcode}mm</module-height>
</code39>
</barcode>
</xsl:variable>
<fo:block>
<fo:instream-foreign-object>
<xsl:variable name="bc" select="barcode:generate($barcode-cfg, barCode)"/>
<svg:svg xmlns:svg="http://www.w3.org/2000/svg">
<xsl:attribute name="width"><xsl:value-of select="$bc/svg:svg/@width"/></xsl:attribute>
<xsl:attribute name="height"><xsl:value-of select="$bc/svg:svg/@height"/></xsl:attribute>
<svg:rect x="0mm" y="0mm" fill="white">
<xsl:attribute name="width"><xsl:value-of select="$bc/svg:svg/@width"/></xsl:attribute>
<xsl:attribute name="height"><xsl:value-of select="$bc/svg:svg/@height"/></xsl:attribute>
</svg:rect>
<xsl:copy-of select="$bc"/>
</svg:svg>
</fo:instream-foreign-object>
</fo:block>
The problm is {$hBarcode} but I don't know I can write that.
			
			
									
									
						<xsl:variable name="hBarcode" select="//report/parametri/parametro[@nomeParametro='heightBarcode']"/>
<xsl:variable name="barcode-cfg">
<barcode>
<code39>
<module-height>{$hBarcode}mm</module-height>
</code39>
</barcode>
</xsl:variable>
<fo:block>
<fo:instream-foreign-object>
<xsl:variable name="bc" select="barcode:generate($barcode-cfg, barCode)"/>
<svg:svg xmlns:svg="http://www.w3.org/2000/svg">
<xsl:attribute name="width"><xsl:value-of select="$bc/svg:svg/@width"/></xsl:attribute>
<xsl:attribute name="height"><xsl:value-of select="$bc/svg:svg/@height"/></xsl:attribute>
<svg:rect x="0mm" y="0mm" fill="white">
<xsl:attribute name="width"><xsl:value-of select="$bc/svg:svg/@width"/></xsl:attribute>
<xsl:attribute name="height"><xsl:value-of select="$bc/svg:svg/@height"/></xsl:attribute>
</svg:rect>
<xsl:copy-of select="$bc"/>
</svg:svg>
</fo:instream-foreign-object>
</fo:block>
The problm is {$hBarcode} but I don't know I can write that.
			
				Jump to
				
			
		
			
			
	
	- Oxygen XML Editor/Author/Developer
 - ↳ Feature Request
 - ↳ Common Problems
 - ↳ DITA (Editing and Publishing DITA Content)
 - ↳ Artificial Intelligence (AI Positron Assistant add-on)
 - ↳ SDK-API, Frameworks - Document Types
 - ↳ DocBook
 - ↳ TEI
 - ↳ XHTML
 - ↳ Other Issues
 - Oxygen XML Web Author
 - ↳ Feature Request
 - ↳ Common Problems
 - Oxygen Content Fusion
 - ↳ Feature Request
 - ↳ Common Problems
 - Oxygen JSON Editor
 - ↳ Feature Request
 - ↳ Common Problems
 - Oxygen PDF Chemistry
 - ↳ Feature Request
 - ↳ Common Problems
 - Oxygen Feedback
 - ↳ Feature Request
 - ↳ Common Problems
 - Oxygen XML WebHelp
 - ↳ Feature Request
 - ↳ Common Problems
 - XML
 - ↳ General XML Questions
 - ↳ XSLT and FOP
 - ↳ XML Schemas
 - ↳ XQuery
 - NVDL
 - ↳ General NVDL Issues
 - ↳ oNVDL Related Issues
 - XML Services Market
 - ↳ Offer a Service