Groups | Blog | Home
all groups > dotnet xml > october 2003 >

dotnet xml : Modular schemas


Dare Obasanjo [MSFT]
10/23/2003 10:17:25 AM
Are the files relative to the current directory the application is launched
from or the directory were the file was loaded from?

--
This posting is provided "AS IS" with no warranties, and confers no rights.

[quoted text, click to view]

Doug Eller
10/23/2003 10:52:51 AM
I'm working with the w3c's "Modular Xhtml schema". The problem I have is
that when I try to add the Schema Driver File to my schema collection, I get
the following error:

"Cannot resolve schemaLocation attribute."

The error occurs on the first <xs:include schemaLocation="xxxxx.xsd" />. The
only way I have been able to fix the problem is to use a fully qualified
file path i.e.:

<xs:include schemaLocation="file://D:\\myFolder\mySchema.xsd" />

There HAS to be a better way. If any of you have looked at modular schemas,
or even used ANY sort of schema or xslt includes, you will know that it
would be a real pain to go through EVERY file and change all the paths. This
would be especially bad if you were to distribute the collection of schemas
to multiple locations. (which I am.)

The actual real world application of what I am doing involves pulling these
schema files from a webservice, so I have a sneaking suspicion that the best
way to handle this would be to cache all the files (including the driver
file) and somehow manage/alter the include references virtually. Does anyone
know how to do this? Should I be looking more into XmlResolver?

One thing that occurs to me is, "Should I even be relying on the driver file
at all? Can I just load up all the included schemas and do what I mentioned
earlier and create a virtual connection between all of them with no actual
file defining the including?"

AAAAGGGGHHHHH!!!

help?

Doug Eller
10/23/2003 1:49:04 PM
The paths to the included files are relative to the including file, not to
the application.


[quoted text, click to view]

AddThis Social Bookmark Button