I use a EntityResolver-derived class.  It has a single overload of resolveEntity() 
that compares the requested ids against the name of my DTDs.  On a match, it polls the 
Windows registry for their location.

Adam Heinz
Senior Software Developer
Exstream Software

-----Original Message-----
From: Matt Garman [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 17, 2004 10:28 AM
To: [EMAIL PROTECTED]
Subject: specifying a "schema path"?

How can I specify a local path (or paths) that my application should
search for schemas?  For example, say I have "my_file.xml" which I
want to validate against "my_schema.xsd", but the two files aren't
in the same location.  In fact, either file (xml or xsd) can be in
an arbitrary directory.

A typical example I can think of is as follows: my application uses
XML for per-user config/data files (E.g. $HOME/.my_app/config.xml,
$HOME/.my_app/data.xml).  Rather than install the schemas in each
user's home directory, I'd like to just have one copy in the program
config directory (e.g. /etc/my_app/config.xsd,
/etc/my_app/data.xsd).  Now keep in mind that different people will
inevitably install my application in different locations (e.g. /usr
versus /usr/local).  So how can I specify (perhaps a build time) the
paths that should be checked for schemas?

Thanks,
Matt

-- 
Matt Garman
email at: http://raw-sewage.net/index.php?file=email

---------------------------------------------------------------------
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