Created
May 4, 2018 18:50
-
-
Save patdavid/daed5c1b7d8011ffdf3aacb33a764eb9 to your computer and use it in GitHub Desktop.
Identity Transform and targeting an XPath node
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
<?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" version="1.0" encoding="UTF-8" indent="yes"/> | |
<xsl:template match="node()|@*"> | |
<xsl:copy> | |
<xsl:apply-templates select="node()|@*"/> | |
</xsl:copy> | |
</xsl:template> | |
<xsl:template match="//Point/X"> | |
<X><xsl:value-of select=". * 25.4"/></X> | |
</xsl:template> | |
<xsl:template match="//Point/Y"> | |
<Y><xsl:value-of select=". * 25.4"/></Y> | |
</xsl:template> | |
<xsl:template match="//Point/Z"> | |
<Z><xsl:value-of select=". * 25.4"/></Z> | |
</xsl:template> | |
</xsl:stylesheet> |
Author
patdavid
commented
Jul 19, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment