Robbie,
 if I understand your proposal correctly then it only works for the case
where the schema location hint provided in the XML document is a resolvable
URL (and that the posted version of the schema is the one that is intended
for use).  As I understand it the processor of a document is at liberty to
interpret the hint provided by the schema location attribute in any way it
sees fit, so it may be the case that, even if someone has used an http://
style URI for a schema location and that URI is a resolvable URL,  it may
not be that the receiver wants to do an HTTP get to access the schema info,
but instead to perhaps do a database lookup with the schema location URI or
the namespace as a search key.  Interpreting "/foo.xsd" as a file on the
local file system is one way of using the hint,  but its not the only way,
it's fragile, and doesn't necessarily move well between development
environment and deployed environment.   I don't know whether we have any
plug points for catching and interpreting schema locations on the fly, or
any plans to have such.  We could have the behaviour you propose as a
default implementation.

Regards, Kelvin.

On 07/09/06, Robbie Minshall <[EMAIL PROTECTED]> wrote:

I have two questions here.  Please forgive some terminology fumbling here
as
I probably fall into the category of people SDO is meant to serve -
meaning
I have a familarity with XML but have not been bothered to truely become
empowered by it.

I have been taking a peak at Tuscany-696 and the following two issues have
come up.

****************** XML file defines schema location **********************
PROBLEMATIC SCENARIO :
XSD used to define types
XML file used to create graph of data objects
root DataObject did not resolve to a Type and hense is returned as
AnyDataObjecType

THE REASON :
The XML file includes a schema definition :

xsi:schemaLocation="http://www.example.com/xmlDocumentSchemaLocation
/XMLDocumentSchemaLocation.xsd<
http://www.example.com/xmlDocumentSchemaLocation/XMLDocumentSchemaLocation.xsd
>

XMLDocumentSchemaLocation.xsd defines the Type for the root dataobject -
in
this case :
                       <xsd:element name="purchaseReport">
                       . . . .
                      </xsd:element>

SOLUTION ? :
When the XML file is loaded and the
http://www.example.com/xmlDocumentSchemaLocation defined the Types within
the schema should be defined in SDO land.  This is needed so that the
Types
are correctly assigned to the DataObject that rely on these Type
definition.

The problem here is where should they be defined.  If there were no
scoping
for TypeHelper and Type definitions then it is easy but this is not the
case.

When I use the XSDHelper to define the Type myself prior to loading the
XML
file everything works fine.  However, it does not seem like a good
solution
to expect people to do this.

What do people think about this scenario ?


****************** NoNameSpace **********************
Similar to above except defines schema for noNamespaceSchemaLocation i.e

xsi:noNamespaceSchemaLocation="/XMLDocumentNoNamespaceSchemaLocation.xsd"

It does not seem that we have a default uri for no namespace schemas.  How
should these Type definitions be scoped ?  Should we have a default uri
for
no namespace schemas ?



Thanks for you thoughts, corrections and insights :-)

Robbie

















--
* * * Charlie * * *
Check out some pics of little Charlie at
http://www.flickr.com/photos/[EMAIL PROTECTED]/sets/

* * * Addresss * * *
1914 Overland Drive
Chapel Hill
NC 27517

* * * Number * * *
919-225-1553




--
Best Regards
Kelvin Goodson

Reply via email to