Hi, I am using barcode functionality from the Barjode4J project, this is what I have working so far: <fo:block> <fo:instream-foreign-object> <barcode:barcode xmlns:barcode="http://barcode4j.krysalis.org/ns" message="message"> <barcode:code128> <barcode:height>10mm</barcode:height> <barcode:human-readable> <barcode:placement>none</barcode:placement> </barcode:human-readable> </barcode:code128> </barcode:barcode> </fo:instream-foreign-object> </fo:block> Instead of "message" I would like to generate a barcode from a XML-node. I have used the <xsl:value-of select="node"/> syntax for that, but I can not use this syntax in an attribut message="message". So how can I set attributes according to nodes from a XML-source? Thanks, Frank -- View this message in context: http://www.nabble.com/How-to-use-%3Cxls%3Avalue-of-as-attribute-tp20357000p20357000.html Sent from the FOP - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
For attributes you 'll need an attribute value template with curly braces: message="{node}" Instead of node you can use a parameter with $param or a variable $var too. HTH, Ingo > -----Ursprüngliche Nachricht----- > Von: Frank Niedermann [mailto:fbn@thelogic.org] > Gesendet: Donnerstag, 6. November 2008 09:37 > An: fop-users@xmlgraphics.apache.org > Betreff: How to use <xls:value-of as attribute > > > Hi, > > I am using barcode functionality from the Barjode4J project, this is what > I > have working so far: > > <fo:block> > <fo:instream-foreign-object> > <barcode:barcode xmlns:barcode="http://barcode4j.krysalis.org/ns" > message="message"> > <barcode:code128> > <barcode:height>10mm</barcode:height> > <barcode:human-readable> > <barcode:placement>none</barcode:placement> > </barcode:human-readable> > </barcode:code128> > </barcode:barcode> > </fo:instream-foreign-object> > </fo:block> > > Instead of "message" I would like to generate a barcode from a XML-node. I > have used the <xsl:value-of select="node"/> syntax for that, but I can not > use this syntax in an attribut message="message". > > So how can I set attributes according to nodes from a XML-source? > > Thanks, > Frank --------------------------------------------------------------------- To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
Works great, thanks! Frank -- View this message in context: http://www.nabble.com/How-to-use-%3Cxls%3Avalue-of-as-attribute-tp20357000p20363129.html Sent from the FOP - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
On Thu, 6 Nov 2008, Frank Niedermann wrote: > > Hi, > > I am using barcode functionality from the Barjode4J project, this is what I > have working so far: > > <fo:block> > <fo:instream-foreign-object> > <barcode:barcode xmlns:barcode="http://barcode4j.krysalis.org/ns" > message="message"> > <barcode:code128> > <barcode:height>10mm</barcode:height> > <barcode:human-readable> > <barcode:placement>none</barcode:placement> > </barcode:human-readable> > </barcode:code128> > </barcode:barcode> > </fo:instream-foreign-object> > </fo:block> I think you want to use something like <barcode:barcode xmlns:barcode="http://barcode4j.krysalis.org/ns"> <xsl:attribute name="message"> <xsl:value-of select="node"/> </xsl:attribute> ... </barcode:barcode> > > Instead of "message" I would like to generate a barcode from a XML-node. I > have used the <xsl:value-of select="node"/> syntax for that, but I can not > use this syntax in an attribut message="message". > > So how can I set attributes according to nodes from a XML-source? > > Thanks, > Frank > -- > View this message in context: http://www.nabble.com/How-to-use-%3Cxls%3Avalue-of-as-attribute-tp20357000p20357000.html > Sent from the FOP - Users mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org > For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org