From: andrew at operationaldynamics dot com
Operating system: Gentoo Linux
PHP version: 4.3.2
PHP Bug Type: XML related
Bug description: Sablotron incorrectly erroring on DOCTYPE SYSTEM http

Description:
------------
When using the Sablotron XSLT processor, it would not let me reference a
SYSTEM DTD via http. I was using:

<!DOCTYPE plan SYSTEM "plan.dtd">

just fine, but when I needed to make the reference not rely on my location
on the filesystem, I switched to this:

<!DOCTYPE plan SYSTEM "http://goals/plan.dtd">

which no longer worked. Error below.

Reproduce code:
---------------
Calling PHP code:

xslt_process($xh, $srcfile, $xslfile, $outfile)



Expected result:
----------------
http references should work in SYSTEM declarations!


Actual result:
--------------
Warning: Sablotron error on line 1: XML pr error 4: not well-formed
(invalid token) in /home/andrew/Sites/local/goals/goalsDriver.php on line
115

WORKAROUND:

By changing the DOCTYPE line to

<!DOCTYPE plan PUBLIC "-" "http://goals/plan.dtd">

It worked exactly as expected. I looked around, and saw many W3C examples
which used SYSTEM in conjunction with an http method.

The PUBLIC specification is only supposed to be used when one has done the
right thing in naming a public DTD (ie, "-" isn't really an appropriate
name!)

Methinks that this is an upstream bug in Sablotron.


AfC

--
Edit bug report at [url]http://bugs.php.net/?id=26183&edit=1[/url]
--
Try a CVS snapshot (php4): [url]http://bugs.php.net/fix.php?id=26183&r=trysnapshot4[/url]
Try a CVS snapshot (php5): [url]http://bugs.php.net/fix.php?id=26183&r=trysnapshot5[/url]
Fixed in CVS: [url]http://bugs.php.net/fix.php?id=26183&r=fixedcvs[/url]
Fixed in release: [url]http://bugs.php.net/fix.php?id=26183&r=alreadyfixed[/url]
Need backtrace: [url]http://bugs.php.net/fix.php?id=26183&r=needtrace[/url]
Try newer version: [url]http://bugs.php.net/fix.php?id=26183&r=oldversion[/url]
Not developer issue: [url]http://bugs.php.net/fix.php?id=26183&r=support[/url]
Expected behavior: [url]http://bugs.php.net/fix.php?id=26183&r=notwrong[/url]
Not enough info: [url]http://bugs.php.net/fix.php?id=26183&r=notenoughinfo[/url]
Submitted twice: [url]http://bugs.php.net/fix.php?id=26183&r=submittedtwice[/url]
register_globals: [url]http://bugs.php.net/fix.php?id=26183&r=globals[/url]
PHP 3 support discontinued: [url]http://bugs.php.net/fix.php?id=26183&r=php3[/url]
Daylight Savings: [url]http://bugs.php.net/fix.php?id=26183&r=dst[/url]
IIS Stability: [url]http://bugs.php.net/fix.php?id=26183&r=isapi[/url]
Install GNU Sed: [url]http://bugs.php.net/fix.php?id=26183&r=gnused[/url]
Floating point limitations: [url]http://bugs.php.net/fix.php?id=26183&r=float[/url]