Re: [xsl] Best practice for typing?

Subject: Re: [xsl] Best practice for typing?
From: "Mukul Gandhi gandhi.mukul@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 25 Nov 2019 06:05:52 -0000
On Sun, Nov 24, 2019 at 4:10 PM Imsieke, Gerrit, le-tex
gerrit.imsieke@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:


> Example:
>
> <xsl:variable name="var1">
>    <doc>
>      <p/>
>    </doc>
> </xsl:variable>
>
> $var1/*/name() gives 'doc'
>
> <xsl:variable name="var2" as="element(*)">
>    <doc>
>      <p/>
>    </doc>
> </xsl:variable>
>
> $var2/*/name() gives 'p'
>
> This is because of implicit document node creation [1].
>

Nice to know about these subtle facts.



-- 
Regards,
Mukul Gandhi

Current Thread