Your file: URLs are not correct.  They should look like:

file:///C:/server_repository/xsd

Jeff
----- Original Message ----- 
From: "Franz-Josef Herpers" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, January 26, 2004 8:22 AM
Subject: Re: include and redefine with XML Schema API


> I've isolated and worked around my problem now. In fact it's the way I
> instantiate the
> XMLInputSource from which my XMLSchemaLoader loads the grammar:
>
> XMLInputSource is = new XMLInputSource(
> null,
> null,
> "file:/C://server_repository/xsd/",
> schemaFileInputStream,
> null);
> As you can see I pass the constructor a baseSystemId and a
> FileInputStream. But the XMLSchemaLoader is apparently not able to
> resolve the relative schemaLocation-Attributes in my includes and
> redefines in the XML schema. But shouldn't that be enough information if
>   there is a baseURI against which the relative URIs aren being resolved?
>
> The workaround I found is to pass the constructor a random systemId in
> the base directory:
>
> XMLInputSource is = new XMLInputSource(
> null, "file:/C://server_repository/xsd/mySchema.xsd",
> "file:/C://server_repository/xsd/",
> schemaFileInputStream,
> null);
>
> That works, even if there is no file mySchema.xsd and I pass no
> baseSystemId into the constructor. The XMLLoader just takes the
> FileInputStream.
>
> Can someone possibly spread some light on my confusion?
>
> Thanks in advance
> Franz
>
>
>
> Franz-Josef Herpers wrote:
>
> > Hi *,
> >
> > I'm using the XML Schema API to generate a tree based structure of the
> > allowed elements and attributes of a XML Schema. Everything works fine
> > and as expected with a few lines of code.
> >
> > My problem is that I have to deal with XML Schmemas that use <include>
> > and <redefine> elements. This seems not to be supported by the XML
> > Schema API. The schema components which are defined in a include are
> > simply not included and hence not retrieved by the interface methods of
> > the API. I didn't find any methods to retrieve included or redefined
> > schemas explicitly either.
> >
> > So my question is: How can I handle XML Schemas wich use the include or
> > redefine feature of XML Schema with the XML Schema API of Xerces-J. I'm
> > using Xerces 2.6.0?
> >
> > Thank you in advance for any suggestions and hints.
> >
> > Regards
> > Franz
> >
> >
>
> -- 
> Franz-Josef Herpers
> Puschkinallee 9A
> 12435 Berlin
> 030/53 21 33 02
> 0173/54 23 666
> [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]

Reply via email to