You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Petr Kuzel <Pe...@netbeans.com> on 2001/02/08 11:33:49 UTC

Deferred DOM warning

Reposting the warning as got from Jesse:

One warning: I noticed in Xerces 1.2.1 (still true in 1.2.3 I
think) that when lazy node expansion is turned on, calling getters
in DOM classes can fire mutation events (bad cache implementation I
guess), causing feedback loops and stuff like that in 2-way mode.
Worked around in ant module by calling: parser.setFeature
("http://apache.org/xml/features/dom/defer-node-expansion", false),
but probably at the expense of parser performance. If you or
someone is on the Xerces mailing list (I am not), please file a bug
about this.

  Cc.

-- 
<address>
<a href="mailto:pkuzel@netbeans.com">Petr Kuzel</a>, Sun Microsystems
: <a href="http://www.sun.com/forte/ffj/ie/">Forte Tools</a>
: XML and <a href="http://jini.netbeans.org/">Jini</a> modules</address>

Re: Deferred DOM warning

Posted by Arnaud Le Hors <le...@us.ibm.com>.
All right, 
so I went through all the code again and fixed a few synchronization
(lazy creation) methods that failed to turn off mutation events firing.
I wrote a small test program that shows definite improvements. It
probably doesn't cover the whole code though, so I'd appreciate if you
could try the latest code from CVS and let me know if you still see any
problem.
Thank you.
-- 
Arnaud  Le Hors - IBM Cupertino, XML Strategy Group

Re: Xerces 1.3.0 and schemas

Posted by Scott Coleman <sc...@12snap.com>.
Hi All

I wish to use a schema to drive code generation. To make this possible i 
need to know if an element is complex and if so get its children and get 
there types etc. Is there a way of finding if a node is complexType or 
do i have to check the children of the node to determine this

Thanks


Re: Xerces 1.3.0 and schemas

Posted by Ian Roberts <ir...@decisionsoft.com>.
On Fri, 9 Feb 2001, Elena Litani wrote:

> Hi, Umesh,
> 
> Umesh Subramanian wrote:
> > 
> > Elena:
> > Thanks for your reply. I think it would be a very nice feature if older versions
> > of the schemas remain supported for some period of time before decommissioning
> > them.
> 
> Unfortunately,  it is not possible. Xerces provides standards-based
> sol-ns and we want to stay compliant with standards. It does not make
> sense to support both Schema WD and Schema CR. 

Though, if you need to validate against WD schemas, you can use Xerces-J
1.2.3 or earlier, which supports them.

Ian

-- 
Ian Roberts                     | ian@roberts.net         (home)
DecisionSoft Ltd.               | irr@decisionsoft.com    (work)



Re: Xerces 1.3.0 and schemas

Posted by Elena Litani <hl...@jtcsv.com>.
Hi, Umesh,

Umesh Subramanian wrote:
> 
> Elena:
> Thanks for your reply. I think it would be a very nice feature if older versions
> of the schemas remain supported for some period of time before decommissioning
> them.

Unfortunately,  it is not possible. Xerces provides standards-based
sol-ns and we want to stay compliant with standards. It does not make
sense to support both Schema WD and Schema CR. 

Hope it's clear.
Elena

Re: Xerces 1.3.0 and schemas

Posted by Umesh Subramanian <Um...@msdw.com>.
Elena:
Thanks for your reply. I think it would be a very nice feature if older versions
of the schemas remain supported for some period of time before decommissioning
them.

I would like to support validation of XML messsages using schemas confirming to
different versions, and ideally the parser could look at the xsi attribute to
figure to out the schema version and use the appropriate validator to validate
it.

Thanks
-Umesh




Elena Litani wrote:

> Hi, Umesh,
>
> >
> > I am having problems validating xml documents against schemas defined using
> > the 1999 spec. I am using Xerces 1.3.0. Is the support for the older
> > versions of schemas discontinued?
>
> Yes. We upgraded schema support to the schema CR draft at a similar
> level to that which had existed for the WD schema specifications.
>
> You must use correct syntax for your schemas, see
> http://www.w3.org/TR/2000/CR-xmlschema-1-20001024/.
>
> Elena.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-user-help@xml.apache.org


Re: Xerces 1.3.0 and schemas

Posted by Elena Litani <hl...@jtcsv.com>.
Hi, Umesh,


> 
> I am having problems validating xml documents against schemas defined using
> the 1999 spec. I am using Xerces 1.3.0. Is the support for the older
> versions of schemas discontinued?

Yes. We upgraded schema support to the schema CR draft at a similar
level to that which had existed for the WD schema specifications.

You must use correct syntax for your schemas, see
http://www.w3.org/TR/2000/CR-xmlschema-1-20001024/.

Elena.

Xerces 1.3.0 and schemas

Posted by Umesh Subramanian <Um...@msdw.com>.
I am having problems validating xml documents against schemas defined using
the 1999 spec. I am using Xerces 1.3.0. Is the support for the older
versions of schemas discontinued?

The entity resolver that I have registered never gets called. The xml is:

<?xml version="1.0" encoding="UTF-8"?>

<theRoot xmlns="http://foo.com/ooo"
    xmlns:ppp="http://foo.com/ppp"
    xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
    xsi:schemaLocation="http://foo.com/ooo xml.xsd">
  <name>Mon nom</name>
  <number>65</number>
</theRoot>

[Error] xml.xml:6:53: General Schema Error: Grammar with uri 2:
http://foo.com/ooo , can not found.
[Error] xml.xml:6:53: Element type "theRoot" must be declared.
[Error] xml.xml:7:9: Element type "name" must be declared.
[Error] xml.xml:8:11: Element type "number" must be declared.

The validation works fine with Xerces version 1.2.0.

Also if I change the xsi attribute to say 10/2000, the entity resolver
_does_ get called, but of course, it complains that my schema is not well
defined.

Any help is appreciated
-Umesh





Re: Deferred DOM warning

Posted by Arnaud Le Hors <le...@us.ibm.com>.
Interesting. Some time ago while I was working on the DOM code I
realized that this must be happening. I fixed some of this by turning
off events firing while doing the lazy stuff. But I'm not really
surprised that it's not complete. I'll give it a more careful review and
see if I can find other places that need to be fixed. If you have any
more specific info, scenarios, or examples that exhibit problems, please
let me know.
Thanks for reporting this anyway.
-- 
Arnaud  Le Hors - IBM Cupertino, XML Strategy Group