473,396 Members | 1,608 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

DOM Validation "on-the-fly"

Hello,

I have a (java) DOM object that adheres to an XML schema. I want to
manipulate it in code, but to ensure that the object still sticks to
the schema (ie, validation during the life-cycle of the DOM object, not
just upon initial parsing). Is this possible?

My investigation so far has revealed that DOM3 does provide validation
mechanisms for this, but no current parsers implement them. I've
picked up on something called the "post-schema-validation infoset"
(PSVI), but it looks like another full-blown API to learn - I just want
(ideally) a flag to indicate that I want the DOM object to reject
changes that cause it to become invalid.

I've also seem many other postings on this kind of question, but there
have never been any replies... Is this the kind of question that shows
I haven't grasped what XML and friends are all about and you're
laughing at my lack of understanding (I am new to this and am trying to
teach myself)? Should I really have another DOM object with the XSD
document in and use that to manually validate the other object?

Does anybody have any clues regarding this?

Ghee

Jul 20 '05 #1
1 1490


Ghee wrote:

I have a (java) DOM object that adheres to an XML schema. I want to
manipulate it in code, but to ensure that the object still sticks to
the schema (ie, validation during the life-cycle of the DOM object, not
just upon initial parsing). Is this possible?


Java 1.5 allows you to (re)validate a document against a schema by using
the javax.xml.validation namespace with SchemaFactory, Schema, Validator
objects and the validate method of Validator.
I don't see any features in there however to find out whether a certain
change is allowed in the way DOM Level 3 validation supports it.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

20
by: Chris Krasnichuk | last post by:
hello, Does anyone know how I make php work on "my" computer? I made a mistake in my last post so I fixed it here. Chris
2
by: Rustam Bogubaev | last post by:
Hi, I have RedHat 9.0 and installed by default Apache+PHP. By default XSLT Sablotron support is not enabled, so how can I rebuild PHP with xslt support? I know that I can rebuild it from...
4
by: Troels F. Smit | last post by:
Where can I find information on implementing a search function on my site ? -- Mvh. Troels F. Smit
10
by: Berthold Hoellmann | last post by:
Hello, When I use ./configure --with-thread --with-fpectl --with-signal-module \ --with-pymalloc --enable-shared --with-cxx=g++ make test on 2.3.3 I get
20
by: DraguVaso | last post by:
Hi, As a former VB-programmer I'm used to the "on error goto"-errorhandling. I see that in actually all the VB.NET-samples I can fin people use the "Try - catch"-errorhandling. Which of the...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.