This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 3767 - document-node(...) not tested
Summary: document-node(...) not tested
Status: RESOLVED FIXED
Alias: None
Product: XML Query Test Suite
Classification: Unclassified
Component: XML Query Test Suite (show other bugs)
Version: 1.0
Hardware: Other Linux
: P2 normal
Target Milestone: ---
Assignee: Andrew Eisenberg
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-25 15:26 UTC by Frans Englich
Modified: 2006-09-27 15:19 UTC (History)
0 users

See Also:


Attachments

Description Frans Englich 2006-09-25 15:26:14 UTC
It appears the XQTS has no tests for document-node() combined with element() or schema-element():

bash-2.05b$ echo "document-node(element(testingRegExp))" | grep -nHR 'document-node([^:]\+)'
(standard input):1:document-node(element(testingRegExp))
bash-2.05b$ 

bash-2.05b$ find -name "*.xq" | xargs grep -nHR 'document-node([^:]\+)'
bash-2.05b$   


This appears to be the current coverage:

---------------------------------------------------
bash-2.05b$ find -name "*.xq" | xargs grep -nHR 'document-node()'
./Queries/XQuery/Expressions/seqExprTypes/sequenceExprTypeswitch/K-sequenceExprTypeswitch-8.xq:10:           case document-node() return -2
./Queries/XQuery/Expressions/FLWORExpr/ForExprType/ForExprType021.xq:8:for $doc as document-node() in $input-context
./Queries/XQuery/Expressions/FLWORExpr/ForExprType/ForExprType056.xq:10:for $test as document-node() in $input-context
./Queries/XQuery/Expressions/FLWORExpr/ForExprType/ForExprType072.xq:2:(: Description: FLWOR expressions with type declaration. Attempt type declaration of document-node() on a set of element nodes :)
./Queries/XQuery/Expressions/FLWORExpr/ForExprType/ForExprType072.xq:10:for $test as document-node() in ($input-context//fs:Folder)[1]/fs:File/fs:FileName
./Queries/XQuery/Expressions/FLWORExpr/ForExprType/ForExprType073.xq:2:(: Description: FLWOR expressions with type declaration. Attempt type declaration of document-node() on a set of values :)
./Queries/XQuery/Expressions/FLWORExpr/ForExprType/ForExprType073.xq:10:for $test as document-node() in data( ($input-context//fs:Folder)[1]/fs:File/fs:FileName )
bash-2.05b$                 
---------------------------------------------------

I will write tests that cover non-schema aware implementations(partly done). Although they will be run by schema-aware as well, they won't test schema-specific areas.

Proposed solution:
* Include my tests
* Write schema-specific tests


Frans
Comment 1 Andrew Eisenberg 2006-09-27 15:19:36 UTC
I'd really like to get XQTS 1.0.1 out. If you can add a small number of tests today to cover this, then please do so. Otherwise, it will have to wzit.