⚲
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
Overview
Roadmap
Issues
Calendar
Blog
Documents
Forums
Files
Repository
Download (1.52 KB)
Support #4960
» xslt3-beta-transform-ns&root.xsl
Anonymous, 2021-04-03 05:47
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
xmlns:xsl=
"http://www.w3.org/1999/XSL/Transform"
xmlns:xs=
"http://www.w3.org/2001/XMLSchema"
exclude-result-prefixes=
"#all"
expand-text=
"yes"
version=
"3.0"
>
<xsl:output
method=
"xml"
indent=
"yes"
/>
<xsl:strip-space
elements=
"*"
/>
<xsl:param
name=
"trans-namespace"
as=
"xs:string"
>
http://fc.fasset/product
</xsl:param>
<xsl:param
name=
"trans-root"
as=
"xs:string"
>
requestProduct
</xsl:param>
<xsl:variable
name=
"LEI-namespace"
as=
"xs:string"
select=
"'http://fc.fasset/LEI'"
/>
<xsl:param
name=
"keep-attr"
static=
"yes"
as=
"xs:string*"
select=
"'href', 'id'"
/>
<xsl:template
match=
"/*"
>
<xsl:element
name=
"{$trans-root}"
namespace=
"{$trans-namespace}"
>
<xsl:apply-templates
select=
"@* , node()"
/>
</xsl:element>
</xsl:template>
<xsl:template
match=
"*"
>
<xsl:element
name=
"{local-name()}"
namespace=
"{$trans-namespace}"
>
<xsl:apply-templates
select=
"@* , node()"
/>
</xsl:element>
</xsl:template>
<!-- <xsl:template _match="{string-join($keep-atts!('@' || .), ' | ')}"/>-->
<xsl:template
match=
"@*"
>
<xsl:choose>
<xsl:when
test=
"local-name() = $keep-attr"
>
<xsl:namespace
name=
"lei"
select=
"$LEI-namespace"
/>
<xsl:attribute
name=
"{local-name()}"
>
<xsl:value-of
select=
"."
/>
</xsl:attribute>
</xsl:when>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
« Previous
1
2
3
Next »
(3-3/3)
Loading...