Project

Profile

Help

document node in element constructor

Added by Anonymous over 19 years ago

Legacy ID: #3035953 Legacy Poster: marcvc (marcvc)

Michael, I've the impression this is new to Saxon 8.2+, 8.1.1 seems to behave different. Consider the following query, using bib.xml from the XQuery usecases. <e>{ doc("bib.xml") }</e>/bib it evaluates to (), where I would have expected the bib root element of bib.xml. Thanks, Marc


Replies (1)

RE: document node in element constructor - Added by Anonymous over 19 years ago

Legacy ID: #3037462 Legacy Poster: Michael Kay (mhkay)

I'm fairly surprised this doesn't fall in a complete heap, it's taking a strange path through the code in which the document start event effectively overtakes the element start event, and leads to the element node being constructed as a child of the document node; the result of the element constructor is then a document node, which has an <e> child, and no <bib> child. A fix is at https://sourceforge.net/tracker/index.php?func=detail&amp;aid=1159430&amp;group_id=29872&amp;atid=397617 Michael Kay

    (1-1/1)

    Please register to reply