473,407 Members | 2,676 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,407 software developers and data experts.

JAXP:SAX: EntityResolver never used

Hi,
I use the Xerces SAXParser to read my documents in Java. For that I
wrote an EntityResolver so that the parse can use a schema to validate
them. Now that is the problem. The parser does never call my
EntityResolver and so gives out an error message

[java] INFO SystemID: ./xyz-01.xml
[java] INFO PublicID: null
[java] ERROR test.xml: line=8 : column=30 : message=cvc-elt.1:
Cannot find the declaration of element 'xyz'.
[java] org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the
declaration of element 'xyz'.

What do I have to do that the parser calls the EntityResolver to get the
InputSource of my schema files?

here are the first ew lines of a xml file sample:
<?xml version="1.0" encoding="iso-8859-1"?>
<xyz
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="xyz-schema.xsd"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xml="http://www.w3.org/XML/1998/namespace"
label="test">
.....

My search in the net was without a result so this is a rather unusual
error I think. Can anybody help?

Greets

Thomas

--
#!/bin/bash
echo "<EOF>"

Jul 20 '05 #1
0 2073

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: soni | last post by:
I am trying to Validate a XML file against a XSD file. I am having errors with the Schema and language Properties import java.io.*; import org.xml.sax.*; import...
0
by: Thorsten Meininger | last post by:
As far as I know one could access DOM trees through "pure" DOM and through JAXP using DOM. I have seen dozends of examples but I could not find any differences between the two methods. Which java...
4
by: joes | last post by:
Hello there I tried for several days to get a simple validation with xml schema & xerces working. Goal for me is tuse JAXP and not specific Xerces classes. I don't get the point what I am doing...
0
by: Philippe Poulard | last post by:
hi, i have to build a DOM tree from a SAX flow what is the best way to perform this with JAXP ? i think that the copy transformer suits that problem (SAXSource to DOMResult), but perhaps i...
0
by: Soren Kuula | last post by:
Hi, I need to know all element and attribute declarations in a DTD. It must work with -- what are they called, genral entity references, too; that is, if the DTD is partitioned into several...
8
by: erik_midtskogen | last post by:
Hi Folks, I'm writing a general-purpose HTML screen-scraping framework in Java (scrape new web sites without writing new code, yada yada...), and I want to use the JAXP DOM api along with XPath...
3
dmjpro
by: dmjpro | last post by:
Is anything new in SAX??? Is there any problem with JAXP??? Then why SUN introduced two techniques JAXP and SAX???? Plz explain. Kind regards, Dmjpro.
1
by: kokababu | last post by:
Hi, I want to validate xml againest xsd. I have downloaded the jaxp1.3 and my jdk version is 1.5. I am using Eclipse. I am validating the following way: SAXParserFactory spf =...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
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,...

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.