← Prev in month ← Prev in thread

external entities

From
Rick Marshall <>
To
Date
2005-02-09T23:59:41Z
ID
<>
Thread
external entities
here's a case where i may be extending the concept of external entities, 
but i can't see why. basically i want to refer to an external entity 
that is a cgi script:

<?xml version="1.0"?>

<!DOCTYPE xml [
        <!ENTITY vpn SYSTEM 
"http://www.xyz.com.au/internal/bin/ubcgi?PROC_NAME=vpn&amp;VALUE=1234">
        ]>

<label_file>&vpn;</label_file>

there's lots of problems with this when processed by xsltproc:

http://www.xyz.com.au/internal/bin/ubcgi?PROC_NAME=vpn&amp;MATCH=1234:1: 
error: xmlParseStartTag: invalid element name
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
 ^
/tmp/xx.xml:7: error: Failure to process entity vpn
<label_file>&vpn;</label_file>
                 ^
/tmp/xx.xml:7: error: Entity 'vpn' not defined
<label_file>&vpn;</label_file>
                 ^
unable to parse /tmp/xx.xml

leaving aside the fact that i've broken some coding rules for entities, 
is it possible to write an external entity that calls a cgi script?

and just to make it harder, the cgi script lives in a protected area so 
i have to pass authorisation info as well....

:'(

thanks

rick

ps to relieve the confusion, vpn in this case stands for vendor product 
number

all help and criticism gratefully received
← Prev in month ← Prev in thread