Java Mailing List Archive

http://www.junlu.com/

Google Search
Google


Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Struts - A MVC web framework
Tomcat - JSP/Servlet container
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
JSP - A mailing list about Java Server Pages specification and reference
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Oracle Connection Pooling in 3 2 2
Servlet : Session invalidate
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Tomcat and webapplication specific java library path
Running a Simple JMS Example
Mapping in workers2 properties
org apache jasper JasperException
Cannot find message resources under key org apache struts action
   MESSAGE
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
url string for connecting jboss to oracle
Value attribute of <html:checkbox
javax servlet ServletException: BeanUtils populate
HTTP Status 404 The requested resource is not available
5 0 18: Windows XP Pro vs Windows 2000
 
Search:  
Power your search with and, or, +, -, or "some phrase" operators.
SV: SV: [jdom-interest] One less TODO item

SV: SV: [jdom-interest] One less TODO item

2003-10-07       - By Per Norrman

 Back
Reply:     1     2     3     4     5  

What, do you append '/' before loading the resource?
In principle,  http://www.cafeconleche.org is not the same
resource as  http://www.cafeconleche.org/. It probably is for
the overwhelming majority of cases, but I vaguley remember a
case where wasn't (can't come up with the details).

I looked again at the RFC 2396, and I'm now leaning on that the correct
resolution of DTD/xyz to the base URI http://www.cafeconleche.org
is indeed  http://www.cafeconleche.orgDTD/xyz. Obviously, this is not
the desired result, but there is a concise algorithm in the spec
that yields this result!. Perhaps this quote from section 5.1.4 of said
document encapsulates the problem:

  It is the responsibility of the distributor(s) of a document
  containing relative URI to ensure that the base URI for that document
  can be established.  It must be emphasized that relative URI cannot
  be used reliably in situations where the document's base URI is not
  well-defined.

This *is* a murky area!

/pmn




> -- --Ursprungligt meddelande-- --
> Fr?n: Elliotte Rusty Harold [mailto:elharo@(protected)]
> Skickat: den 7 oktober 2003 18:35
> Till: Per Norrman
> Kopia: jdom-interest@(protected)
> ?mne: Re: SV: [jdom-interest] One less TODO item
>
>
> >Hmm,
> >
> >I thought it was the SAXParsers (or XMLReader) that resolved the
> >relative URI. If I supply an EntityResolver to either crimson or
> >xerces, the system id is already resolved when the callback is made.
> >How do you work around that in XOM? Or does it have its own parser?
> >
>
> I look at the URLs that are fed in and if they don't have a path
> component, I add a / at the end. Really simple.
>
> It's a hack, I admit, and it only works for URLs that don't have path
> components, but it does help XOM work with a lot of URLs it would
> otherwise fail on.
>
> I reported this bug in Xerces some time ago (or at least I thought I
> did. Can't seem to find it in Bugzilla at the moment). However, it's
> still present in 2.5. It's one of the few bugs left in Xerces that
> affects XOM. This compares very well to other parsers, most of which
> have dozens of bugs the XOM unit tests expose.
>
> OK, I found the bug. It's
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id345 (God, I hate
> Bugzilla.) Hmm, look like they claim it's fixed in 2.5 but I could
> swear I'm still seeing it. Possibly I'm using an older parser? I'll
> look into this further. If Xerrces has indeed fixed this, then all
> JDOM has to do is ship the latest Xerces.
>
> Oh, I bet I know what's going on. I think I'm loading the older
> Xerces bundled with Java 1.4.2 rather than the bug fixed version.
> Hmm, not that's not it. OK, I've got it. They've instituted something
> equivalent to the same workaround I used. In other words, they can
> handle http://www.cafeconleche.org but not http://www.ibiblio.org/xml
> and this can be verified with Xerces's own sax.Counter Source code of sax.Counter program. I'll
> reopen the bug.
>
> --
>
>    Elliotte Rusty Harold
>    elharo@(protected)
>    Processing XML with Java (Addison-Wesley, 2002)
>    http://www.cafeconleche.org/books/xmljava
>    http://www.amazon.com/exec/obidos/ISBN%3D0201771861/cafeaulaitA
>

__ ____ ____ ____ ____ ____ ____ ____ ____ ____
To control your jdom-interest membership:
http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@(protected)
.com



Earn $52 per hosting referral at Lunarpages.
©2008 junlu.com - Jax Systems, LLC, U.S.A.