Hi Thomas,
On 11/26/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Hi Phil,
"Phil Wright" <[EMAIL PROTECTED]> wrote on 11/22/2006 01:38:11 PM:
> 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.
It looks like you aren't providing xml prefixes or changing
the default namespace for the flowText elements. The DOM lets
you provide the namespace explicitly but unless you associate
a namespace prefix and use it, that namespace association may
be lost when you serialize the document.
I've changed to using flowRoot elements but chances are that I am still
doing it all wrong.
I was under the impression that when I did something like:
froot = document.createElementNS("http://xml.apache.org/batik/ext",
"flowText");
That providing that namespace parameter did everything that was needed. I
don't see any prefixes anywhere so I'm guessing I was still missing a step
somewhere in the creation of the root document element(s).
private static final String svgNS =
SVG12DOMImplementation.SVG_NAMESPACE_URI;
private static DOMImplementation impl = null;
impl = SVG12DOMImplementation.getDOMImplementation();
SVGDocument document = (SVGDocument)impl.createDocument(svgNS,
"svg", null);
Element root = document.getDocumentElement();
root.setAttributeNS(null, "version", "1.2");
Is all of that right?
Thanks again,
Phil
--
Visit http://www.darkisle.com for photos of castles, cairns and other
historic sites in the British Isles.