Re: [xsl] "expected markup declaration" error

Subject: Re: [xsl] "expected markup declaration" error
From: "Dave Gomboc" <dave@xxxxxxxxxxxxxx>
Date: Thu, 15 Feb 2001 17:23:16 -0700
David Carlisle also suggested this to me in private email.
Unfortunately, it didn't work either.

I don't particularly care to use the PI at all -- I'm actually happier
to specify the stylesheet to be used on the command line.  But even when
I do that, I still get the "expected markup declaration" error. :-(

Dave

----- Original Message -----
From: "Peter Flynn" <peter@xxxxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Cc: "Dave Gomboc" <dave@xxxxxxxxxxxxxx>
Sent: Thursday, February 15, 2001 5:10 PM
Subject: Re: [xsl] "expected markup declaration" error


> On Thu, 15 Feb 2001, you wrote:
> > Thanks for the attempt.  Unfortunately, changing both the wrapping
> > element and the doctype to ROOT didn't change the situation.
> [...]
> > > > filename: wrap_events.xml
> > > > =========================
> > > > <?xml version='1.0' encoding='ISO-8859-1'?>
> > > > <?xml-stylesheet type='text/xsl' href='render_events.xsl'?>
> > > >
> > > > <!DOCTYPE HMM [
> > > >     <!ENTITY % character_entities SYSTEM
"character_entities.dtd">
> > > >     %character_entities;
> > > >     <!ENTITY events SYSTEM "events.sgml">
> > > ]>>
> [...]
> > > > Failed while looking for xml-stylesheet PI
> > > > expected markup declaration
> > > > At line 8 in file:/.../wrap_events.xml
> > > > TRaX Transform Exception
>
> Now maybe I've missed something, but this says it was looking for a
> stylesheet Processing Instruction (and therefore presumably didn't
find
> one). And it was looking for it at line 8, which is where your root
> element start-tag was. Which implies to me you should move your
> <?xml-stylesheet...?> so that it occupies a line between the end of
the
> internal subset and the start of the instance:
>
> <?xml version='1.0' encoding='ISO-8859-1'?>
> <!DOCTYPE HMM [
>    <!ENTITY % character_entities SYSTEM "character_entities.dtd">
>     %character_entities;
>     <!ENTITY events SYSTEM "events.sgml">
> ]>
> <?xml-stylesheet type='text/xsl' href='render_events.xsl'?>
> <HMM>
> &events;
> </HMM>
>
> (which is where I always put it). I know it ought not make any
> difference, as it's only a PI, but is it possible some processors are
> waiting until they have encountered and read a DocType Declaration (or
> not...ie by the time they have encountered the root element start-tag)
> before they want to know anything about a stylesheet?
>
> ///Peter
>


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread