Re: XHTML -- FO
Afshartous, Nick wrote: Hi, I've seen discussion on the topic in the archives, but no postings of stylesheets that are compatible with FOP. Could someone please post a stylesheet that does XHTML -- FO where the output is compatible with FOP (i.e. tables work). Thanks. -- Nick This is AntennaHouse's version, haven't used it very much but I think it works. Needs an internet connection while processing (at least with FOP), probably for the XHTML namespace... -- -- Santtu Japsu Pajukanta -- [EMAIL PROTECTED] -- ICQ#: 115011651 Any job worth doing with a laser is worth doing with many, many lasers, -Khrima in ADVENTURERS! the comic by Mark Shallow ?xml version=1.0 encoding=utf-8? xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; xmlns:fo=http://www.w3.org/1999/XSL/Format; xmlns:html=http://www.w3.org/1999/xhtml; xsl:output method=xml version=1.0 encoding=utf-8 indent=no/ !--== Parameters ===-- !-- page size -- xsl:param name=page-widthauto/xsl:param xsl:param name=page-heightauto/xsl:param xsl:param name=page-margin-top1in/xsl:param xsl:param name=page-margin-bottom1in/xsl:param xsl:param name=page-margin-left1in/xsl:param xsl:param name=page-margin-right1in/xsl:param !-- page header and footer -- xsl:param name=page-header-margin0.5in/xsl:param xsl:param name=page-footer-margin0.5in/xsl:param xsl:param name=title-print-in-headertrue/xsl:param xsl:param name=page-number-print-in-footertrue/xsl:param !-- multi column -- xsl:param name=column-count1/xsl:param xsl:param name=column-gap12pt/xsl:param !-- writing-mode: lr-tb | rl-tb | tb-rl -- xsl:param name=writing-modelr-tb/xsl:param !-- text-align: justify | start -- xsl:param name=text-alignstart/xsl:param !-- hyphenate: true | false -- xsl:param name=hyphenatefalse/xsl:param !--== Attribute Sets ===-- !--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Root =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-- xsl:attribute-set name=root xsl:attribute name=writing-modexsl:value-of select=$writing-mode//xsl:attribute xsl:attribute name=hyphenatexsl:value-of select=$hyphenate//xsl:attribute xsl:attribute name=text-alignxsl:value-of select=$text-align//xsl:attribute !-- specified on fo:root to change the properties' initial values -- /xsl:attribute-set xsl:attribute-set name=page xsl:attribute name=page-widthxsl:value-of select=$page-width//xsl:attribute xsl:attribute name=page-heightxsl:value-of select=$page-height//xsl:attribute !-- specified on fo:simple-page-master -- /xsl:attribute-set xsl:attribute-set name=body !-- specified on fo:flow's only child fo:block -- /xsl:attribute-set xsl:attribute-set name=page-header !-- specified on (page-header)fo:static-content's only child fo:block -- xsl:attribute name=font-sizesmall/xsl:attribute xsl:attribute name=text-aligncenter/xsl:attribute /xsl:attribute-set xsl:attribute-set name=page-footer !-- specified on (page-footer)fo:static-content's only child fo:block -- xsl:attribute name=font-sizesmall/xsl:attribute xsl:attribute name=text-aligncenter/xsl:attribute /xsl:attribute-set !--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Block-level =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-- xsl:attribute-set name=h1 xsl:attribute name=font-size2em/xsl:attribute xsl:attribute name=font-weightbold/xsl:attribute xsl:attribute name=space-before0.67em/xsl:attribute xsl:attribute name=space-after0.67em/xsl:attribute xsl:attribute name=keep-with-next.within-columnalways/xsl:attribute xsl:attribute name=keep-together.within-columnalways/xsl:attribute /xsl:attribute-set xsl:attribute-set name=h2 xsl:attribute name=font-size1.5em/xsl:attribute xsl:attribute name=font-weightbold/xsl:attribute xsl:attribute name=space-before0.83em/xsl:attribute xsl:attribute name=space-after0.83em/xsl:attribute xsl:attribute name=keep-with-next.within-columnalways/xsl:attribute xsl:attribute name=keep-together.within-columnalways/xsl:attribute /xsl:attribute-set xsl:attribute-set name=h3 xsl:attribute name=font-size1.17em/xsl:attribute xsl:attribute name=font-weightbold/xsl:attribute xsl:attribute name=space-before1em/xsl:attribute xsl:attribute name=space-after1em/xsl:attribute xsl:attribute name=keep-with-next.within-columnalways/xsl:attribute xsl:attribute name=keep-together.within-columnalways/xsl:attribute /xsl:attribute-set xsl:attribute-set name=h4 xsl:attribute
Re: FOP and Acrobat Reader: full screen
Aaron Weber wrote: For most monitors isn't that 4:3 width:height? and then the widescreen ones are 13:9? Yeah, most of the resolutions normal monitors support match that 4:3 aspect ratio but there are some exceptions... for example, 1280x1024 is 5:4. I don't know about those widescreen monitors, but at least with TV's the widescreen picture is 16:9, not 13:9... haven't used (seen?) one. -- -- Santtu Japsu Pajukanta -- [EMAIL PROTECTED] -- ICQ#: 115011651 Any job worth doing with a laser is worth doing with many, many lasers, -Khrima in ADVENTURERS! the comic by Mark Shallow - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: XSL transformations with FOP
Jeremias Maerki wrote: Sounds like you XML parser doesn't provide namespace information. You may have to enable that feature. What XML parser and XSLT implementation do you use? FOP is by default using Apache Xerces and Xalan which work fine. I use the software pretty out of the box so they're Xerces and Xalan. Here's what it outputs when I try to process xml-fop/docs/examples/markers/glossary.xml: D:\Java\tools\fop-0.20.5rc\docs\examples\markersfop glossary.xml glossary.pdf [INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser [INFO] FOP 0.20.5rc [INFO] Using org.apache.xerces.parsers.SAXParser as SAX2 Parser [INFO] building formatting object tree [INFO] setting up fonts [ERROR] Unknown formatting object ^glossary [ERROR] Root element must be root, not :glossary As you can see, I'm using a Windows box... The command fop is a batch file which just executes java org.apache.fop.apps.Fop %1 %2 %3 %4 %5 %6 %7 %8 (had to do it this way due to the lack of command aliases in DOS). I haven't altered the files (glossary.[xml|xsl])... -- -- Santtu Japsu Pajukanta -- [EMAIL PROTECTED] -- ICQ#: 115011651 Any job worth doing with a laser is worth doing with many, many lasers, -Khrima in ADVENTURERS! the comic by Mark Shallow - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: XSL transformations with FOP
J.Pietschmann wrote: That's the command line for formatting a FO document into PDF. Why do you expect FOP to apply a style sheet without even naming it on the command line? Use fop -xml glossary.xml -xsl glossary.xsl -pdf glossary.pdf You might alsoo want to look into the FOP documentation, in particular http://xml.apache.org/fop/running.html J.Pietschmann I thought it would work because my xml file has a reference to the xsl stylesheet (?xml-stylesheet type=text/xsl href=foobar.xsl?. Thought it would do it as a web browser does... but I'm a total newbie when it comes to XML. I had a peek at that doc too but... Next time I'll read the documentation more carefully! :) Well, thanks, this works now... -- -- Santtu Japsu Pajukanta -- [EMAIL PROTECTED] -- ICQ#: 115011651 Any job worth doing with a laser is worth doing with many, many lasers, -Khrima in ADVENTURERS! the comic by Mark Shallow - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]