Re: [xsl] (Possible) pitfall: XSLT 2, 9.4 Creating implicit document nodes

Subject: Re: [xsl] (Possible) pitfall: XSLT 2, 9.4 Creating implicit document nodes
From: Christian Roth <roth@xxxxxxxxxxxxxx>
Date: Thu, 10 May 2012 02:13:20 +0200
On 09.05.2012, at 17:21, Jakub Mal} wrote:

> You can give assign a type to v1 (and v2 as well) to make both variables
> behave the same.

Declaring the type for the variable v1 is the key here, thank you! I somehow
must have missed the vital "... and that has no as attribute." part in 9.4.

After doing that, I just need to be aware that the elements in the sequence
are no longer accessed via (e.g.) $v1/a, but $v1/self::a, i.e. they are not
children.

Thanks to all other respondents (Ken, David, Michael) for essentially pointing
out the same thing, but adding valuable additional perspectives to the issue.

Regards
Christian

Current Thread