Answering my own question, in case anyone else has the same problem:
My XQuery was returning this:
<TEI.2> <!-- Query Results --> {f:GetDoc()} </TEI.2>
If I make it return this:
<document> <TEI.2> <!-- Query Results --> {f:GetDoc()} </TEI.2> </document>
Then it works. Apparently the container tag is required before the doctype headers will be generated.
Cheers, Martin
Martin Holmes wrote:
Hi there,
I have the following two matches in my pipeline:
<!-- Standard XHTML transform -->
<map:match pattern="proof/*.htm"> <map:generate src="abstracts_for_proofing/{1}.xml"/> <map:transform type="xinclude"/> <map:transform type="xslt" src="xsl/tei_ach_single_doc_to_xhtml.xsl"/> <map:serialize type="xhtml"></map:serialize> </map:match>
<!-- XQuery retrieval to XHTML output --> <map:match pattern="xq/xhtml.xq"> <map:generate src="xq/abstract.xq" type="xquery"> <map:parameter name="expand-xincludes" value="true"/> </map:generate> <map:transform type="xslt" src="xsl/tei_ach_single_doc_to_xhtml.xsl"/> <map:transform type="encodeURL"/> <map:serialize type="xhtml"></map:serialize> </map:match>
In the case of the first, I get this at the top of my XHTML output document:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">
In the case of the second, I get nothing before the HTML tag:
<html xmlns="http://www.w3.org/1999/xhtml">
Can anyone suggest why this might be the case? In the first case, the XML input to the transformation is taken from a file, and in the second, it's taken from the an eXist database via XQuery, but there's no other difference in the pipelines -- same transformation, same serialization. The second has an "encodeURL" transform, but even if I remove that, it makes no difference. I'd really like to be producing good XHTML from this application. Any ideas?
All help appreciated.
Cheers, Martin
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]