Hi James,
You can do this for imports today, but not for includes. Includes are
treated as "inline" inclusion and the types read via an include are
added directly to the including schema.
However, for imports, you can pass in a custom URIResolver
implementation. This URIResolver can then return an instance of
SchemaLocation, which can contain a reference to an in-memory schema
object.
--Keith
> James Taylor wrote:
>
> Is it possible in the schema model framework to share the same Schema
> instance (i.e. org.exolab.castor.xml.schema.Schema) when multiple top
> level schemas include the same schema? For example, if SchemaA
> includes SchemaC and SchemaD, while SchemaB includes SchemaD and
> SchemaE, I�d like the SchemaD instance to be shared by SchemaA and
> SchemaB:
>
>
>
> SchemaA SchemaB
>
> +
> +
>
> +-------------+-----------+
> +----------+-------------+
>
> | |
> | |
>
> SchemaC SchemaD
> SchemaE
>
>
>
> This would potentially save on parsing time and memory if attempting
> to cache schema model objects. Related to this, are there hooks in
> the framework to resolve an included schema? For example, if a schema
> resides inside of a database, I�d like to be able to resolve the
> include of it myself.
>
>
>
> Thanks,
>
>
>
> James
>
> ---------------------------------------------------------------
> -----------------------------------------------------------
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
> unsubscribe castor-user
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user