No, sorry. The information from the DOCTYPE declaration is not part of the XDM data model and is not available to the transformation.

There's a tool from Andrew Welch called lexEv that reaches parts of the input document that aren't normally visible to applications - I'm not sure if that includes the DOCTYPE declaration.

Michael Kay
Saxonica

On 22/03/2012 18:41, Paul M wrote:
Hi:

xml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Order PUBLIC "-//getstart DTD v1.0//EN" "getstart.dtd">


xslt:
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet  version="2.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 
  <xsl:template match="/">
    <xsl:result-document
      doctype-public="{processing-instruction('doctype-public')}"
      doctype-system="{processing-instruction('doctype-system')}">
      <xsl:apply-templates/>
    </xsl:result-document>
  </xsl:template>
 
<xsl:template match="@*|node()">
  <xsl:copy>
    <xsl:apply-templates select="@*|node()"/>
  </xsl:copy>
</xsl:template>
</xsl:stylesheet>

output file:
Will/should the DOCTYPE from original file exist in the output file after call to     net.sf.saxon.Transform on command line?


Thanks!


------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure


_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
saxon-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/saxon-help