[oXygen-user] copy of processing instructions
Ulrike Borinski
Borinski at ifv-nrw.de
Thu May 23 02:38:44 CDT 2013
Thank you very much - you and Syd,
I would like to generate an attribute with value on this way. I tried to combine your coding with something like this:
<xsl:template match="Definition">
<xsl:copy>
<xsl:attribute name="Referenz">
<xsl:text>Def-</xsl:text>
<xsl:number count="Definition" level="any" format="001"/>
<xsl:text>_</xsl:text>
<xsl:value-of select="//Content-ID"/>
</xsl:attribute>
<xsl:apply-templates select="@* | node()"/>
</xsl:copy>
</xsl:template>
the copy is OK (deep), but nothing else happens
Regards,
Ulrike Borinski
Am 22.05.2013 um 15:15 schrieb Oxygen XML Editor Support:
> 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
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
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
More information about the oXygen-user
mailing list