RE: attribute-set
Hi! Have you tried to do only the xslt-step and write the resulting fo-file to disk. Then you could check, if the attributes are written correctly. You could do this by calling xalan. Christian -Original Message- From: Manuel Reyes [mailto:[EMAIL PROTECTED] Sent: Friday, November 21, 2003 11:48 AM To: [EMAIL PROTECTED] Subject: attribute-set I am having a problem when trying to use attribute sets, and I am unsure on whether this is a problem with FOP or my newbie implementation of the syntax (the most likely possibility) I have the following attribute-set within my document which reads in values from an XML file : xsl:attribute-set name=title_table_block xsl:attribute name=font-sizexsl:value-of select=report_generics/report_title_font_size//xsl:attribute xsl:attribute name=font-weightxsl:value-of select=report_generics/report_title_font_weight//xsl:attribute xsl:attribute name=text-alignxsl:value-of select=report_generics/report_title_text_align//xsl:attribute /xsl:attribute-set Below this I use the following block to define the text within a table cell : fo:block xsl:use-attribute-sets=title_table_block xsl:value-of select=report_generics/report_title/ /fo:block Now from what I understand from these URLs the syntax above is correct : http://www.devguru.com/Technologies/xslt/quickref/xslt_element _attribute set.html http://www.w3schools.com/xsl/el_attributeset.asp The problem is that when I set the text properties it overrides all the font size/weight/align settings defined in other parts of the document, so when I create the PDF all parts of the document use these settings (at the moment this is the only attribute set and this block is the only block that calls it.) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: attribute-set
Well I did as you suggested and ran the files through xalan I have included the data files and the xalan outputs below. What seems to be happening is that when FOP/XALAN processes the files rather then but the parameters into the fo:block that calls them it insert into the fo:flow section, so if I do not define an attribute on another block it is overridden with the attribute-set parameters. !-- attribute-set-test.xsl -- fo:flow flow-name=xsl-region-body font-size=10pt xsl:attribute-set name=title_block xsl:attribute name=font-sizexsl:value-of select=report_generics/title_font_size//xsl:attribute xsl:attribute name=font-weightxsl:value-of select=report_generics/title_font_weight//xsl:attribute xsl:attribute name=text-alignxsl:value-of select=report_generics/title_text_align//xsl:attribute /xsl:attribute-set fo:block xsl:use-attribute-sets=title_table_blockTEST USING ATTRIBUTE SET/fo:block fo:block text-align=leftLEFT ALIGN/fo:block fo:block text-align=left font-weight=boldLEFT ALIGN / BOLD/fo:block fo:block text-align=rightRIGHT ALIGN/fo:block fo:block text-align=right font-weight=bold font-size=20ptRIGHT ALIGN / BOLD / 20pt FONT/fo:block /fo:flow !-- attribute-set-test.xml -- ?xml version=1.0 encoding=UTF-8? data report_generics title_font_size10pt/title_font_size title_font_weightbold/title_font_weight title_text_alignright/title_text_align /report_generics /data !-- XALAN output using BOLD in XML data file -- fo:flow font-size=10pt flow-name=xsl-region-body font-weight=bold text-align=right fo:blockTEST USING ATTRIBUTE SET/fo:block fo:block text-align=leftLEFT ALIGN/fo:block fo:block font-weight=bold text-align=leftLEFT ALIGN / BOLD/fo:block fo:block font-weight=bold text-align=rightRIGHT ALIGN / BOLD/fo:block fo:block font-size=20pt font-weight=bold text-align=rightRIGHT ALIGN / BOLD / 20pt FONT/fo:block /fo:flow !-- XALAN output using NORMAL in XML data file -- fo:flow font-size=10pt flow-name=xsl-region-body font-weight=normal text-align=right fo:blockTEST USING ATTRIBUTE SET/fo:block fo:block text-align=leftLEFT ALIGN/fo:block fo:block font-weight=bold text-align=leftLEFT ALIGN / BOLD/fo:block fo:block font-weight=bold text-align=rightRIGHT ALIGN / BOLD/fo:block fo:block font-size=20pt font-weight=bold text-align=rightRIGHT ALIGN / BOLD / 20pt FONT/fo:block /fo:flow - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: attribute-set
It looks like you have the xsl:attribute-set as a child of the fo:flow. I believe it needs to be a child of the root document to work correctly. -Original Message- From: Manuel Reyes [mailto:[EMAIL PROTECTED] Sent: 24 November, 2003 11:37 To: [EMAIL PROTECTED] Subject: RE: attribute-set Well I did as you suggested and ran the files through xalan I have included the data files and the xalan outputs below. What seems to be happening is that when FOP/XALAN processes the files rather then but the parameters into the fo:block that calls them it insert into the fo:flow section, so if I do not define an attribute on another block it is overridden with the attribute-set parameters. !-- attribute-set-test.xsl -- fo:flow flow-name=xsl-region-body font-size=10pt xsl:attribute-set name=title_block xsl:attribute name=font-sizexsl:value-of select=report_generics/title_font_size//xsl:attribute xsl:attribute name=font-weightxsl:value-of select=report_generics/title_font_weight//xsl:attribute xsl:attribute name=text-alignxsl:value-of select=report_generics/title_text_align//xsl:attribute /xsl:attribute-set fo:block xsl:use-attribute-sets=title_table_blockTEST USING ATTRIBUTE SET/fo:block fo:block text-align=leftLEFT ALIGN/fo:block fo:block text-align=left font-weight=boldLEFT ALIGN / BOLD/fo:block fo:block text-align=rightRIGHT ALIGN/fo:block fo:block text-align=right font-weight=bold font-size=20ptRIGHT ALIGN / BOLD / 20pt FONT/fo:block /fo:flow !-- attribute-set-test.xml -- ?xml version=1.0 encoding=UTF-8? data report_generics title_font_size10pt/title_font_size title_font_weightbold/title_font_weight title_text_alignright/title_text_align /report_generics /data !-- XALAN output using BOLD in XML data file -- fo:flow font-size=10pt flow-name=xsl-region-body font-weight=bold text-align=right fo:blockTEST USING ATTRIBUTE SET/fo:block fo:block text-align=leftLEFT ALIGN/fo:block fo:block font-weight=bold text-align=leftLEFT ALIGN / BOLD/fo:block fo:block font-weight=bold text-align=rightRIGHT ALIGN / BOLD/fo:block fo:block font-size=20pt font-weight=bold text-align=rightRIGHT ALIGN / BOLD / 20pt FONT/fo:block /fo:flow !-- XALAN output using NORMAL in XML data file -- fo:flow font-size=10pt flow-name=xsl-region-body font-weight=normal text-align=right fo:blockTEST USING ATTRIBUTE SET/fo:block fo:block text-align=leftLEFT ALIGN/fo:block fo:block font-weight=bold text-align=leftLEFT ALIGN / BOLD/fo:block fo:block font-weight=bold text-align=rightRIGHT ALIGN / BOLD/fo:block fo:block font-size=20pt font-weight=bold text-align=rightRIGHT ALIGN / BOLD / 20pt FONT/fo:block /fo:flow - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -- Visit our Internet site at http://www.reuters.com Get closer to the financial markets with Reuters Messaging - for more information and to register, visit http://www.reuters.com/messaging Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Reuters Ltd. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: attribute-set
I just tried moving the xsl:attribute-set/ so that it sat directly below the first and only fo:root/ entry. The hierarchy with these amendments is as follows : xsl:stylesheet - xsl:output - - xsl:template - - - fo:root - - - - xsl:attribute-set - - - - fo:layout-master-set - - - - - fo:simple-page-master - - - - fo:page-sequence - - - - - fo:flow - - - - - - BLOCKS ETC ETC Unfortunately this resulted in exactly the same problem as before (where the xsl:attribute-set/ was defined directly above the block that used it. If I take the xsl:attribute-set/ any higher in the xsl hierarchy I get the following errors in FOP : file:///E:/xsl-fo/attribute-set-test.xsl; Line 6; Column 37; font-size has an illegal attribute: {1} file:///E:/xsl-fo/attribute-set-test.xsl; Line 7; Column 39; font-weight has anillegal attribute: {1} file:///E:/xsl-fo/attribute-set-test.xsl; Line 8; Column 38; text-align has an illegal attribute: {1} Therefore the set isn't defined and everything uses default/defined settings. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: attribute-set
An xsl:attribute-set must always be a child of the xsl:stylesheet element. This is part of th xslt specification, which is different from the fo specification. xsl:stylesheet xsl:attribute-set name= /xsl:attribute-set /xsl:stylesheet You must then correctly adjust your xpaths in your xsl:value-of statemen to select the correct values. I would think the error you are getting below is that it is creating an attribute set, but with invalid values. You need to run this through an xslt processor outside of fop to separate your xslt issues from fo issues. -Original Message- From: Manuel Reyes [mailto:[EMAIL PROTECTED] Sent: 24 November, 2003 12:10 To: [EMAIL PROTECTED] Subject: RE: attribute-set I just tried moving the xsl:attribute-set/ so that it sat directly below the first and only fo:root/ entry. The hierarchy with these amendments is as follows : xsl:stylesheet - xsl:output - - xsl:template - - - fo:root - - - - xsl:attribute-set - - - - fo:layout-master-set - - - - - fo:simple-page-master - - - - fo:page-sequence - - - - - fo:flow - - - - - - BLOCKS ETC ETC Unfortunately this resulted in exactly the same problem as before (where the xsl:attribute-set/ was defined directly above the block that used it. If I take the xsl:attribute-set/ any higher in the xsl hierarchy I get the following errors in FOP : file:///E:/xsl-fo/attribute-set-test.xsl; Line 6; Column 37; font-size has an illegal attribute: {1} file:///E:/xsl-fo/attribute-set-test.xsl; Line 7; Column 39; font-weight has anillegal attribute: {1} file:///E:/xsl-fo/attribute-set-test.xsl; Line 8; Column 38; text-align has an illegal attribute: {1} Therefore the set isn't defined and everything uses default/defined settings. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -- Visit our Internet site at http://www.reuters.com Get closer to the financial markets with Reuters Messaging - for more information and to register, visit http://www.reuters.com/messaging Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Reuters Ltd. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
attribute-set
I am having a problem when trying to use attribute sets, and I am unsure on whether this is a problem with FOP or my newbie implementation of the syntax (the most likely possibility) I have the following attribute-set within my document which reads in values from an XML file : xsl:attribute-set name=title_table_block xsl:attribute name=font-sizexsl:value-of select=report_generics/report_title_font_size//xsl:attribute xsl:attribute name=font-weightxsl:value-of select=report_generics/report_title_font_weight//xsl:attribute xsl:attribute name=text-alignxsl:value-of select=report_generics/report_title_text_align//xsl:attribute /xsl:attribute-set Below this I use the following block to define the text within a table cell : fo:block xsl:use-attribute-sets=title_table_block xsl:value-of select=report_generics/report_title/ /fo:block Now from what I understand from these URLs the syntax above is correct : http://www.devguru.com/Technologies/xslt/quickref/xslt_element_attribute set.html http://www.w3schools.com/xsl/el_attributeset.asp The problem is that when I set the text properties it overrides all the font size/weight/align settings defined in other parts of the document, so when I create the PDF all parts of the document use these settings (at the moment this is the only attribute set and this block is the only block that calls it.) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]