 |
 |
 |
I want to validate updates to a document made via XUpdate.
At this point, I primarily wish to remove the ignorable white
space from the updated document as it is updated.
I have no experience with validation. I'm assuming that it is
possible to validate an individual node using one of existing
Schema engines, but I have no idea where to start.
There are two methods to pursue.
1) Create an XML Schema for XUpdate, use nested XML Schemas.
If this removes whitespace, and validates the XUpdate
statement, I can then insert the result.
There are some use cases of XUpdate, inserting a text node,
where I am certian you need to look at the result.
2) Use a validation API that answers the question, "is this
node, given this parsed schema, valid it it's current
context?" This seems to be called "partial validation".
If I pursue 1) then I'll have to learn a lot of new things
before I can strip that whitespace. (It seems like I'll be
hacking XML Schema for every update statement.)
If I pursue 2) I'll be able to swap out schema implementations.
I'm reading through javax.xml.validation for a crack at 2).
It seems to take a node and validate all the children. I'm not
sure if this is what I want. If I add an attribute to the root
node of a large document, I don't need to validate the entire
document, just the attributes of the newly modified node.
And insight is appreciated.
Cheers.
--
Alan Gutierrez - alan@e...
- http://engrm.com/blogometer/index.html
- http://engrm.com/blogometer/rss.2.0.xml
|
 | 

|  |
These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.
|  |
| |
 |
 |
 |