Well, it's an XML problem rather than an XSLT or Saxon problem, but I'll
There's a rule in XML that you can't have two entity references like this:
where &begin; expands to give you the start tag <a>, and &end; expands to
give you the end tag </a>. The start tag and its matching end tag must be in
the same entity.
There are some parsers that don't enforce this rule (an example is AElfred
which is included as the default XML parser in Saxon 6), but they should.
Given that this error is happening on the second transformation in your
pipeline, it seems possible that the parser has flagged a different error,
namely failing to have a single enclosing document element. XSLT can
generate files of the form
which will be thrown out by an XML parser, though I would have expected a
different error message.
Without seeing the XML document that the parser is throwing out, it's hard
to be more specific.
[mailto:saxon-help-admin@...] On Behalf Of Schochler,
Sent: 31 August 2004 14:15
Subject: [saxon] Point me in the right direction, please...
In brief, my process is to take an sgml doc, run it through sx (to create an
xml file), then run it through two xslts. The first simply copies the
existing xml file, assigning ids to elements where ids are lacking. The
second transforms this xml file into multiple xhtml files.
My process, for one particular doc, fails when the second transformation
begins. I get the following error returned:
"XML document structures must start and end within the same entity"
If I run this same doc through the parser in stylus studio, it parses fine.
Can someone give me a clue as to where to begin to fix this?