W3C home > Mailing lists > Public > www-xsl-fo@w3.org > February 2007

xml to xslfo using xslt doesnt work?

From: helen_166 <helen_166@hotmail.com>
Date: Fri, 23 Feb 2007 08:30:43 -0800 (PST)
Message-ID: <9121929.post@talk.nabble.com>
To: www-xsl-fo@w3.org

i have a xml file which i need to transform to xslfo

i have created a java class to convert it but it doesnt convert correctly,
when it converts the file the fo tags are completly removed which isnt what
i want can anyone tell me what im doing wrong

my xslt: (part of)
<?xml version="1.0" encoding="iso-8859-1"?>
		<fo:root xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
		    <fo:simple-page-master master-name="my-page">
		      <fo:region-body margin="0.75in"/>
		  <fo:page-sequence master-reference="my-page">
		    <fo:flow flow-name="xsl-region-body">
		      <xsl:template match='/' mode='ffp'>

the java class:
    public void CreateXSLFO(String xmldocname, String xsltdocname, String
xslfodocname) {
        System.out.println("creating xsl-fo");
        File xmldocument = new File(xmldocname);
        File xsltdocument = new File(xsltdocname);
        File xslfodocument = new File(xslfodocname);      
        try {
            OutputStream outputstream = new
            TransformerFactory factory = TransformerFactory.newInstance();
            //pass the xslt document
            Transformer transformer = factory.newTransformer(new
            //pass the xml document
            Source sourse = new StreamSource(xmldocument);
            //pass the outputstream (new file)
            Result result = new StreamResult(outputstream);
            // transform the xslt to xsl-fo using FOP
            transformer.transform(sourse, result);
        catch (Exception e)
        System.out.println("xslfo created");

View this message in context: http://www.nabble.com/xml-to-xslfo-using-xslt-doesnt-work--tf3279766.html#a9121929
Sent from the w3.org - www-xsl-fo mailing list archive at Nabble.com.
Received on Saturday, 24 February 2007 00:28:12 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:58:30 UTC