473,804 Members | 3,312 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Malfor medURLException
at java.net.URL.<i nit>(URL.java:6 13)
at java.net.URL.<i nit>(URL.java:4 76)
at java.net.URL.<i nit>(URL.java:4 25)
at org.apache.xerc es.impl.XMLEnti tyManager.setup CurrentEntity(U nknown
Source)

[etc.]

The same thing appens with external entity uri declaration :

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

throws a MalformedURLExc eption.

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

Yours,
Sylvain

Jul 20 '05 #1
4 1757
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.Malfor medURLException


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.Malfor medURLException


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.Malfor medURLException
at java.net.URL.<i nit>(URL.java:6 13)
at java.net.URL.<i nit>(URL.java:4 76)
at java.net.URL.<i nit>(URL.java:4 25)
at org.apache.xerc es.impl.XMLEnti tyManager.setup CurrentEntity(U nknown
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.Malfor medURLException
at java.net.URL.<i nit>(URL.java:6 13)
at java.net.URL.<i nit>(URL.java:4 76)
at java.net.URL.<i nit>(URL.java:4 25)
at org.apache.xerc es.impl.XMLEnti tyManager.setup CurrentEntity(U nknown
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
2721
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 c:\xerces-2_4_0\xml-apis.jar c:\xerces-2_4_0\xmlParserAPIS.jar c:\xerces-2_4_0\data c:\xerces-2_4_0\docs c:\xerces-2_4_0\samples there is no bin directory, my question is :
0
3091
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 them. Basically i am tryin to do simple tree transversale and get the node values out
0
1855
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 development server, which runs Solaris 2.8. I do use CC 6.2 for my compiler. I have reset all the environment variables in Korn shell that point to the Xerces distribution. When I try to compile the same piece of code that compiles fine under Xerces...
0
1826
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 beta2-dom3-Xerces-J-bin.2.6 and added the following paths to my CLASSPATH: ..../xerces-2_6_2/xercesImpl.jar: ..../xerces-2_6_2/dom3-xercesImpl.jar: ..../xerces-2_6_2/dom3-xml-apis.jar: ..../xerces-2_6_2/xmlParserAPIs.jar: ..../xerces-2_6_2/xercesSamples.jar:
18
7740
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); System.out.println(xp.evaluate(new InputSource(new FileInputStream("a.xml"))));
3
3405
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 pre-98) without having to build the library from source? We posed this question to the Xerces-users email list, but have yet to
2
3412
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 it? cheers, Vlad The exception is... tv.ditg.sdl.ParsingException: tv.ditg.sdl.ParsingException:
3
1944
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 fait, il s'agit d'une erreur Xerces FWK005, et nous sommes incapables de trouver d'où elle provient dans le code. Nous avons déjà essayé de rendre toutes les méthodes qui appellent Xerces synchronized, mais celà
9
3023
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> <binaryobject3></binaryobject3>
0
9575
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
10564
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
10308
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,...
0
10073
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9134
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5513
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...
0
5645
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3806
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2981
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.