OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: User passed Arguments for Entities

[ Lists Home | Date Index | Thread Index ]
  • From: Rick JELLIFFE <ricko@geotempo.com>
  • To: ",xml-dev" <xml-dev@lists.xml.org>
  • Date: Mon, 13 Nov 2000 14:28:56 +0800

Saravanan Ramaswamy wrote:
> 
> Hi,
> 
> I have a question. I am using DTDs for dynamically creating XML content.
> 
> I could use external entity references to get most of the data by URIs.
> But one or two key items I want to pass as arguments to my program
> (which creates a dynamic doc based on a DTD).
> 
> Is there any simple way to pass arguments ? Something similar to the way
> 
> CGI programs read the standard input ? I want to create different
> instances of a document based on those input arguments.

XML was not designed to handle "unresolved" documents: instead it was
designed for sending documents over the web where each part was known. 
AFAIK there are no URI schemes covering standard input, argv or
environment variables (since these are not web concepts.)

In SGML, you have a richer variety of entity declarations mechanisms
that might allow you to do something.   In SGML, you would probably
rewrite the storage manager to allow reading entities from standard
input; some SGML systems allowed this.  You could hack the storage
manager for your XML processor, make up some home-made convention for
accessing standard input etc.

But probably you would just divert the input into some convenient
interface: the file system.  That seems clunky, but is actually often a
more robust thing to do. Then you can read the data in using the URL
with file:     I would guess that you do not have concurrency issues or
high-volume requirements.

Cheers
Rick Jelliffe




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS