You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Amit Mitkar <am...@sigmasoft.biz> on 2003/10/06 15:15:56 UTC
Validating Serialization
Hi ,
I am creating a DOM tree in memory and am associating a dtd with it.
The dtd specifies that some elements are to be present in the tree in a
particular order( sequence).
I am adding the elements to the DOM tree in the required sequence .
After i serialize the doc using the DOMWriter, the elements are not in the
required sequence. Is
there a way whereby, i can ensure that the serialized XML conforms to
my requirement ?
I suspect i am missing something but cannot figure it out.
please help
Thanks
Amit
RE: Validating Serialization
Posted by Gareth Reakes <ga...@decisionsoft.com>.
Hi Amit,
>
> Yeah, actually i realized my mistake soon after, sorry about that. But, i'd
> still like to know that is there not a facility whereby, we can, before
> adding a DOMNode to the tree, check that the addition will result in an
> invalid schema ?. I didn't get what exactly you meant by in-memory
> validation.
>
Currently we only perform validation when we parse. We need to extend this
to give us the ability to see if an in memory DOM Tree is valid. We will
(at some point) then need to extend this so we can implement the DOM Level
3 Validation spec. This spec does what you want.
Gareth
--
Gareth Reakes, Head of Product Development +44-1865-203192
DecisionSoft Limited http://www.decisionsoft.com
XML Development and Services
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
RE: Validating Serialization
Posted by Amit Mitkar <am...@sigmasoft.biz>.
Hi Gareth,
>Are you sure about this? It seems likly that you are adding them in the
>wrong order.
Yeah, actually i realized my mistake soon after, sorry about that. But, i'd
still like to know that is there not a facility whereby, we can, before
adding a DOMNode to the tree, check that the addition will result in an
invalid schema ?. I didn't get what exactly you meant by in-memory
validation.
Thanks A Ton
Regards
Amit.
-----Original Message-----
From: Gareth Reakes [mailto:gareth@decisionsoft.com]
Sent: Tuesday, October 07, 2003 5:54 PM
To: xerces-c-dev@xml.apache.org
Subject: Re: Validating Serialization
Hi,
> I am adding the elements to the DOM tree in the required sequence .
> After i serialize the doc using the DOMWriter, the elements are not in the
> required sequence. Is
Are you sure about this? It seems likly that you are adding them in the
wrong order.
> there a way whereby, i can ensure that the serialized XML conforms to
> my requirement ?
The only way currently is to validate it again. We will do in memory
validation eventaully. There is an additional DOM spec that we have no
plans to implement currently that allows you to see if you edits still
create a valid document.
Gareth
--
Gareth Reakes, Head of Product Development +44-1865-203192
DecisionSoft Limited http://www.decisionsoft.com
XML Development and Services
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
Re: Validating Serialization
Posted by Gareth Reakes <ga...@decisionsoft.com>.
Hi,
> I am adding the elements to the DOM tree in the required sequence .
> After i serialize the doc using the DOMWriter, the elements are not in the
> required sequence. Is
Are you sure about this? It seems likly that you are adding them in the
wrong order.
> there a way whereby, i can ensure that the serialized XML conforms to
> my requirement ?
The only way currently is to validate it again. We will do in memory
validation eventaully. There is an additional DOM spec that we have no
plans to implement currently that allows you to see if you edits still
create a valid document.
Gareth
--
Gareth Reakes, Head of Product Development +44-1865-203192
DecisionSoft Limited http://www.decisionsoft.com
XML Development and Services
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org