[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Entity resolution vs. URI resolution
At 1:58 PM -0500 1/24/02, Norman Walsh wrote: >| offers exactly the functionality you're looking for: >| >| public URL(URL context, >| String spec) >| throws MalformedURLException > >Uhm. I'm confused. That'll return the stream, but I actually want the >URI to be passed through *the resolver* (for example XML Catalogs[1]) >not blindly slurped across the net. > No, that doesn't create a stream. It just constructs a new URL object. If you want to get a stream (You don't have to) then you would call openStream() on the new object. YOu should also check out the new java.net.URI class in Java 1.4: http://java.sun.com/j2se/1.4/docs/api/java/net/URI.html The following methods are particularly interesting: public URI resolve(URI uri) public URI resolve(String uri) These return the absolute form of the uri argument using the current URI object as the context. Isn't this what you want? -- +-----------------------+------------------------+-------------------+ | Elliotte Rusty Harold | elharo@m... | Writer/Programmer | +-----------------------+------------------------+-------------------+ | The XML Bible, 2nd Edition (Hungry Minds, 2001) | | http://www.ibiblio.org/xml/books/bible2/ | | http://www.amazon.com/exec/obidos/ISBN=0764547607/cafeaulaitA/ | +----------------------------------+---------------------------------+ | Read Cafe au Lait for Java News: http://www.cafeaulait.org/ | | Read Cafe con Leche for XML News: http://www.ibiblio.org/xml/ | +----------------------------------+---------------------------------+
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|