473,791 Members | 3,015 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1513


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.valid ation 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
11674
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
3096
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 sources as described on http://www.protonicdesign.com/tutorial/sablot_and_php.php, but I want to do it without uninstalling and breaking present configuration. I just need append support for XSLT Sablotron.
4
1897
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
3087
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
3628
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 two is the best? Are there good reasons to use the Try-Catch? Will the "on error goto" disapear in the future? Are there any logical reasons to use trey-catch? Is it 'better' programming? etc etc :-)
0
9669
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9515
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10427
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10155
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7537
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6776
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5431
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4110
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2916
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.