Dave,

[My original message deleted]
> Arne -
> 
> I'm not sure what needs you or Chris have, but if you are trying to "import" 
> and insert documents found on the Web, you might be interested in the 
> following 
> piece of code.  This code is actually snipped from generateDS.py itself.  
> I've 
> included it as an example of how content could be found an inserted from 
> various sources.

Thanks very much for the code.  In the application I work on, all of the schema
files are available from the file system so http or ftp loading doesn't really
make much difference to me.  As long as I can get the external schemas processed
somehow, I'll be happy.

> As you can see from the commented-out version, you could also check the local 
> file system if the document could not be found on the Web.  Or, perhaps, a 
> version that checked for the protocol with something like:
> 
>     if path.startswith('http:'):
> and:
>     elif path.startswith('ftp:'):
> and:
>     elif path.startswith('file:'):
> 
> and so on.
> 
> I suppose it also matters which order we try each of the different sources/
> locations.

Personally, I would bias towards the file system rather than the network.  I
would want my files or cache of network files to take precedence because I
need to have access to and control over the schemas are being used in my
application.  Version conflicts are more likely to arise from internal changes
than what the network-based suppliers provide, but I've been burned when a
schema disappeared from the network in the past.

> Let me know what your thoughts are on this and whether you feel something 
> like 
> this is would be useful in process_includes.py.

I think this will be very useful; so much so that I'm going to give it a try
right away. ;)  There are a number of other developers in my project who are
also interested in this work and would love to use this code.  Personally,
I'd like to see process_includes embedded in the generateDS script so that
the imports/includes are processed automatically.

Regards,

Arne



-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
generateds-users mailing list
generateds-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/generateds-users

Reply via email to