Daniel Barclay <[EMAIL PROTECTED]> wrote on 05/24/2005 01:24:22 PM:

> Does Xerces' XML Schema API support getting the source location of
> the XML construct that represents a given schema component (yes, only
> when the XML representation is involved)?

No, but each namespace schema information information item [1] contains a 
set (possibly empty) of the schema documents which contributed to the 
schema (for the given target namespace). In the XML Schema API this is 
represented by an unordered list of document locations [2].

> If not, does anyone have an idea how difficult it would be to implement
> that?

The source location is probably available when a component is being built 
but isn't stored since it's not a property of the component. You may be 
able to get this information from the Eclipse XSD API [3] which provides 
access to XML schema document information.
 
> (My main requirement is to be able to identify which source XML schema
> document entity defined a given schema component, to be able to perform
> my processing on only the components defined by that document even if
> Xerces needs to read multiple schema documents (via including and
> importing) to have a valid schema.  I'd also like to be able to report
> the line and column information for (the XML construct defining) each
> schema component.)
> 
> Thanks.
> 
> 
> Daniel
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

[1] http://www.w3.org/TR/xmlschema-1/#nsi-schema_namespace
[2] 
http://www.w3.org/Submission/2004/SUBM-xmlschema-api-20040309/xml-schema-api.html#XSNamespaceItemp-documentLocations
[3] http://www.eclipse.org/xsd/

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: [EMAIL PROTECTED]
E-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to