You can only set the primary entity (the one you pass in to parse) via an
input source.
The thing is that the URL class is an OO class and is general purpose and
should use exceptions to report errors. What is needed is not to hack up the
URL class and make it less desirable, but to provide external optimizations
that prevent it from being used such that it would create exceptions unless
they are for real.
A bit of probing could quickly determine the correct thing most of the time.
For instance, if it starts with a '.', then its relative which means its of
the type of its parent, which is known. That would handle many of the cases,
since the parser could then internally use the correct type of input source
and avoid this issue. If it starts with http or ftp, then its its a URL. If
it starts with x: or / then its a local file.
--------------------------
Dean Roddey
The Charmed Quark Controller
Charmed Quark Software
[EMAIL PROTECTED]
http://www.charmedquark.com
"If it don't have a control port, don't buy it!"
----- Original Message -----
From: "Murphy, James" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, August 31, 2001 1:59 PM
Subject: RE: void XMLURL::setURL(const XMLCh* const urlText)
> Hmm. I mean external entities like schemas? iif I have:
>
> <bar xmlns = "foo" schemaLocation="foo c:\schemas\foo.xsd">
> ...
> </bar>
>
> with validation on "c:\schemas\foo.xsd" is parsed like a url first and an
> exceptionis thrown. Are you saying I have set the schema location
manually
> using a LocalFileInputSource?
>
> Jim
>
> > -----Original Message-----
> > From: Dean Roddey [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, August 31, 2001 4:51 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: void XMLURL::setURL(const XMLCh* const urlText)
> >
> >
> > Use LocalFileInputSource to pass in your file names, then the
> > parser won't
> > have to figure it out itself.
> >
> > --------------------------
> > Dean Roddey
> > The Charmed Quark Controller
> > Charmed Quark Software
> > [EMAIL PROTECTED]
> > http://www.charmedquark.com
> >
> > "If it don't have a control port, don't buy it!"
> >
> >
> > ----- Original Message -----
> > From: "Murphy, James" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Friday, August 31, 2001 8:05 AM
> > Subject: void XMLURL::setURL(const XMLCh* const urlText)
> >
> >
> > > I really wish[1] didn't throw an exception when parsing a
> > pathname instead
> > > of a url. Just returning false would be better in my view.
> > This creates
> > > 6-10 exception per parse for use since we _always_ have
> > file paths not
> > urls
> > > for our schema locations. It really muddies up debugging.
> > >
> > > A couple of spots to bubble up the return code would be easy but
> > eventually
> > > end when the constructor throw an exception. I'm not a big
> > fan of that
> > > behavior either.
> > >
> > > Thoughts?
> > >
> > > Jim
> > >
> > >
> > > [1] void XMLURL::parse(const XMLCh* const urlText)
> > >
> > >
> > >
> > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]