473,472 Members | 1,727 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

validating using XSL + java

I am using an XML schema to check (validate) the structure of an XML
document. But since I cannot check everything I need using a schema, I
am thinking of using XSL for more detailed checks (value comparisons
etc.) in a second step.

Validation using an XML schema is pretty straight forward: I simply
define the schema document when parsing the XML to a DOM model in my
Java code. Any validation problems comes out as exceptions (which I know
how to handle).

But how do I generate exceptions when applying XSL to my document? I.e.
how will I be notified that some conditions (that I defined in the XSL
document) are false? I guess what I need to know is how to use XSL as a
validation tool in a Java application.

Any advice, links etc would be much apprechiated.
/ulf
Jul 20 '05 #1
1 2093


Ulf Nordlund wrote:

But how do I generate exceptions when applying XSL to my document? I.e.
how will I be notified that some conditions (that I defined in the XSL
document) are false? I guess what I need to know is how to use XSL as a
validation tool in a Java application.


Schematron is a schema language that allows you to make certain
assertions and then check them using an XSLT 1.0 processor:
<http://xml.ascc.net/resource/schematron/schematron.html>
Not sure that is what you are looking for but check that out yourself.

--

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

0
by: bugbear | last post by:
Subject pretty much says it all. I'd like to parse XML (duh!) using Xerces (because its fast, and reliable, and comprehensive, and supports lots of features). I'd like to conform to standards...
1
by: Kevin Partin | last post by:
I have downloaded the latest Xerces-J files from Apache.org and am trying to use them to validate an xml data file against a schema that I wrote. Can someone please provide me with the java command...
1
by: scorpion | last post by:
I have this problem that an xml instance is validated correctly by xml tools, but not with my simple code, by setting the validating flag to true. --------------- Schema...
1
by: Bernd Oninger | last post by:
Ok, in order to validate a given xml file against a given xsd file I would like to type at the command prompt something like java -classpath .;\blah\bluh\foo.jar myxmlfile.xml Is there such a...
2
by: Cigdem | last post by:
Hello, I am trying to parse the XML files that the user selects(XML files are on anoher OS400 system called "wkdis3"). But i am permenantly getting that error: Directory0: \\wkdis3\ROOT\home...
0
by: Gary Shell | last post by:
I am experiencing some strange behavior between a UserControl's validating event and a treeview control. Initially, I thought it was related to an issue in the Knowledgebase article 810852...
1
by: Cesar | last post by:
Hello, I've developed a .NET C# web service; which has one method named, let's say, upload_your_data. This method has one parameter ( string your_data). The value that this parameter will...
232
by: robert maas, see http://tinyurl.com/uh3t | last post by:
I'm working on examples of programming in several languages, all (except PHP) running under CGI so that I can show both the source files and the actually running of the examples online. The first...
2
by: hardieca | last post by:
Hi, I'd like to know if anyone knows of any resources detailing the best practices of validating rules in the business tier and providing helpful error messages to users in the UI tier. All the...
0
by: Lucilue2003 | last post by:
Hello, I need help validating an xml file against an external DTD. The below code allows me to read the xml file and gather specific elements of interest. If the xml looked like this, How...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
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...
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,...
1
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.