⚲
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
»
SaxonC
Overview
Issues
Calendar
Blog
Forums
Files
Download (1.54 KB)
RE: Problem applying XSL xsl:copy-of when sub node has at...
» xsl.xsl
Anne FAVEUR
, 2018-12-19 14:39
<?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"
xmlns:xft=
"http://www.exchangefortravel.org/xft/current"
xmlns:dx=
"http://www.afidium.com/dx"
xmlns:h=
"http://www.w3.org/1999/xhtml"
xmlns:xi=
"http://www.w3.org/2001/XInclude"
exclude-result-prefixes=
"xs xft dx h xi"
version=
"2.0"
>
<xsl:template
match=
"xft:Actions"
>
<xsl:variable
name=
"xft:SegmentNodes"
>
<Segments>
<xsl:sequence
select=
"descendant::xft:Segment"
/>
</Segments>
</xsl:variable>
<Transaction
Status=
"Success"
TimeStamp=
"2018-12-16T18:53:13+01:00"
xmlns=
"http://www.exchangefortravel.org/xft/current"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:type=
"TransactionResponseType"
>
<xsl:copy-of
select=
"xft:Action[1]/xft:Transaction/xft:Control"
/>
<xsl:copy-of
select=
"xft:Action[1]/xft:Transaction/xft:Action"
/>
<!-- This works, though children have @xsi:type -->
<Bookings>
<xsl:copy-of
select=
"xft:Action/xft:Transaction/xft:Booking"
/>
</Bookings>
<!-- this works because first node is segments without @xsi:type -->
<xsl:copy-of
select=
"$xft:SegmentNodes"
/>
<!-- this fails because some first elements have @xsi:type -->
<Segments>
<xsl:copy-of
select=
"descendant::xft:Segment"
/>
</Segments>
</Transaction>
</xsl:template>
</xsl:stylesheet>
« Previous
1
2
3
Next »
(3-3/3)
Loading...