Hello Dean, thanks, this works perfectly. Best regards, Lars
2012/6/15 <[email protected]>: > Lars, > Not sure what happened in your layer, but here is what I use for > progrmalisting shading. > > Regards, > Dean Nelson > > > <?xml version="1.0" encoding="UTF-8"?> > <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > version="1.0" > xmlns:fo="http://www.w3.org/1999/XSL/Format" > > > <xsl:param name="shade.verbatim" select="1"></xsl:param> > <xsl:attribute-set name="shade.verbatim.style"> > <xsl:attribute name="font-family"> > <xsl:value-of select="$monospace.font.family"/> > </xsl:attribute> > <xsl:attribute name="font-size"> > <xsl:value-of select="$body.font.master * 0.9"/> > <xsl:text>pt</xsl:text> > </xsl:attribute> > <xsl:attribute name="border-color">#0000FF</xsl:attribute> > <xsl:attribute name="border-style">solid</xsl:attribute> > <xsl:attribute name="border-width">heavy</xsl:attribute> > <xsl:attribute name="background-color">#F0F0F0</xsl:attribute> > <xsl:attribute name="padding">10pt</xsl:attribute> > <xsl:attribute name="wrap-option">wrap</xsl:attribute> > </xsl:attribute-set> > > <!-- Use this if you need line breaks in long listings > <xsl:attribute-set name="monospace.verbatim.properties"> > <xsl:attribute name="wrap-option">wrap</xsl:attribute> > </xsl:attribute-set> > --> > > <!-- =================== Program listing shading =================== > --> > <xsl:attribute-set name="monospace.verbatim.properties" > use-attribute-sets="verbatim.properties"> > <xsl:attribute name="font-family"> > <xsl:value-of select="$monospace.font.family"/> > </xsl:attribute> > <xsl:attribute name="font-size"> > <xsl:value-of select="$body.font.master * 0.9"/> > <xsl:text>pt</xsl:text> > </xsl:attribute> > <xsl:attribute name="border-color">#0000FF</xsl:attribute> > <xsl:attribute name="border-style">solid</xsl:attribute> > <xsl:attribute name="border-width">heavy</xsl:attribute> > <xsl:attribute name="background-color">#F0F0F0</xsl:attribute> > <xsl:attribute name="padding">10pt</xsl:attribute> > <xsl:attribute name="wrap-option">wrap</xsl:attribute> > <xsl:attribute name="hyphenation-character">►</xsl:attribute> > <!--FOP doesn't support this yet? --> > </xsl:attribute-set> > > > </xsl:stylesheet> > > > > In a message dated 6/14/2012 4:03:24 P.M. Pacific Daylight Time, > [email protected] writes: > > Hello, > > I wanted to add a background color to my programming listings and > found an old post from Bob in which he suggested to add the following > to the customizing layer: > > <xsl:attribute-set name="shade.verbatim.properties"> > border-color="thin black ridge" > background-color="silver" > </xsl:attribute-set> > > If I do this, I get an error: > > [xslt] Unknown file:61:9: Fatal Error! Error reported by XML > parser Cause: org.xml.sax.SAXParseException; lineNumber: 61; > columnNumber: 9; expected '"' or "'" (found "b") > [xslt] Failed to process null > > BUILD FAILED > /home/vogella/workspace/docu/de.vogella.publishing/buildpdf.xml:294: > javax.xml.transform.TransformerConfigurationException: Failed to parse > stylesheet > > Anyone knows what I'm doing incorrect? > > Best regards, Lars > > -- > Lars > http://www.vogella.com - Eclipse, Android and Java Tutorials > http://www.twitter.com/vogella - Lars on Twitter > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > > In a message dated 6/14/2012 4:03:24 P.M. Pacific Daylight Time, > [email protected] writes: > > Hello, > > I wanted to add a background color to my programming listings and > found an old post from Bob in which he suggested to add the following > to the customizing layer: > > <xsl:attribute-set name="shade.verbatim.properties"> > border-color="thin black ridge" > background-color="silver" > </xsl:attribute-set> > > If I do this, I get an error: > > [xslt] Unknown file:61:9: Fatal Error! Error reported by XML > parser Cause: org.xml.sax.SAXParseException; lineNumber: 61; > columnNumber: 9; expected '"' or "'" (found "b") > [xslt] Failed to process null > > BUILD FAILED > /home/vogella/workspace/docu/de.vogella.publishing/buildpdf.xml:294: > javax.xml.transform.TransformerConfigurationException: Failed to parse > stylesheet > > Anyone knows what I'm doing incorrect? > > Best regards, Lars > > -- > Lars > http://www.vogella.com - Eclipse, Android and Java Tutorials > http://www.twitter.com/vogella - Lars on Twitter > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] -- Lars http://www.vogella.com - Eclipse, Android and Java Tutorials http://www.twitter.com/vogella - Lars on Twitter --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
