Subject: Re: [xsl] Apply Comment Position From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Fri, 26 Feb 2021 07:24:47 -0000 |
current-group()[1]"/>
On 26.02.2021 06:13, Byomokesh Sahoo sahoo.byomokesh@xxxxxxxxx wrote:Hi,
Please look at the below xml, xslt and required output. I tried positionB function to get the comment inside <mail> in respective <ext-link>. I am facing a problem whereB ( <!--xmltex \gdef\EmailAuthIdDefnII{\MailAuthIdII}-->) refers to two <ext-link>. Could you please anyone help on this.
Which version of XSLT can you use? What defines a relation between a comment "xmltext" and an "ext-link" element? Can't that just be solved by
B <xsl:template match="article-meta">
B B B <xsl:copy>
B B B B B <xsl:for-each select="comment()[starts-with(., 'xmltext')] | ext-link" group-starting-with="comment()">
B B B B B B B B <xsl:for-each select="tail(current-group())">
B B B B B B B B B B B <cp id="{@id}">
B B B B B B B B B B B B B <email>
B B B B B B B B B B B B B B B B <xsl:copy-of select="node(),
B B B B B B B B B B B </email>
B B B B B B B B </cp>
B B B B </xsl:for-each-group>
B </xsl:copy>
</xsl:template>
B B <xsl:template match="article-meta"> B B B B B <xsl:copy> B B B B B B B <xsl:for-each-group select="comment()[starts-with(., 'xmltex')] | ext-link" group-starting-with="comment()"> B B B B B B B B B B <xsl:for-each select="tail(current-group())"> B B B B B B B B B B B B B <cp id="{@id}"> B B B B B B B B B B B B B B B <email> B B B B B B B B B B B B B B B B B B <xsl:copy-of select="node(), current-group()[1]"/> B B B B B B B B B B B B B B B </email> B B B B B B B B B B B B B </cp> B B B B B B B B B B B </xsl:for-each> B B B B B B </xsl:for-each-group> B B B </xsl:copy> B </xsl:template>
really, sorry, it seems without an editor I am not able to type well-formed and intended XSLT
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Apply Comment Position, Martin Honnen martin | Thread | Re: [xsl] Apply Comment Position, Michael Müller-Hille |
Re: [xsl] Apply Comment Position, Martin Honnen martin | Date | Re: [xsl] Apply Comment Position, Michael Müller-Hille |
Month |