[oXygen-user] copy of processing instructions
Oxygen XML Editor Support
support at oxygenxml.com
Wed May 22 08:15:01 CDT 2013
Hi,
You can use a deep copy stylesheet that also considers the processing
instructions.
This is a modified version of the sample copy stylesheet from the Oxygen
samples (Oxygen/samples/xhtml/copy.xsl):
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml"/>
<!-- Match document -->
<xsl:template match="/">
<xsl:apply-templates mode="copy" select="."/>
</xsl:template>
<!-- Deep copy template -->
<xsl:template match="*|text()|@*|processing-instruction()" mode="copy">
<xsl:copy>
<xsl:apply-templates mode="copy" select="@*"/>
<xsl:apply-templates mode="copy"/>
</xsl:copy>
</xsl:template>
<!-- Handle default matching -->
<xsl:template match="*"/>
</xsl:stylesheet>
The only change I made was to the deep copy template. I've added:
processing-instruction()
<xsl:template match="*|text()|@**|processing-instruction()*"
mode="copy">
Regards,
Adrian
On 22.05.2013 13:17, Ulrike Borinski wrote:
> Hello,
>
> I want to transform some XML-Documents containing some Track Changes Markup, <?oxy_delete?> for example. I need a deep copy of the document.
> How can I preserve these PIs during a XSLT-Transformation?
>
> Thank you
> Ulrike Borinski
>
>
>
>
> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
> Ulrike Borinski
> Dipl.-Designerin
>
> Koordination
> Servicestelle Mediengestaltung und Publishing
> Borinski at ifv-nrw.de
> 02331/9330-927
>
> www.ifv-nrw.de/ifv_gest/lerneinheiten.htm
>
> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
> Institut für Verbundstudien der Fachhochschulen Nordrhein-Westfalens - IfV NRW
> Im Alten Holz 131
> 58093 Hagen
>
> _______________________________________________
> oXygen-user mailing list
> oXygen-user at oxygenxml.com
> http://www.oxygenxml.com/mailman/listinfo/oxygen-user
>
--
Adrian Buza
oXygen XML Editor and Author Support
Tel: +1-650-352-1250 ext.202
Fax: +40-251-461482
support at oxygenxml.com
http://www.oxygenxml.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.oxygenxml.com/pipermail/oxygen-user/attachments/20130522/1686cd3e/attachment.html
More information about the oXygen-user
mailing list