473,396 Members | 2,004 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.

URI recognition with Xerces-j

SL
Hi,

Im' using Xerces-j (version 2.0.1 and 2.6.2). When parsing this prolog :

<!DOCTYPE teiCorpus
PUBLIC "-//TEI Consortium//DTD TEI P4//EN"
"d:/Program Files/tei-emacs/sgml/dtds/tei/tei2.dtd" [

Xerces return this error stack :

java.net.MalformedURLException
at java.net.URL.<init>(URL.java:613)
at java.net.URL.<init>(URL.java:476)
at java.net.URL.<init>(URL.java:425)
at org.apache.xerces.impl.XMLEntityManager.setupCurre ntEntity(Unknown
Source)

[etc.]

The same thing appens with external entity uri declaration :

<!ENTITY DE_CC 'C:\home\Corpus\Courant\CC.xml'>

throws a MalformedURLException.

I have absolutly no idea of the reason why Xerces do that. Any hint welcome
!

Yours,
Sylvain

Jul 20 '05 #1
4 1731
SL
> The same thing appens with external entity uri declaration :

<!ENTITY DE_CC 'C:\home\Corpus\Courant\CC.xml'>


As well as with :

<!ENTITY DE_CC SYSTEM
'C:/home/Corpus/Courant/CC.xml'>

Jul 20 '05 #2


SL wrote:
Im' using Xerces-j (version 2.0.1 and 2.6.2). When parsing this prolog :

<!DOCTYPE teiCorpus
PUBLIC "-//TEI Consortium//DTD TEI P4//EN"
"d:/Program Files/tei-emacs/sgml/dtds/tei/tei2.dtd" [

Xerces return this error stack :

java.net.MalformedURLException


What you have is not a URL, you need
"file:///d:/Program Files/tei-emacs/sgml/dtds/tei/tei2.dtd"
to have a URL pointing to a resource in the local file system.
I think it is not even Xerces complaining but the built-in java.net.URL
class.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 20 '05 #3
SL
> > Im' using Xerces-j (version 2.0.1 and 2.6.2). When parsing this prolog :

<!DOCTYPE teiCorpus
PUBLIC "-//TEI Consortium//DTD TEI P4//EN"
"d:/Program Files/tei-emacs/sgml/dtds/tei/tei2.dtd" [

Xerces return this error stack :

java.net.MalformedURLException


What you have is not a URL, you need
"file:///d:/Program Files/tei-emacs/sgml/dtds/tei/tei2.dtd"
to have a URL pointing to a resource in the local file system.
I think it is not even Xerces complaining but the built-in java.net.URL
class.


Thanks ! "file:" works. But this document :

<!DOCTYPE teiCorpus.2
SYSTEM "file:///c:/home/Corpus/dtd/myPizza.dtd" []>
<teiCorpus.2>
</teiCorpus.2>

Is still making java.net.URL complaining :

java.net.MalformedURLException
at java.net.URL.<init>(URL.java:613)
at java.net.URL.<init>(URL.java:476)
at java.net.URL.<init>(URL.java:425)
at org.apache.xerces.impl.XMLEntityManager.setupCurre ntEntity(Unknown
Source)

(with C: instead of c: and with antislash as well)

but works perfectly with xmllint. I can't found where the exception is
thrown in java.net.URL : the try block surrounds a large piece of code.

SL

Jul 20 '05 #4
SL wrote:
<!DOCTYPE teiCorpus.2
SYSTEM "file:///c:/home/Corpus/dtd/myPizza.dtd" []>
<teiCorpus.2>
</teiCorpus.2>

Is still making java.net.URL complaining :

java.net.MalformedURLException
at java.net.URL.<init>(URL.java:613)
at java.net.URL.<init>(URL.java:476)
at java.net.URL.<init>(URL.java:425)
at org.apache.xerces.impl.XMLEntityManager.setupCurre ntEntity(Unknown
Source)


file://c|/home/Corpus/dtd/myPizza.dtd
?
--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)
Jul 20 '05 #5

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

Similar topics

2
by: Bekkali Hicham | last post by:
hi, i have downloaded the latest version 2.4 of Xerces, and unziped it, i end up with a diectory hierarchy like this c:\xerces-2_4_0\XercesImpl.jar c:\xerces-2_4_0\XercesSamples.jar...
0
by: Waseem | last post by:
Hi I have looked and tried everything and i still cant sort this out i have no idea why this wont work I am using Xerces Perl on Windows and Debian to try this and it wont work on both of...
0
by: Jim Phelps | last post by:
After having memory leak issues with Xerces-c 2.3.0 for Solaris 2.7 for CC 6.2 I have decided to update to at least 2.4. I have downloaded the binary tarball and have installed it on my...
0
by: Dale Gerdemann | last post by:
I've been trying to use DOM level 3 with xerces-2_6_2. There's a sample called samples/DOM3.java, but I've had trouble with compilation. I've downloaded Xerces-J-bin.2.6.2 and...
18
by: jacksu | last post by:
I have a simple program to run xpath with xerces 1_2_7 XPathFactory factory = XPathFactory.newInstance(); XPath xPath = factory.newXPath(); XPathExpression xp = xPath.compile(strXpr);...
3
by: Matt | last post by:
Hello, Summary: Where can one download a Xerces-C (XML pardser) dynamic library file (.DLL file) for Windows (Win98/WinNT/Win2k/WinXP/Win2003, including server flavors; don't need to support...
2
by: Vlad Zorinov | last post by:
I'm getting the following error after a couple of months of XML processing, using Xerces 2.0.0 in an apache tomcat. Does anyone have any ideas what this problem may be or what I should do to solve...
3
by: Raphael Tagliani | last post by:
(english version below) Bonjour! Je travaille sur un gros projet java, qui parse beaucoup de fichiers xml au lancement d'un serveur. Nous avons un problème de concurrence qu lancement. En...
9
by: mstilli | last post by:
Hi, I am trying to use schema for server side validation using xerces to catch the validation errors. validating this XML: <Content4> <textarea13></textarea13>...
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
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?
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
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
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.