Last active
August 7, 2023 13:30
-
-
Save martin-honnen/00fdd29c6a33584251ecf205987b4b1d to your computer and use it in GitHub Desktop.
Revisions
-
martin-honnen revised this gist
Aug 7, 2023 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -2,6 +2,7 @@ <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0" xmlns:data="http://example.com/mh/data" expand-text="yes" exclude-result-prefixes="data"> <data:data> -
martin-honnen created this gist
Aug 7, 2023 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,8 @@ <root> <item> <value>a</value> </item> <item> <value>b</value> </item> </root> This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0" xmlns:data="http://example.com/mh/data" exclude-result-prefixes="data"> <data:data> <map key="a">1</map> <map key="b">2</map> </data:data> <xsl:mode on-no-match="shallow-copy"/> <xsl:template match="item/value"> <xsl:copy>{document('')/xsl:stylesheet/data:data/map[@key = current()]}</xsl:copy> </xsl:template> </xsl:stylesheet>