You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Jennifer Schachter <ja...@decisionsoft.com> on 2002/11/01 10:47:02 UTC

XMLUri - resolving relative URIs

Hi, 

I am trying to use XMLUri to build a relative URI using the following 
constructor:  

XMLUri::XMLUri (  const XMLUri *const baseURI, const XMLCh *const uriSpec )

For the first parameter I have a pointer to a valid baseURI, and am passing in 
a relative URI as the second parameter. 

I am testing this using the examples of Resolving Relative URI References
from Appendix C of rfc2396. I have been finding, though, that the
newly constructed URI's text (using getUriText) that it does not match the 
results given in the rfc. 

For example, using base URI "http://a/b/c/d;p?q" and relative URI "g:h", 
the rfc says this should be resolved as "g:h" when actually the text 
returned is "http://a/b/c/g:h".

To experiment, I tried using XMLURL's constructor:

XMLURL (const XMLCh *const baseURL,const char *const relativeURL)

I found that while this worked in *more* of the examples, it didn't work 
in all of them - I can't determine why XMLURL would resolve relative 
paths different to XMLUri... 

Can anyone explain where I am going wrong? Also, can anyone account for 
the descrepencies between the way XMLUri and XMLURL resolve relative 
paths?

Thanks! 

cheers, 
Jennifer 

-- 
Jennifer "Georgina" Schachter, Software Engineer 
DecisionSoft Ltd.  http://www.decisionsoft.com 
Office: +44 (0) 1865 203192






---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org