|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: User passed Arguments for Entities
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








