[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Bolt-in Type Systems (RE: Relax NG and Web Servi

  • To: "James Clark" <jjc@j...>
  • Subject: RE: Bolt-in Type Systems (RE: Relax NG and Web Services (formerly Joining the church))
  • From: "Dare Obasanjo" <dareo@m...>
  • Date: Fri, 11 Jul 2003 20:46:00 -0700
  • Cc: "Bullard, Claude L \(Len\)" <clbullar@i...>,<xml-dev@l...>
  • Thread-index: AcNIHl03DWx2qiYoSWm4EmIfW50ZnAABzIgP
  • Thread-topic: Bolt-in Type Systems (RE: Relax NG and Web Services (formerly Joining the church))

global relax
I'm not sure what you are asking for. If you want a standard place where classes can be registered and discovered by applications there's the Global Assembly Cache (GAC)[0]. If you are asking about a place to store configuration information that is visible to .NET Framework applications there are various standard configuration files[1]. 
 
It seems what you are asking for is a way to enumerate all the assemblies on a particular machine and query each for a particular resource file. I'd prefer using  a config file for this or maybe even the registry. 
 
[0] http://msdn.microsoft.com/library/en-us/cpguide/html/cpconglobalassemblycache.asp
[1] http://msdn.microsoft.com/library/en-us/cpguide/html/cpconconfigurationfiles.asp

________________________________

From: James Clark [mailto:jjc@j...]
Sent: Fri 7/11/2003 7:35 PM
To: Dare Obasanjo
Cc: Bullard, Claude L (Len); xml-dev@l...
Subject: Re:  Bolt-in Type Systems (RE:  Relax NG and Web Services (formerly Joining the church))




> 2.) A RELAX NG can dynamically learn how to validate a type library by
> dereferencing the namespace URI. I've heard there are Java interfaces
 > type library authors can implement so arbitrary RELAX NG validators can
 > support them. In this case there should be no problem as long as the
dataype
 > library is discoverable and implements the correct interfaces.

It doesn't actually dereference the namespace URI in the sense of
retrieving it. The way it works is:

- There's an (unofficial) standard API that provides an interface
org.relaxng.datatype.DatatypeLibraryFactory; this has a method
createDatatypeLibrary(x) that says "give me an implementation of the
datatypeLibrary with URI x", which may succeed or fail.

- An implementation must provide a class that implements this interface.
Let's suppose it's com.example.MyDatatypeLibraryFactory. The class files
must be collected into a jar file and the jar file must also contain a
text file META-INF/services/org.relaxng.datatype.DatatypeLibraryFactory
which contains a single line "com.example.MyDatatypeLibraryFactory".

- Users must put the jar files for the datatype libraries they want to
use on their classpath.

- When a validator encounters a schema that uses datatype library with
URI X, it reads the files on its classpath called
META-INF/services/org.relaxng.datatype.DatatypeLibraryFactory to
discover the names of the implementing classes. It then instantiates
each in turn calling its createDatatypeLibrary method until it finds one
that can provide an implementation of the required datatype library.

This is a pretty standard pattern in the Java world. How would you do
this sort of thing in .NET?

It doesn't support automatic downloading of datatype library
implementations. I guess you do this by allowing the namespace URI to
point to an RDDL document that somehow identifies the JAR file providing
the implementation, download that and then run it in a sandbox. As far
as I know, no implementations yet support this sort of thing.

James







PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.