⚲
Project
Profile
Help
Tour this page
Frequent Planio Questions
Learning Resources
Sign in
Register
Switch Planio account
Open in Planio App
Share current page
Search
:
Projects
All Projects
Help
Tour this page
Frequent Planio Questions
Learning Resources
Sign in
Register
Switch Planio account
Open in Planio App
Share current page
Saxon
»
SaxonJS
Overview
Roadmap
Issues
Blog
Documents
Forums
Files
Download (778 Bytes)
Bug #4630
» eliminate-duplicates-with-key2.xsl
Martin Honnen
, 2020-07-03 14:43
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet
xmlns:xsl=
"http://www.w3.org/1999/XSL/Transform"
version=
"3.0"
xmlns:xs=
"http://www.w3.org/2001/XMLSchema"
xpath-default-namespace=
"http://example.com/ns1"
exclude-result-prefixes=
"#all"
expand-text=
"yes"
>
<xsl:mode
on-no-match=
"shallow-copy"
/>
<xsl:strip-space
elements=
"*"
/>
<xsl:output
indent=
"yes"
/>
<xsl:key
name=
"foo-group"
match=
"foo"
use=
"key"
/>
<xsl:template
match=
"foo[. is key('foo-group', key)[1]]"
>
<xsl:copy>
<xsl:apply-templates
select=
"*, (key('foo-group', key) => tail())/(* except key)"
/>
</xsl:copy>
</xsl:template>
<xsl:template
match=
"foo[not(. is key('foo-group', key)[1])]"
/>
</xsl:stylesheet>
« Previous
1
2
Next »
(1-1/2)
Loading...