[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: "expected markup declaration" error

Subject: RE: "expected markup declaration" error
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Date: Sat, 17 Feb 2001 10:32:54 -0000
expected a markup declaration dtd
> It hadn't occured to me that adding the DOCTYPE to define
> some character
> entity references would cause Saxon 6.2 (with built-in parser AElfred)
> to attempt to validate the document.

It isn't validating the document, but it is reading the DTD to identify and
expand entity references. During the search for an <?xml-stylesheet?>
processing instruction the document is parsed as far as the first element
start tag, and this will include the DOCTYPE declaration and therefore any
external DTD.

I think that it might be complaining about something inside the
character-entities external entity, which you haven't shown us.

As Jeni said, the message about <?xml-stylesheet?> is only telling you what
Saxon was doing at the time the error was found; the same error would have
been found by the XML parser eventually even without this pre-parse that is
done when you use the -a option.

Mike Kay

>
> For historical reasons, the content is already being validated against
> an SGML DTD (which contains exclusions and inclusions) before
> I attempt
> to transform it.  The data itself is well-formed XML.  I'm
> just looking
> at Saxon's documentation to see if I can tell it not to validate the
> document.  Hmm, at
> http://users.iclway.co.uk/mhkay/saxon/saxon6.2/conditions.html the
> AElfred parser is discussed:
>
>     Subsetting the code to include only the XML non-validating parser
>     and SAX driver, with appropriate changes to the setFeature() and
>     getFeature() methods.
>
> It seems that AElfred as part of Saxon is already
> non-validating.  There
> goes that theory out the window. :-(
>
> Dave
>
> ----- Original Message -----
> From: "Jeni Tennison" <mail@xxxxxxxxxxxxxxxx>
>
>
> > I think that Saxon displays the 'looking for stylesheet PI' message
> > while it's parsing the source XML - it parses it first into a node
> > tree and then looks for the PI within that - but I could be wrong.
> > Mike will obviously be able to confirm.
> >
> > That, and the message when the PI was removed, are what led me to
> > think it was a parse problem with the element start tag. Ahh...
> > perhaps it's that there's no !ELEMENT declaration for the root
> > element? Perhaps Dave's using a validating parser and it's
> complaining
> > because the DTD isn't complete? Dave, have you tried
> checking that the
> > XML document on its own is well-formed (and valid) XML?
>
>
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>


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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.