RE: Specifying output in p:xslt

Tomos,

I think the result you get is correct. The doctype-public and
doctype-system properties in the stylesheet affect the serialization of
the result of the XSLT transformation. But in the XProc pipeline (at
least in Calumet and I also think Calabash), the p:xslt step does not
serialize; it just passes the XML document (in any underlying data
model) to the next step.

If you want to have the public and system identifier in your result
document, you can apply p:serialization to the output port of your
pipeline. That way, when you run the pipeline in oXygen, the results
should be serialized with the properties you need:

<p:pipeline>
  <p:serialization port="result" doctype-public="..."
doctype-system="..."/>
  <p:xslt>...</p:xslt>
</p:pipeline>

Regards,
Vojtech


> -----Original Message-----
> From: xproc-dev-request@w3.org [mailto:xproc-dev-request@w3.org] On
Behalf Of
> HILLMAN, Tomos
> Sent: Monday, April 12, 2010 6:49 PM
> To: xproc-dev@w3.org
> Subject: Specifying output in p:xslt
> 
> Hi List,
> 
> When trying to run an xslt step like this (from Oxygen v.11.2):
> 
> _______________________________________________________
> <p:xslt>
> 	<p:input port="source">
> 		<p:document href="file:/U:/xml examples/e1398.xml"/>
> 	</p:input>
> 	<p:input port="stylesheet">
> 		<p:inline>
> 			<xsl:stylesheet
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> xmlns:xs="http://www.w3.org/2001/XMLSchema"
exclude-result-prefixes="xs"
> version="2.0">
> 				<xsl:param name="system"/>
> 				<xsl:param name="public"/>
> 				<xsl:output doctype-public="$public"
doctype-
> system="$system"/>
> 
> 				<!--<xsl:template match="/">
> 					<result>
> 						<xsl:attribute
name="public"
> select="$public"/>
> 						<xsl:attribute
name="system"
> select="$system"/>
> 					</result>
> 				</xsl:template>-->
> 
> 				<xsl:template match="node()|@*">
> 					<xsl:copy>
> 						<xsl:apply-templates
> select="node()|@*"/>
> 					</xsl:copy>
> 				</xsl:template>
> 
> 			</xsl:stylesheet>
> 		</p:inline>
> 	</p:input>
> 	<p:input port="parameters">
> 		<c:param-set>
> 		   <c:param name="public" value="-//OXFORD//DTD
> OXENCYCLML//EN"/>
> 		   <c:param name="system" value="OxEncyclML.dtd"/>
> 		</c:param-set>
> 	</p:input>
> </p:xslt>
> _______________________________________________________
> 
> I get no results from the doctype-public and doctype-system settings
(i.e.. no
> doctype declaration on the output).
> 
> Running an xslt transformation on an identical XSL stylesheet works
fine.
> 
> Is this expected behaviour?
> 
> Thanks in advance (again!)
> 
> Tom
> 
> Oxford University Press (UK) Disclaimer
> 
> This message is confidential. You should not copy it or disclose its
contents to
> anyone. You may use and apply the information for the intended purpose
only. OUP
> does not accept legal responsibility for the contents of this message.
Any views or
> opinions presented are those of the author only and not of OUP. If
this email has
> come to you in error, please delete it, along with any attachments.
Please note that
> OUP may intercept incoming and outgoing email communications.
> 
> 

Received on Tuesday, 13 April 2010 08:11:02 UTC