From: "björn lundin" <b.f.lundin@gmail.com>
Subject: Re: xmlada validate schema trickery
Date: Mon, 17 Oct 2011 00:31:47 -0700 (PDT)
Date: 2011-10-17T00:31:47-07:00 [thread overview]
Message-ID: <af4cf0df-93f7-47aa-98ac-702ca7e56d86@s14g2000vbj.googlegroups.com> (raw)
In-Reply-To: 998e2b12-5c45-4f37-99b7-a505b806277a@fk25g2000vbb.googlegroups.com
On 14 Okt, 16:52, Emmanuel Briot <briot.emman...@gmail.com> wrote:
> > However, the xmlfiles are processed by some tcl-scripts as well,
> > and the (bad) tcldom(2.6) implementation (which I cannot upgrade)
> > crashes on the xmlns attribute
> > <root_element xmlns="http://www.abc.com/some_namespace" >
>
> Is this because of the null prefix (ie will it work if you use
> xmlns:bjorn="..." and then use
> <bjorn:root_element>
> <bjorn:Term ...
> ...
Hi Emmanuel!
I'm not quite sure I understand.
If I have
<?xml version="1.0" encoding="iso-8859-1"?>
<bjorn:root_element xmlns:bjorn='http://www.abc.com/some_namespace'>
<bjorn:Term Name="goal" Type="9" Size="9">
</bjorn:root_element>
I does work in xmlAda
but so does
<?xml version="1.0" encoding="iso-8859-1"?>
<root_element>
<Term Name="goal" Type="9" Size="9">
</root_element>
XmlAda is not my problem; tcldom2.6 is.
So the suggested solution still crashes the tcl-scripts.
But perhaps I misunderstood where to put the ns-declaration
My idea was to see if there is a way to tell XmlAda to treat
<root_element>
as if it really said
<root_element xmlns="http://www.abc.com/some_namespace" >
ie, 'just' append the xmlns attribute on the root node before/during
the validation
But I think I'll go for a simpler approch, I'll open the the file with
DOM first,
append the attribute, save it to a temp-file, and validate that one.
That, I think, is good enough, until I get to upgrade/replace the tcl-
scripts
/Björn
prev parent reply other threads:[~2011-10-17 7:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-14 14:19 xmlada validate schema trickery björn lundin
2011-10-14 14:52 ` Emmanuel Briot
2011-10-17 7:31 ` björn lundin [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox