Subject: Re: Bad element when DTD specified From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Fri, 03 Sep 1999 10:47:03 -0400 |
I've just been going nuts for an hour.
Given an invalid XML document, which specifies a local DTD, and does not match it,
Xt seems to 'fail' to style it, insofar as the events which trigger a match on a particular element sequence seem not to occur. It triggers on the root element '/' but no other patterns are matched further down the tree.
As soon as I remove the doctype, it all 'works' as expected.
Is this expected behaviour?
If the DTD is available, does XT parse it (and not report errors?)
T:\dave>type test.dtd <!ELEMENT test ( salutation+ )> T:\dave>type test.xml <?xml version="1.0"?> <!DOCTYPE test SYSTEM "test.dtd"> <test> <greeting>Hello</greeting> <greeting>World!</greeting> </test> T:\dave>type test.xsl <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/XSL/Transform/1.0">
<xsl:template match="greeting"> <p><xsl:apply-templates/></p> </xsl:template>
T:\dave>call xsl test.xml test.xsl test.out T:\dave>type test.out
<p>Hello</p> <p>World!</p>
-- G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (Fax:-0995) Website: XSL/XML/DSSSL/SGML services, training, libraries, products. Practical Transformation Using XSLT and XPath ISBN 1-894049-01-2 Next instructor-led training: 1999-09-24, 1999-11-08, 1999-12-05/06, 1999-12-07, 2000-02-27/28, 2000-05-11/12
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Bad element when DTD specified, DPawson | Thread | RE: Bad element when DTD specified, DPawson |
Bad element when DTD specified, DPawson | Date | RE: XLS wanted...., Tim McCune |
Month |