Last active
May 6, 2020 14:21
-
-
Save welblaud/f3b66598294f494b71e0e76a03941cfd to your computer and use it in GitHub Desktop.
Simple replacement for DOCX nodes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xmlversion='1.0'?> | |
<xsl:stylesheet | |
xmlns:xsl='http://www.w3.org/1999/XSL/Transform' | |
xmlns:w='http://schemas.openxmlformats.org/wordprocessingml/2006/main' | |
version='1.0'> | |
<xsl:template match="w:document/w:body/w:p/w:r/w:t[node()='Hello World']"> | |
<w:t>Goodbye World</w:t> | |
</xsl:template> | |
<!-- The following transform is the identity transform --> | |
<xsl:templatematch="/|@*|node()"> | |
<xsl:copy> | |
<xsl:apply-templatesselect="@*|node()"/> | |
</xsl:copy> | |
</xsl:template> | |
</xsl:stylesheet> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment