Hi Thomas,
On 12/4/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Hi Phil,
"Phil Wright" <[EMAIL PROTECTED]> wrote on 12/02/2006 07:49:47 PM:
> Is there really no way to take a node/element you have read from another
> namespace and force a new namespace onto it?
The thing to understand is that an element in another namespace
is often a completely different object.
I understand that and I also, in this particular case, know exactly what
that completely different object's type, e.g. namespace, truly is. The
names of the methods adoptNode() and importNode() kind of imply by their
names that these adopted/imported nodes should assume the namespace of their
new parents. Should not a decent parser for any namespace just skip over
tags it doesn't understand?
The Namespace (and element name
for that matter) in DOM should not be considered simple strings, they
more or less map to a class type. As an example most of the
elements from SVG implement the SVGLocatable interface, you can't
'retrofit' that on an existing generic element.
I think that analogy is in the wrong direction. It is more like when you
have class A extending class B. I can always take an object of class A and
treat it like a class B object.
I don't know. I bow to your much greater knowledge of XML and SVG but it
seems to me that the DOM/XML api folks could have been less anal-retentive
and more practical.
Hopefully this will make more sense to me as I learn more about XML and
namespaces.
As always, your help on this list is much appreciated.
Phil
On 12/2/06, [EMAIL PROTECTED] <[EMAIL PROTECTED] > wrote:
> Hi Phil,
>
> "Phil Wright" < [EMAIL PROTECTED]> wrote on 12/01/2006 10:22:55 PM:
>
> > I'm getting the same ClassCastException error in my program. (See
post
> from a
> > few minutes ago.)
>
> I think you likely do have the same problem. You probably
> need to either define a prefix for your SVG element's:
> xmlns:svg="http://www.w3.org/2000/svg"
>
> and then use it for all of your SVG content:
> <svg:svg width="100" ...>
> <svg:path d="M ..." />
> </svg:svg>
>
> or add the xmlns="http://www.w3.org/2000/svg" to each
> of your 'svg' elements to set the default namespace for
> those subtree's.
>
> > Hopefully the solution for you will help me or vice-versa.
>
>
>
> > On 12/1/06, Richard Suematsu <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I'm getting a svg document from a web server that requires client side
> > certificates. So I can't just pass in a URI into batik. I'm trying
to
> > create my svg document with the
> > SAXSVGDocumentFactory.createDocument (URI, Reader), but I don't know
> what
> > to put into the URI part. If I leave it blank, I get a no protocol
> error.
> >
> > I tried just creating a Document with the regular DOM parser, but when
I
> > do a setDocument, I get an ClassCastException GenericElement error.
> >
> > The document loads into Squiggle just fine.
> >
> > Any ideas?
> >
> > --
> > Aloha,
> > Richard Suematsu
> > SynCaDD Systems, Inc.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail:
[EMAIL PROTECTED]
>
>
> >
> >
> >
> > --
> > Visit http://www.darkisle.com for photos of castles, cairns and other
> historic
> > sites in the British Isles.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> --
> Visit http://www.darkisle.com for photos of castles, cairns and other
historic
> sites in the British Isles.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Visit http://www.darkisle.com for photos of castles, cairns and other
historic sites in the British Isles.