[xquery-talk] Collections - family relationships

Ihe Onwuka ihe.onwuka at gmail.com
Fri Jan 17 20:58:26 PST 2014


On Sat, Jan 18, 2014 at 4:39 AM, G. Ken Holman
<gkholman at cranesoftwrights.com> wrote:
> At 2014-01-17 18:14 +0000, Ihe Onwuka wrote:
>>
>> Continuing on the them of recreating the limitations of the physical
>> world.
>>
>> <xsl:apply-templates select="someNode"/>
>>
>> where someNode does not exist in the document has no effect.
>>
>> <xsl:apply-templates select="doc('somedoc'/someNode)
>
>
> That expression is addressing the node as an argument to doc(), not as an
> operand of the return to doc().
>
>
>> where somedoc doesn't exist .....error - failed to load document.
>>
>> But really it's just another non-existent node.
>
>
> You are jumping to a preconceived conclusion without considering that you
> probably wanted to write:
>
>   <xsl:apply-templates select="doc('somedoc')/someNode"/>
>

Which if the verbatim of my prior experiment (<xsl:apply-templates
select="doc('ihe.xml')/home"/>) is anything to go by will still give
you a "Failed to load document ihe.xml" error.


More information about the talk mailing list