You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Philipp Wagner <ph...@med.uni-muenchen.de> on 2009/04/15 12:52:38 UTC

xml:base not used with xsi:schemaLocation?

Hi,

I'm trying to validate a XML document that contains a schema reference
with xsi:schemaLocation (a relative path). I also have xml:base="../../"
set. Unfortunately, the schema files are not found. When I change the
path of the schema in schemaLocation (prepend ../../ from the xml:base)
the schema file is found.

For xinclude (which I also use) xml:base works.

Is this a xerces limitation or is xml:base not supported for the
schemaLocation attribute?

Philipp

---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org


Re: xml:base not used with xsi:schemaLocation?

Posted by Philipp Wagner <ph...@med.uni-muenchen.de>.
Hi Michael,

Michael Glavassevich schrieb:
>> I understand that Xerces is doing nothing wrong here and I don't know
>> what the XML Schema Working Group thinks about it, so there might be
>> some more discussion with the authors of XML Schema needed (from what
>> I've seen it's not mentioned in the XML Schema 1.1 WD either).
> 
> The XML Schema WG does have a public comments mailing list [1] and
> Bugzilla tracker [2]. It wouldn't hurt to raise this issue there.
> Discussion with the WG might result in improvements to the spec.

Seems that this already has been discussed, results at [1]:

> 3) Where we resolve relative URIs, they are absolutized using the
> [base URI] property of the relevant element, as prescribed by the XML
> Base spec.

Unfortunately I was not able to find information on how to absolutize
relative URIs in the most recent XML Schema 1.1 WD. But still, adding
support for xml:base seems to be in line with the ideas of the WG.

Philipp

[1] http://www.w3.org/Bugs/Public/show_bug.cgi?id=6011#c2

---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org


Re: xml:base not used with xsi:schemaLocation?

Posted by Michael Glavassevich <mr...@ca.ibm.com>.
Hi Philipp,

Philipp Wagner <ph...@med.uni-muenchen.de> wrote on 04/16/2009
08:59:58 AM:

> Michael Glavassevich schrieb:
> > Hi Philipp,
> >
> > Philipp Wagner <ph...@med.uni-muenchen.de> wrote on 04/16/2009
> > 02:26:36 AM:
> >
> >> Hi,
> >>
> >> Michael Glavassevich schrieb:
> >> > The XML Schema specification [1] places no requirements on
processors to
> >> > support xml:base. It's not mentioned anywhere in the spec. So while
> >> > Xerces doesn't support it in its schema processor I wouldn't
necessarily
> >> > call it a limitation.
> >>
> >> Thanks for your reponse. I already expected it to be that way :(
Still,
> >> the current behavior is confusing, as xml:base is considered for
> >> XInclude but not for Schema inclusion, i.e. the same relative path
> >> inside a XML document will resolve to two different locations when
using
> >> xml:base.
> >
> > XInclude was developed much later and actually does reference xml:base
> > so was clearer that we were supposed to do something there. If you're
> > interested in seeing this apply to schema processing too, you should
> > open a feature request [1].
>
> I did at
> http://issues.apache.org/jira/browse/XERCESJ-1366
>
> I understand that Xerces is doing nothing wrong here and I don't know
> what the XML Schema Working Group thinks about it, so there might be
> some more discussion with the authors of XML Schema needed (from what
> I've seen it's not mentioned in the XML Schema 1.1 WD either).

The XML Schema WG does have a public comments mailing list [1] and Bugzilla
tracker [2]. It wouldn't hurt to raise this issue there. Discussion with
the WG might result in improvements to the spec.

> Philipp
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
> For additional commands, e-mail: j-users-help@xerces.apache.org

Thanks.

[1] http://lists.w3.org/Archives/Public/www-xml-schema-comments/
[2] http://www.w3.org/Bugs/Public/

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org

Re: xml:base not used with xsi:schemaLocation?

Posted by Philipp Wagner <ph...@med.uni-muenchen.de>.
Michael Glavassevich schrieb:
> Hi Philipp,
> 
> Philipp Wagner <ph...@med.uni-muenchen.de> wrote on 04/16/2009
> 02:26:36 AM:
> 
>> Hi,
>>
>> Michael Glavassevich schrieb:
>> > The XML Schema specification [1] places no requirements on processors to
>> > support xml:base. It's not mentioned anywhere in the spec. So while
>> > Xerces doesn't support it in its schema processor I wouldn't necessarily
>> > call it a limitation.
>>
>> Thanks for your reponse. I already expected it to be that way :( Still,
>> the current behavior is confusing, as xml:base is considered for
>> XInclude but not for Schema inclusion, i.e. the same relative path
>> inside a XML document will resolve to two different locations when using
>> xml:base.
> 
> XInclude was developed much later and actually does reference xml:base
> so was clearer that we were supposed to do something there. If you're
> interested in seeing this apply to schema processing too, you should
> open a feature request [1].

I did at
http://issues.apache.org/jira/browse/XERCESJ-1366

I understand that Xerces is doing nothing wrong here and I don't know
what the XML Schema Working Group thinks about it, so there might be
some more discussion with the authors of XML Schema needed (from what
I've seen it's not mentioned in the XML Schema 1.1 WD either).

Philipp

---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org


Re: xml:base not used with xsi:schemaLocation?

Posted by Michael Glavassevich <mr...@ca.ibm.com>.
Hi Philipp,

Philipp Wagner <ph...@med.uni-muenchen.de> wrote on 04/16/2009
02:26:36 AM:

> Hi,
>
> Michael Glavassevich schrieb:
> > The XML Schema specification [1] places no requirements on processors
to
> > support xml:base. It's not mentioned anywhere in the spec. So while
> > Xerces doesn't support it in its schema processor I wouldn't
necessarily
> > call it a limitation.
>
> Thanks for your reponse. I already expected it to be that way :( Still,
> the current behavior is confusing, as xml:base is considered for
> XInclude but not for Schema inclusion, i.e. the same relative path
> inside a XML document will resolve to two different locations when using
> xml:base.

XInclude was developed much later and actually does reference xml:base so
was clearer that we were supposed to do something there. If you're
interested in seeing this apply to schema processing too, you should open a
feature request [1].

> Philipp
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
> For additional commands, e-mail: j-users-help@xerces.apache.org

Thanks.

[1] http://issues.apache.org/jira/browse/XERCESJ

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org

Re: xml:base not used with xsi:schemaLocation?

Posted by Philipp Wagner <ph...@med.uni-muenchen.de>.
Hi,

Michael Glavassevich schrieb:
> The XML Schema specification [1] places no requirements on processors to
> support xml:base. It's not mentioned anywhere in the spec. So while
> Xerces doesn't support it in its schema processor I wouldn't necessarily
> call it a limitation.

Thanks for your reponse. I already expected it to be that way :( Still,
the current behavior is confusing, as xml:base is considered for
XInclude but not for Schema inclusion, i.e. the same relative path
inside a XML document will resolve to two different locations when using
xml:base.

Philipp

---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org


Re: xml:base not used with xsi:schemaLocation?

Posted by Michael Glavassevich <mr...@ca.ibm.com>.
Hi Philipp,

The XML Schema specification [1] places no requirements on processors to
support xml:base. It's not mentioned anywhere in the spec. So while Xerces
doesn't support it in its schema processor I wouldn't necessarily call it a
limitation.

Thanks.

[1] http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org

Philipp Wagner <ph...@med.uni-muenchen.de> wrote on 04/15/2009
06:52:38 AM:

> Hi,
>
> I'm trying to validate a XML document that contains a schema reference
> with xsi:schemaLocation (a relative path). I also have xml:base="../../"
> set. Unfortunately, the schema files are not found. When I change the
> path of the schema in schemaLocation (prepend ../../ from the xml:base)
> the schema file is found.
>
> For xinclude (which I also use) xml:base works.
>
> Is this a xerces limitation or is xml:base not supported for the
> schemaLocation attribute?
>
> Philipp
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
> For additional commands, e-mail: j-users-help@xerces.apache.org
>