On Fri, Nov 21, 2008 at 4:37 PM, Jeremias Maerki <[EMAIL PROTECTED]>wrote:
> I forgot: you also need to enclose the flowPara with a flowDiv element. > I believe the example in the SVG 1.2 working draft is actually wrong (it > doesn't conform to the schema given further above in the document). > Yes, the example is clearly wrong (on the webpage, the source code doesn't even end the flowRoot tag correctly...) > On 21.11.2008 16:16:30 Jeremias Maerki wrote: > > I have a pretty good idea why it doesn't work. For i-f-o the basic SVG > > 1.1 DOMImplementation is currently hard-coded but it actually needs to > > be selected based on the version attribute like for the e-g variant. I'm > > looking into that. > > > > As for the black parallelogram, I may have to send you over to > > [EMAIL PROTECTED] since the same output appears when > > looking at the SVG in Batik's Squiggle Browser. Setting > > visibility="false" fixes that problem. Please note that the SVG 1.2 > > flowText feature is not finalized. The spec is still in draft mode. The > > semantics may not be clearly enough defined, yet, and Batik might also > > not do everything correctly, yet. > > > > I will report back when I've fixed the first problem above. Shouldn't be > > a biggy. > > > > On 21.11.2008 14:48:15 Sebastien wrote: > > > Hi, > > > I would like to use the flowing text abilities of SVG1.2 with FOP but i > > > can't get FOP to "switch" to SVG1.2 mode and i get this error: > > > > > > GRAVE: Exception > > > org.w3c.dom.DOMException: The current document is unable to create an > > > element of the requested type (namespace: http://www.w3.org/2000/svg, > name: > > > flowRoot). > > > at > > > org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:217) > > > at > org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:125) > > > at org.apache.fop.cli.Main.startFOP(Main.java:166) > > > at org.apache.fop.cli.Main.main(Main.java:197) > > > > > > --------- > > > > > > org.w3c.dom.DOMException: The current document is unable to create an > > > element of the requested type (namespace: http://www.w3.org/2000/svg, > name: > > > flowRoot). > > > at org.apache.batik.dom.AbstractNode.createDOMException(Unknown > > > Source) > > > at > > > org.apache.batik.dom.svg.SVGDOMImplementation.createElementNS(Unknown > > > Source) > > > at > org.apache.batik.dom.svg.SVGOMDocument.createElementNS(Unknown > > > Source) > > > at > org.apache.xml.utils.DOMBuilder.startElement(DOMBuilder.java:324) > > > at > > > > org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1072) > > > at > > > > org.apache.fop.util.DelegatingContentHandler.startElement(DelegatingContentHandler.java:182) > > > at > > > > org.apache.fop.util.DOMBuilderContentHandlerFactory$Handler.startElement(DOMBuilderContentHandlerFactory.java:124) > > > at > > > org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:163) > > > at > > > > org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1072) > > > at > org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown > > > Source) > > > at > org.apache.xerces.xinclude.XIncludeHandler.startElement(Unknown > > > Source) > > > at > > > > org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown > > > Source) > > > at > > > > org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown > > > Source) > > > at > > > > org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown > > > Source) > > > at org.apache.xerces.parsers.XML11Configuration.parse(Unknown > > > Source) > > > at org.apache.xerces.parsers.XML11Configuration.parse(Unknown > > > Source) > > > at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) > > > at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown > Source) > > > at > org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown > > > Source) > > > at > > > > org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:484) > > > at > > > org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:214) > > > at > org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:125) > > > at org.apache.fop.cli.Main.startFOP(Main.java:166) > > > at org.apache.fop.cli.Main.main(Main.java:197) > > > > > > > > > I found a thread in the archives which is exactly what i'm trying to > do: > > > > http://fop-users.markmail.org/search/?q=flowroot#query:flowroot+page:1+mid:h2oak7zhcds6tvje+state:results > > > > > > Unfortunately, the answer given by Jeremias (writing version="1.2" in > the > > > svg root tag) didn't help. > > > Here is the .fo file (the svg part comes from the W3C): > > > > > > > > > <?xml version="1.0" encoding="utf-8"?> > > > <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> > > > <fo:layout-master-set> > > > <fo:simple-page-master margin-bottom="10mm" margin-top="10mm" > > > margin-right="10mm" margin-left="10mm" page-width="210mm" > > > page-height="297mm" master-name="A4-portrait"> > > > <fo:region-body margin-bottom="10mm" margin-top="10mm" /> > > > </fo:simple-page-master> > > > </fo:layout-master-set> > > > <fo:page-sequence font-size="10pt" font-family="times" > > > master-reference="A4-portrait"> > > > <fo:flow flow-name="xsl-region-body"> > > > <fo:block> > > > <fo:instream-foreign-object> > > > <svg xmlns="http://www.w3.org/2000/svg" version="1.2" > > > width="100mm" height="150mm"> > > > <flowRoot font-size="16"> > > > <flowRegion> > > > <path d="M100,50L50,300L250,300L300,50z"/> > > > </flowRegion> > > > <flowPara>Tomorrow, and tomorrow, and tomorrow; > creeps > > > in this > > > petty pace from day to day, until the last > syllable > > > of recorded time. > > > And all our yesterdays have lighted fools the > way to > > > dusty death. > > > </flowPara> > > > </flowRoot> > > > </svg> > > > </fo:instream-foreign-object> > > > </fo:block> > > > </fo:flow> > > > </fo:page-sequence> > > > </fo:root> > > > > > > However, when i use fo:external-graphic to include the same svg, it > "works", > > > or maybe should i say it doesn't crash... The PDF rendering is working, > but > > > the result is just a black parallelogram instead of the text (exactly > the > > > same result as in Firefox 3 for instance). There is only InkScape which > > > renders the svg correctly. > > > What am I missing here ? > > > > > > Thanks for your help ;) > > > > > > > > > > Jeremias Maerki > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > Jeremias Maerki > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >