I can add flowText elements to my displayed document and they show up as
desired.  If I then output the document and then load it into my app or
Squiggle the flowText elements aren't visible.

Here is a complete output file:
===========================================================
<svg contentScriptType="text/ecmascript" width="500"
    xmlns:xlink="http://www.w3.org/1999/xlink"; zoomAndPan="magnify"
    contentStyleType="text/css" height="600"
    preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg";
    version="1.2">
   <g style="overflow:hidden" id="content">
       <defs>
           <pattern x="0" y="0" width="100%"
                    xmlns:xlink="http://www.w3.org/1999/xlink";
                    patternUnits="userSpaceOnUse" xlink:type="simple"
                    xlink:actuate="onLoad" height=".25in" id="hstripes"
                    preserveAspectRatio="xMidYMid meet" xlink:show="other">
               <rect fill="black" width="100%" fill-opacity=".2"
height="2"/>
           </pattern>
           <pattern x="0" y="0" width=".25in"
                    xmlns:xlink="http://www.w3.org/1999/xlink";
                    patternUnits="userSpaceOnUse" xlink:type="simple"
                    xlink:actuate="onLoad" height="100%" id="vstripes"
                    preserveAspectRatio="xMidYMid meet" xlink:show="other">
               <rect fill="black" width="2" fill-opacity=".2"
height="100%"/>
           </pattern>
       </defs>
       <rect fill="url(#hstripes)" width="100%" height="100%" id="hstripes"
             visibility="visible"/>
       <rect fill="url(#vstripes)" width="100%" height="100%" id="vstripes"
             visibility="hidden"/>
       <g id="blocks">
           <flowText font-size="16pt" font-family="Dialog"
xml:space="preserve"
                     font-style="normal" id="txtblock0"
font-weight="normal">
               <flowRegion>
                   <rect width="210" x="75" height="141"
y="75"/></flowRegion>
               <flowDiv>
                   <flowPara>Some text</flowPara></flowDiv></flowText>
       </g>
   </g>
</svg>
===========================================================

I'm loading it with this code:

               String parser, uri;
               SAXSVGDocumentFactory factory;
               File f = fc.getSelectedFile();
                try {
                       svgCanvas.setDocumentState(JSVGCanvas.ALWAYS_DYNAMIC
);
                       parser = XMLResourceDescriptor.getXMLParserClassName
();
                       factory = new SAXSVGDocumentFactory(parser);
                       svgCanvas.setURI(f.toURL().toString());
                       uri = svgCanvas.getURI();
                       document = factory.createSVGDocument(uri);
                       svgCanvas.setDocument(document);
                   } catch (IOException ex) {
                       ex.printStackTrace();
                   }

It is probably my lack of understanding of namespaces but what am I doing
wrong?

Thanks,

      Phil

--
Visit http://www.darkisle.com for photos of castles, cairns and other
historic sites in the British Isles.

Reply via email to