2006-05-04 Anders Carlsson <acarlsson@apple.com>
authorandersca <andersca@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 8 May 2006 21:30:14 +0000 (21:30 +0000)
committerandersca <andersca@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 8 May 2006 21:30:14 +0000 (21:30 +0000)
        Reviewed by Darin.

        Add DOM3 xpath tests as self-contained SVG files.

        * dom/svg: Added.
        * dom/svg/level3: Added.
        * dom/svg/level3/xpath: Added.
        * dom/svg/level3/xpath/Attribute_Nodes-expected.txt: Added.
        * dom/svg/level3/xpath/Attribute_Nodes.js: Added.
        * dom/svg/level3/xpath/Attribute_Nodes.svg: Added.
        * dom/svg/level3/xpath/Attribute_Nodes_xmlns-expected.txt: Added.
        * dom/svg/level3/xpath/Attribute_Nodes_xmlns.js: Added.
        * dom/svg/level3/xpath/Attribute_Nodes_xmlns.svg: Added.
        * dom/svg/level3/xpath/Comment_Nodes-expected.txt: Added.
        * dom/svg/level3/xpath/Comment_Nodes.js: Added.
        * dom/svg/level3/xpath/Comment_Nodes.svg: Added.
        * dom/svg/level3/xpath/Conformance_Expressions-expected.txt: Added.
        * dom/svg/level3/xpath/Conformance_Expressions.js: Added.
        * dom/svg/level3/xpath/Conformance_Expressions.svg: Added.
        * dom/svg/level3/xpath/Conformance_ID-expected.txt: Added.
        * dom/svg/level3/xpath/Conformance_ID.js: Added.
        * dom/svg/level3/xpath/Conformance_ID.svg: Added.
        * dom/svg/level3/xpath/Conformance_hasFeature_3-expected.txt: Added.
        * dom/svg/level3/xpath/Conformance_hasFeature_3.js: Added.
        * dom/svg/level3/xpath/Conformance_hasFeature_3.svg: Added.
        * dom/svg/level3/xpath/Conformance_hasFeature_empty-expected.txt: Added.
        * dom/svg/level3/xpath/Conformance_hasFeature_empty.js: Added.
        * dom/svg/level3/xpath/Conformance_hasFeature_empty.svg: Added.
        * dom/svg/level3/xpath/Conformance_hasFeature_null-expected.txt: Added.
        * dom/svg/level3/xpath/Conformance_hasFeature_null.js: Added.
        * dom/svg/level3/xpath/Conformance_hasFeature_null.svg: Added.
        * dom/svg/level3/xpath/Conformance_isSupported_3-expected.txt: Added.
        * dom/svg/level3/xpath/Conformance_isSupported_3.js: Added.
        * dom/svg/level3/xpath/Conformance_isSupported_3.svg: Added.
        * dom/svg/level3/xpath/Conformance_isSupported_empty-expected.txt: Added.
        * dom/svg/level3/xpath/Conformance_isSupported_empty.js: Added.
        * dom/svg/level3/xpath/Conformance_isSupported_empty.svg: Added.
        * dom/svg/level3/xpath/Conformance_isSupported_null-expected.txt: Added.
        * dom/svg/level3/xpath/Conformance_isSupported_null.js: Added.
        * dom/svg/level3/xpath/Conformance_isSupported_null.svg: Added.
        * dom/svg/level3/xpath/Element_Nodes-expected.txt: Added.
        * dom/svg/level3/xpath/Element_Nodes.js: Added.
        * dom/svg/level3/xpath/Element_Nodes.svg: Added.
        * dom/svg/level3/xpath/Processing_Instruction_Nodes-expected.txt: Added.
        * dom/svg/level3/xpath/Processing_Instruction_Nodes.js: Added.
        * dom/svg/level3/xpath/Processing_Instruction_Nodes.svg: Added.
        * dom/svg/level3/xpath/Text_Nodes-expected.txt: Added.
        * dom/svg/level3/xpath/Text_Nodes.js: Added.
        * dom/svg/level3/xpath/Text_Nodes.svg: Added.
        * dom/svg/level3/xpath/XPathEvaluatorCast01-expected.txt: Added.
        * dom/svg/level3/xpath/XPathEvaluatorCast01.js: Added.
        * dom/svg/level3/xpath/XPathEvaluatorCast01.svg: Added.
        * dom/svg/level3/xpath/XPathEvaluator_createExpression_INVALID_EXPRESSION_ERR-expected.txt: Added.
        * dom/svg/level3/xpath/XPathEvaluator_createExpression_INVALID_EXPRESSION_ERR.js: Added.
        * dom/svg/level3/xpath/XPathEvaluator_createExpression_INVALID_EXPRESSION_ERR.svg: Added.
        * dom/svg/level3/xpath/XPathEvaluator_createExpression_NAMESPACE_ERR_01-expected.txt: Added.
        * dom/svg/level3/xpath/XPathEvaluator_createExpression_NAMESPACE_ERR_01.js: Added.
        * dom/svg/level3/xpath/XPathEvaluator_createExpression_NAMESPACE_ERR_01.svg: Added.
        * dom/svg/level3/xpath/XPathEvaluator_createExpression_NAMESPACE_ERR_02-expected.txt: Added.
        * dom/svg/level3/xpath/XPathEvaluator_createExpression_NAMESPACE_ERR_02.js: Added.
        * dom/svg/level3/xpath/XPathEvaluator_createExpression_NAMESPACE_ERR_02.svg: Added.
        * dom/svg/level3/xpath/XPathEvaluator_createExpression_NS-expected.txt: Added.
        * dom/svg/level3/xpath/XPathEvaluator_createExpression_NS.js: Added.
        * dom/svg/level3/xpath/XPathEvaluator_createExpression_NS.svg: Added.
        * dom/svg/level3/xpath/XPathEvaluator_createExpression_no_NS-expected.txt: Added.
        * dom/svg/level3/xpath/XPathEvaluator_createExpression_no_NS.js: Added.
        * dom/svg/level3/xpath/XPathEvaluator_createExpression_no_NS.svg: Added.
        * dom/svg/level3/xpath/XPathEvaluator_createNSResolver_all-expected.txt: Added.
        * dom/svg/level3/xpath/XPathEvaluator_createNSResolver_all.js: Added.
        * dom/svg/level3/xpath/XPathEvaluator_createNSResolver_all.svg: Added.
        * dom/svg/level3/xpath/XPathEvaluator_createNSResolver_document-expected.txt: Added.
        * dom/svg/level3/xpath/XPathEvaluator_createNSResolver_document.js: Added.
        * dom/svg/level3/xpath/XPathEvaluator_createNSResolver_document.svg: Added.
        * dom/svg/level3/xpath/XPathEvaluator_createNSResolver_documentElement-expected.txt: Added.
        * dom/svg/level3/xpath/XPathEvaluator_createNSResolver_documentElement.js: Added.
        * dom/svg/level3/xpath/XPathEvaluator_createNSResolver_documentElement.svg: Added.
        * dom/svg/level3/xpath/XPathEvaluator_evaluate_INVALID_EXPRESSION_ERR-expected.txt: Added.
        * dom/svg/level3/xpath/XPathEvaluator_evaluate_INVALID_EXPRESSION_ERR.js: Added.
        * dom/svg/level3/xpath/XPathEvaluator_evaluate_INVALID_EXPRESSION_ERR.svg: Added.
        * dom/svg/level3/xpath/XPathEvaluator_evaluate_NAMESPACE_ERR-expected.txt: Added.
        * dom/svg/level3/xpath/XPathEvaluator_evaluate_NAMESPACE_ERR.js: Added.
        * dom/svg/level3/xpath/XPathEvaluator_evaluate_NAMESPACE_ERR.svg: Added.
        * dom/svg/level3/xpath/XPathEvaluator_evaluate_NOT_SUPPORTED_ERR-expected.txt: Added.
        * dom/svg/level3/xpath/XPathEvaluator_evaluate_NOT_SUPPORTED_ERR.js: Added.
        * dom/svg/level3/xpath/XPathEvaluator_evaluate_NOT_SUPPORTED_ERR.svg: Added.
        * dom/svg/level3/xpath/XPathEvaluator_evaluate_TYPE_ERR-expected.txt: Added.
        * dom/svg/level3/xpath/XPathEvaluator_evaluate_TYPE_ERR.js: Added.
        * dom/svg/level3/xpath/XPathEvaluator_evaluate_TYPE_ERR.svg: Added.
        * dom/svg/level3/xpath/XPathEvaluator_evaluate_WRONG_DOCUMENT_ERR-expected.txt: Added.
        * dom/svg/level3/xpath/XPathEvaluator_evaluate_WRONG_DOCUMENT_ERR.js: Added.
        * dom/svg/level3/xpath/XPathEvaluator_evaluate_WRONG_DOCUMENT_ERR.svg: Added.
        * dom/svg/level3/xpath/XPathEvaluator_evaluate_document-expected.txt: Added.
        * dom/svg/level3/xpath/XPathEvaluator_evaluate_document.js: Added.
        * dom/svg/level3/xpath/XPathEvaluator_evaluate_document.svg: Added.
        * dom/svg/level3/xpath/XPathEvaluator_evaluate_documentElement-expected.txt: Added.
        * dom/svg/level3/xpath/XPathEvaluator_evaluate_documentElement.js: Added.
        * dom/svg/level3/xpath/XPathEvaluator_evaluate_documentElement.svg: Added.
        * dom/svg/level3/xpath/XPathExpression_evaluate_NOT_SUPPORTED_ERR-expected.txt: Added.
        * dom/svg/level3/xpath/XPathExpression_evaluate_NOT_SUPPORTED_ERR.js: Added.
        * dom/svg/level3/xpath/XPathExpression_evaluate_NOT_SUPPORTED_ERR.svg: Added.
        * dom/svg/level3/xpath/XPathExpression_evaluate_WRONG_DOCUMENT_ERR-expected.txt: Added.
        * dom/svg/level3/xpath/XPathExpression_evaluate_WRONG_DOCUMENT_ERR.js: Added.
        * dom/svg/level3/xpath/XPathExpression_evaluate_WRONG_DOCUMENT_ERR.svg: Added.
        * dom/svg/level3/xpath/XPathExpression_evaluate_document-expected.txt: Added.
        * dom/svg/level3/xpath/XPathExpression_evaluate_document.js: Added.
        * dom/svg/level3/xpath/XPathExpression_evaluate_document.svg: Added.
        * dom/svg/level3/xpath/XPathExpression_evaluate_documentElement-expected.txt: Added.
        * dom/svg/level3/xpath/XPathExpression_evaluate_documentElement.js: Added.
        * dom/svg/level3/xpath/XPathExpression_evaluate_documentElement.svg: Added.
        * dom/svg/level3/xpath/XPathNSResolver_lookupNamespaceURI_nist_dmstc-expected.txt: Added.
        * dom/svg/level3/xpath/XPathNSResolver_lookupNamespaceURI_nist_dmstc.js: Added.
        * dom/svg/level3/xpath/XPathNSResolver_lookupNamespaceURI_nist_dmstc.svg: Added.
        * dom/svg/level3/xpath/XPathNSResolver_lookupNamespaceURI_null-expected.txt: Added.
        * dom/svg/level3/xpath/XPathNSResolver_lookupNamespaceURI_null.js: Added.
        * dom/svg/level3/xpath/XPathNSResolver_lookupNamespaceURI_null.svg: Added.
        * dom/svg/level3/xpath/XPathNSResolver_lookupNamespaceURI_prefix-expected.txt: Added.
        * dom/svg/level3/xpath/XPathNSResolver_lookupNamespaceURI_prefix.js: Added.
        * dom/svg/level3/xpath/XPathNSResolver_lookupNamespaceURI_prefix.svg: Added.
        * dom/svg/level3/xpath/XPathNSResolver_lookupNamespaceURI_xml-expected.txt: Added.
        * dom/svg/level3/xpath/XPathNSResolver_lookupNamespaceURI_xml.js: Added.
        * dom/svg/level3/xpath/XPathNSResolver_lookupNamespaceURI_xml.svg: Added.
        * dom/svg/level3/xpath/XPathResult_TYPE_ERR-expected.txt: Added.
        * dom/svg/level3/xpath/XPathResult_TYPE_ERR.js: Added.
        * dom/svg/level3/xpath/XPathResult_TYPE_ERR.svg: Added.
        * dom/svg/level3/xpath/XPathResult_booleanValue_false-expected.txt: Added.
        * dom/svg/level3/xpath/XPathResult_booleanValue_false.js: Added.
        * dom/svg/level3/xpath/XPathResult_booleanValue_false.svg: Added.
        * dom/svg/level3/xpath/XPathResult_booleanValue_true-expected.txt: Added.
        * dom/svg/level3/xpath/XPathResult_booleanValue_true.js: Added.
        * dom/svg/level3/xpath/XPathResult_booleanValue_true.svg: Added.
        * dom/svg/level3/xpath/XPathResult_invalidIteratorState_ANY_TYPE-expected.txt: Added.
        * dom/svg/level3/xpath/XPathResult_invalidIteratorState_ANY_TYPE.js: Added.
        * dom/svg/level3/xpath/XPathResult_invalidIteratorState_ANY_TYPE.svg: Added.
        * dom/svg/level3/xpath/XPathResult_invalidIteratorState_ANY_UNORDERED_NODE_TYPE-expected.txt: Added.
        * dom/svg/level3/xpath/XPathResult_invalidIteratorState_ANY_UNORDERED_NODE_TYPE.js: Added.
        * dom/svg/level3/xpath/XPathResult_invalidIteratorState_ANY_UNORDERED_NODE_TYPE.svg: Added.
        * dom/svg/level3/xpath/XPathResult_invalidIteratorState_BOOLEAN_TYPE-expected.txt: Added.
        * dom/svg/level3/xpath/XPathResult_invalidIteratorState_BOOLEAN_TYPE.js: Added.
        * dom/svg/level3/xpath/XPathResult_invalidIteratorState_BOOLEAN_TYPE.svg: Added.
        * dom/svg/level3/xpath/XPathResult_invalidIteratorState_FIRST_ORDERED_NODE_TYPE-expected.txt: Added.
        * dom/svg/level3/xpath/XPathResult_invalidIteratorState_FIRST_ORDERED_NODE_TYPE.js: Added.
        * dom/svg/level3/xpath/XPathResult_invalidIteratorState_FIRST_ORDERED_NODE_TYPE.svg: Added.
        * dom/svg/level3/xpath/XPathResult_invalidIteratorState_NUMBER_TYPE-expected.txt: Added.
        * dom/svg/level3/xpath/XPathResult_invalidIteratorState_NUMBER_TYPE.js: Added.
        * dom/svg/level3/xpath/XPathResult_invalidIteratorState_NUMBER_TYPE.svg: Added.
        * dom/svg/level3/xpath/XPathResult_invalidIteratorState_ORDERED_NODE_ITERATOR_TYPE-expected.txt: Added.
        * dom/svg/level3/xpath/XPathResult_invalidIteratorState_ORDERED_NODE_ITERATOR_TYPE.js: Added.
        * dom/svg/level3/xpath/XPathResult_invalidIteratorState_ORDERED_NODE_ITERATOR_TYPE.svg: Added.
        * dom/svg/level3/xpath/XPathResult_invalidIteratorState_ORDERED_NODE_SNAPSHOT_TYPE-expected.txt: Added.
        * dom/svg/level3/xpath/XPathResult_invalidIteratorState_ORDERED_NODE_SNAPSHOT_TYPE.js: Added.
        * dom/svg/level3/xpath/XPathResult_invalidIteratorState_ORDERED_NODE_SNAPSHOT_TYPE.svg: Added.
        * dom/svg/level3/xpath/XPathResult_invalidIteratorState_STRING_TYPE-expected.txt: Added.
        * dom/svg/level3/xpath/XPathResult_invalidIteratorState_STRING_TYPE.js: Added.
        * dom/svg/level3/xpath/XPathResult_invalidIteratorState_STRING_TYPE.svg: Added.
        * dom/svg/level3/xpath/XPathResult_invalidIteratorState_UNORDERED_NODE_ITERATOR_TYPE-expected.txt: Added.
        * dom/svg/level3/xpath/XPathResult_invalidIteratorState_UNORDERED_NODE_ITERATOR_TYPE.js: Added.
        * dom/svg/level3/xpath/XPathResult_invalidIteratorState_UNORDERED_NODE_ITERATOR_TYPE.svg: Added.
        * dom/svg/level3/xpath/XPathResult_invalidIteratorState_UNORDERED_NODE_SNAPSHOT_TYPE-expected.txt: Added.
        * dom/svg/level3/xpath/XPathResult_invalidIteratorState_UNORDERED_NODE_SNAPSHOT_TYPE.js: Added.
        * dom/svg/level3/xpath/XPathResult_invalidIteratorState_UNORDERED_NODE_SNAPSHOT_TYPE.svg: Added.
        * dom/svg/level3/xpath/XPathResult_iterateNext_INVALID_STATE_ERR-expected.txt: Added.
        * dom/svg/level3/xpath/XPathResult_iterateNext_INVALID_STATE_ERR.js: Added.
        * dom/svg/level3/xpath/XPathResult_iterateNext_INVALID_STATE_ERR.svg: Added.
        * dom/svg/level3/xpath/XPathResult_iteratorNext_ORDERED_NODE_ITERATOR_TYPE-expected.txt: Added.
        * dom/svg/level3/xpath/XPathResult_iteratorNext_ORDERED_NODE_ITERATOR_TYPE.js: Added.
        * dom/svg/level3/xpath/XPathResult_iteratorNext_ORDERED_NODE_ITERATOR_TYPE.svg: Added.
        * dom/svg/level3/xpath/XPathResult_iteratorNext_UNORDERED_NODE_ITERATOR_TYPE.js: Added.
        * dom/svg/level3/xpath/XPathResult_numberValue-expected.txt: Added.
        * dom/svg/level3/xpath/XPathResult_numberValue.js: Added.
        * dom/svg/level3/xpath/XPathResult_numberValue.svg: Added.
        * dom/svg/level3/xpath/XPathResult_resultType-expected.txt: Added.
        * dom/svg/level3/xpath/XPathResult_resultType.js: Added.
        * dom/svg/level3/xpath/XPathResult_resultType.svg: Added.
        * dom/svg/level3/xpath/XPathResult_singleNodeValue_ANY_UNORDERED_NODE_TYPE-expected.txt: Added.
        * dom/svg/level3/xpath/XPathResult_singleNodeValue_ANY_UNORDERED_NODE_TYPE.js: Added.
        * dom/svg/level3/xpath/XPathResult_singleNodeValue_ANY_UNORDERED_NODE_TYPE.svg: Added.
        * dom/svg/level3/xpath/XPathResult_singleNodeValue_FIRST_ORDERED_NODE_TYPE-expected.txt: Added.
        * dom/svg/level3/xpath/XPathResult_singleNodeValue_FIRST_ORDERED_NODE_TYPE.js: Added.
        * dom/svg/level3/xpath/XPathResult_singleNodeValue_FIRST_ORDERED_NODE_TYPE.svg: Added.
        * dom/svg/level3/xpath/XPathResult_snapshotItem_ORDERED_NODE_SNAPSHOT_TYPE_null-expected.txt: Added.
        * dom/svg/level3/xpath/XPathResult_snapshotItem_ORDERED_NODE_SNAPSHOT_TYPE_null.js: Added.
        * dom/svg/level3/xpath/XPathResult_snapshotItem_ORDERED_NODE_SNAPSHOT_TYPE_null.svg: Added.
        * dom/svg/level3/xpath/XPathResult_snapshotItem_ORDERED_NODE_SNAPSHOT_TYPE_order-expected.txt: Added.
        * dom/svg/level3/xpath/XPathResult_snapshotItem_ORDERED_NODE_SNAPSHOT_TYPE_order.js: Added.
        * dom/svg/level3/xpath/XPathResult_snapshotItem_ORDERED_NODE_SNAPSHOT_TYPE_order.svg: Added.
        * dom/svg/level3/xpath/XPathResult_snapshotItem_UNORDERED_NODE_SNAPSHOT_TYPE_count-expected.txt: Added.
        * dom/svg/level3/xpath/XPathResult_snapshotItem_UNORDERED_NODE_SNAPSHOT_TYPE_count.js: Added.
        * dom/svg/level3/xpath/XPathResult_snapshotItem_UNORDERED_NODE_SNAPSHOT_TYPE_count.svg: Added.
        * dom/svg/level3/xpath/XPathResult_snapshotItem_UNORDERED_NODE_SNAPSHOT_TYPE_null-expected.txt: Added.
        * dom/svg/level3/xpath/XPathResult_snapshotItem_UNORDERED_NODE_SNAPSHOT_TYPE_null.js: Added.
        * dom/svg/level3/xpath/XPathResult_snapshotItem_UNORDERED_NODE_SNAPSHOT_TYPE_null.svg: Added.
        * dom/svg/level3/xpath/XPathResult_snapshotLength_ORDERED_NODE_SNAPSHOT_TYPE-expected.txt: Added.
        * dom/svg/level3/xpath/XPathResult_snapshotLength_ORDERED_NODE_SNAPSHOT_TYPE.js: Added.
        * dom/svg/level3/xpath/XPathResult_snapshotLength_ORDERED_NODE_SNAPSHOT_TYPE.svg: Added.
        * dom/svg/level3/xpath/XPathResult_snapshotLength_UNORDERED_NODE_SNAPSHOT_TYPE-expected.txt: Added.
        * dom/svg/level3/xpath/XPathResult_snapshotLength_UNORDERED_NODE_SNAPSHOT_TYPE.js: Added.
        * dom/svg/level3/xpath/XPathResult_snapshotLength_UNORDERED_NODE_SNAPSHOT_TYPE.svg: Added.
        * dom/svg/level3/xpath/XPathResult_stringValue-expected.txt: Added.
        * dom/svg/level3/xpath/XPathResult_stringValue.js: Added.
        * dom/svg/level3/xpath/XPathResult_stringValue.svg: Added.
        * dom/svg/level3/xpath/svgunit.js: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@14235 268f45cc-cd09-0410-ab3c-d52691b4dbfc

195 files changed:
LayoutTests/ChangeLog
LayoutTests/dom/svg/level3/xpath/Attribute_Nodes-expected.txt [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/Attribute_Nodes.js [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/Attribute_Nodes.svg [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/Attribute_Nodes_xmlns-expected.txt [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/Attribute_Nodes_xmlns.js [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/Attribute_Nodes_xmlns.svg [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/Comment_Nodes-expected.txt [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/Comment_Nodes.js [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/Comment_Nodes.svg [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/Conformance_Expressions-expected.txt [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/Conformance_Expressions.js [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/Conformance_Expressions.svg [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/Conformance_ID-expected.txt [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/Conformance_ID.js [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/Conformance_ID.svg [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/Conformance_hasFeature_3-expected.txt [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/Conformance_hasFeature_3.js [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/Conformance_hasFeature_3.svg [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/Conformance_hasFeature_empty-expected.txt [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/Conformance_hasFeature_empty.js [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/Conformance_hasFeature_empty.svg [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/Conformance_hasFeature_null-expected.txt [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/Conformance_hasFeature_null.js [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/Conformance_hasFeature_null.svg [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/Conformance_isSupported_3-expected.txt [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/Conformance_isSupported_3.js [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/Conformance_isSupported_3.svg [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/Conformance_isSupported_empty-expected.txt [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/Conformance_isSupported_empty.js [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/Conformance_isSupported_empty.svg [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/Conformance_isSupported_null-expected.txt [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/Conformance_isSupported_null.js [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/Conformance_isSupported_null.svg [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/Element_Nodes-expected.txt [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/Element_Nodes.js [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/Element_Nodes.svg [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/Processing_Instruction_Nodes-expected.txt [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/Processing_Instruction_Nodes.js [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/Processing_Instruction_Nodes.svg [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/Text_Nodes-expected.txt [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/Text_Nodes.js [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/Text_Nodes.svg [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathEvaluatorCast01-expected.txt [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathEvaluatorCast01.js [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathEvaluatorCast01.svg [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createExpression_INVALID_EXPRESSION_ERR-expected.txt [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createExpression_INVALID_EXPRESSION_ERR.js [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createExpression_INVALID_EXPRESSION_ERR.svg [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createExpression_NAMESPACE_ERR_01-expected.txt [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createExpression_NAMESPACE_ERR_01.js [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createExpression_NAMESPACE_ERR_01.svg [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createExpression_NAMESPACE_ERR_02-expected.txt [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createExpression_NAMESPACE_ERR_02.js [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createExpression_NAMESPACE_ERR_02.svg [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createExpression_NS-expected.txt [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createExpression_NS.js [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createExpression_NS.svg [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createExpression_no_NS-expected.txt [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createExpression_no_NS.js [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createExpression_no_NS.svg [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createNSResolver_all-expected.txt [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createNSResolver_all.js [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createNSResolver_all.svg [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createNSResolver_document-expected.txt [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createNSResolver_document.js [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createNSResolver_document.svg [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createNSResolver_documentElement-expected.txt [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createNSResolver_documentElement.js [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createNSResolver_documentElement.svg [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_INVALID_EXPRESSION_ERR-expected.txt [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_INVALID_EXPRESSION_ERR.js [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_INVALID_EXPRESSION_ERR.svg [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_NAMESPACE_ERR-expected.txt [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_NAMESPACE_ERR.js [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_NAMESPACE_ERR.svg [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_NOT_SUPPORTED_ERR-expected.txt [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_NOT_SUPPORTED_ERR.js [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_NOT_SUPPORTED_ERR.svg [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_TYPE_ERR-expected.txt [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_TYPE_ERR.js [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_TYPE_ERR.svg [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_WRONG_DOCUMENT_ERR-expected.txt [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_WRONG_DOCUMENT_ERR.js [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_WRONG_DOCUMENT_ERR.svg [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_document-expected.txt [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_document.js [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_document.svg [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_documentElement-expected.txt [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_documentElement.js [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_documentElement.svg [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathExpression_evaluate_NOT_SUPPORTED_ERR-expected.txt [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathExpression_evaluate_NOT_SUPPORTED_ERR.js [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathExpression_evaluate_NOT_SUPPORTED_ERR.svg [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathExpression_evaluate_WRONG_DOCUMENT_ERR-expected.txt [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathExpression_evaluate_WRONG_DOCUMENT_ERR.js [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathExpression_evaluate_WRONG_DOCUMENT_ERR.svg [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathExpression_evaluate_document-expected.txt [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathExpression_evaluate_document.js [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathExpression_evaluate_document.svg [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathExpression_evaluate_documentElement-expected.txt [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathExpression_evaluate_documentElement.js [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathExpression_evaluate_documentElement.svg [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathNSResolver_lookupNamespaceURI_nist_dmstc-expected.txt [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathNSResolver_lookupNamespaceURI_nist_dmstc.js [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathNSResolver_lookupNamespaceURI_nist_dmstc.svg [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathNSResolver_lookupNamespaceURI_null-expected.txt [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathNSResolver_lookupNamespaceURI_null.js [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathNSResolver_lookupNamespaceURI_null.svg [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathNSResolver_lookupNamespaceURI_prefix-expected.txt [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathNSResolver_lookupNamespaceURI_prefix.js [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathNSResolver_lookupNamespaceURI_prefix.svg [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathNSResolver_lookupNamespaceURI_xml-expected.txt [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathNSResolver_lookupNamespaceURI_xml.js [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathNSResolver_lookupNamespaceURI_xml.svg [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_TYPE_ERR-expected.txt [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_TYPE_ERR.js [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_TYPE_ERR.svg [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_booleanValue_false-expected.txt [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_booleanValue_false.js [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_booleanValue_false.svg [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_booleanValue_true-expected.txt [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_booleanValue_true.js [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_booleanValue_true.svg [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_invalidIteratorState_ANY_TYPE-expected.txt [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_invalidIteratorState_ANY_TYPE.js [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_invalidIteratorState_ANY_TYPE.svg [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_invalidIteratorState_ANY_UNORDERED_NODE_TYPE-expected.txt [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_invalidIteratorState_ANY_UNORDERED_NODE_TYPE.js [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_invalidIteratorState_ANY_UNORDERED_NODE_TYPE.svg [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_invalidIteratorState_BOOLEAN_TYPE-expected.txt [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_invalidIteratorState_BOOLEAN_TYPE.js [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_invalidIteratorState_BOOLEAN_TYPE.svg [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_invalidIteratorState_FIRST_ORDERED_NODE_TYPE-expected.txt [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_invalidIteratorState_FIRST_ORDERED_NODE_TYPE.js [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_invalidIteratorState_FIRST_ORDERED_NODE_TYPE.svg [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_invalidIteratorState_NUMBER_TYPE-expected.txt [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_invalidIteratorState_NUMBER_TYPE.js [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_invalidIteratorState_NUMBER_TYPE.svg [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_invalidIteratorState_ORDERED_NODE_ITERATOR_TYPE-expected.txt [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_invalidIteratorState_ORDERED_NODE_ITERATOR_TYPE.js [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_invalidIteratorState_ORDERED_NODE_ITERATOR_TYPE.svg [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_invalidIteratorState_ORDERED_NODE_SNAPSHOT_TYPE-expected.txt [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_invalidIteratorState_ORDERED_NODE_SNAPSHOT_TYPE.js [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_invalidIteratorState_ORDERED_NODE_SNAPSHOT_TYPE.svg [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_invalidIteratorState_STRING_TYPE-expected.txt [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_invalidIteratorState_STRING_TYPE.js [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_invalidIteratorState_STRING_TYPE.svg [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_invalidIteratorState_UNORDERED_NODE_ITERATOR_TYPE-expected.txt [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_invalidIteratorState_UNORDERED_NODE_ITERATOR_TYPE.js [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_invalidIteratorState_UNORDERED_NODE_ITERATOR_TYPE.svg [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_invalidIteratorState_UNORDERED_NODE_SNAPSHOT_TYPE-expected.txt [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_invalidIteratorState_UNORDERED_NODE_SNAPSHOT_TYPE.js [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_invalidIteratorState_UNORDERED_NODE_SNAPSHOT_TYPE.svg [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_iterateNext_INVALID_STATE_ERR-expected.txt [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_iterateNext_INVALID_STATE_ERR.js [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_iterateNext_INVALID_STATE_ERR.svg [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_iteratorNext_ORDERED_NODE_ITERATOR_TYPE-expected.txt [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_iteratorNext_ORDERED_NODE_ITERATOR_TYPE.js [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_iteratorNext_ORDERED_NODE_ITERATOR_TYPE.svg [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_iteratorNext_UNORDERED_NODE_ITERATOR_TYPE.js [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_numberValue-expected.txt [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_numberValue.js [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_numberValue.svg [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_resultType-expected.txt [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_resultType.js [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_resultType.svg [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_singleNodeValue_ANY_UNORDERED_NODE_TYPE-expected.txt [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_singleNodeValue_ANY_UNORDERED_NODE_TYPE.js [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_singleNodeValue_ANY_UNORDERED_NODE_TYPE.svg [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_singleNodeValue_FIRST_ORDERED_NODE_TYPE-expected.txt [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_singleNodeValue_FIRST_ORDERED_NODE_TYPE.js [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_singleNodeValue_FIRST_ORDERED_NODE_TYPE.svg [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_snapshotItem_ORDERED_NODE_SNAPSHOT_TYPE_null-expected.txt [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_snapshotItem_ORDERED_NODE_SNAPSHOT_TYPE_null.js [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_snapshotItem_ORDERED_NODE_SNAPSHOT_TYPE_null.svg [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_snapshotItem_ORDERED_NODE_SNAPSHOT_TYPE_order-expected.txt [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_snapshotItem_ORDERED_NODE_SNAPSHOT_TYPE_order.js [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_snapshotItem_ORDERED_NODE_SNAPSHOT_TYPE_order.svg [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_snapshotItem_UNORDERED_NODE_SNAPSHOT_TYPE_count-expected.txt [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_snapshotItem_UNORDERED_NODE_SNAPSHOT_TYPE_count.js [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_snapshotItem_UNORDERED_NODE_SNAPSHOT_TYPE_count.svg [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_snapshotItem_UNORDERED_NODE_SNAPSHOT_TYPE_null-expected.txt [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_snapshotItem_UNORDERED_NODE_SNAPSHOT_TYPE_null.js [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_snapshotItem_UNORDERED_NODE_SNAPSHOT_TYPE_null.svg [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_snapshotLength_ORDERED_NODE_SNAPSHOT_TYPE-expected.txt [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_snapshotLength_ORDERED_NODE_SNAPSHOT_TYPE.js [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_snapshotLength_ORDERED_NODE_SNAPSHOT_TYPE.svg [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_snapshotLength_UNORDERED_NODE_SNAPSHOT_TYPE-expected.txt [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_snapshotLength_UNORDERED_NODE_SNAPSHOT_TYPE.js [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_snapshotLength_UNORDERED_NODE_SNAPSHOT_TYPE.svg [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_stringValue-expected.txt [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_stringValue.js [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/XPathResult_stringValue.svg [new file with mode: 0644]
LayoutTests/dom/svg/level3/xpath/svgunit.js [new file with mode: 0644]

index da3e2ef090e80d62ef51cf91644bfa07c88f7aa2..6c65a6b58c77e8f09c5439fa6ee9e06fa8756d53 100644 (file)
@@ -1,3 +1,207 @@
+2006-05-04  Anders Carlsson  <acarlsson@apple.com>
+
+        Reviewed by Darin.
+
+        Add DOM3 xpath tests as self-contained SVG files. 
+        
+        * dom/svg: Added.
+        * dom/svg/level3: Added.
+        * dom/svg/level3/xpath: Added.
+        * dom/svg/level3/xpath/Attribute_Nodes-expected.txt: Added.
+        * dom/svg/level3/xpath/Attribute_Nodes.js: Added.
+        * dom/svg/level3/xpath/Attribute_Nodes.svg: Added.
+        * dom/svg/level3/xpath/Attribute_Nodes_xmlns-expected.txt: Added.
+        * dom/svg/level3/xpath/Attribute_Nodes_xmlns.js: Added.
+        * dom/svg/level3/xpath/Attribute_Nodes_xmlns.svg: Added.
+        * dom/svg/level3/xpath/Comment_Nodes-expected.txt: Added.
+        * dom/svg/level3/xpath/Comment_Nodes.js: Added.
+        * dom/svg/level3/xpath/Comment_Nodes.svg: Added.
+        * dom/svg/level3/xpath/Conformance_Expressions-expected.txt: Added.
+        * dom/svg/level3/xpath/Conformance_Expressions.js: Added.
+        * dom/svg/level3/xpath/Conformance_Expressions.svg: Added.
+        * dom/svg/level3/xpath/Conformance_ID-expected.txt: Added.
+        * dom/svg/level3/xpath/Conformance_ID.js: Added.
+        * dom/svg/level3/xpath/Conformance_ID.svg: Added.
+        * dom/svg/level3/xpath/Conformance_hasFeature_3-expected.txt: Added.
+        * dom/svg/level3/xpath/Conformance_hasFeature_3.js: Added.
+        * dom/svg/level3/xpath/Conformance_hasFeature_3.svg: Added.
+        * dom/svg/level3/xpath/Conformance_hasFeature_empty-expected.txt: Added.
+        * dom/svg/level3/xpath/Conformance_hasFeature_empty.js: Added.
+        * dom/svg/level3/xpath/Conformance_hasFeature_empty.svg: Added.
+        * dom/svg/level3/xpath/Conformance_hasFeature_null-expected.txt: Added.
+        * dom/svg/level3/xpath/Conformance_hasFeature_null.js: Added.
+        * dom/svg/level3/xpath/Conformance_hasFeature_null.svg: Added.
+        * dom/svg/level3/xpath/Conformance_isSupported_3-expected.txt: Added.
+        * dom/svg/level3/xpath/Conformance_isSupported_3.js: Added.
+        * dom/svg/level3/xpath/Conformance_isSupported_3.svg: Added.
+        * dom/svg/level3/xpath/Conformance_isSupported_empty-expected.txt: Added.
+        * dom/svg/level3/xpath/Conformance_isSupported_empty.js: Added.
+        * dom/svg/level3/xpath/Conformance_isSupported_empty.svg: Added.
+        * dom/svg/level3/xpath/Conformance_isSupported_null-expected.txt: Added.
+        * dom/svg/level3/xpath/Conformance_isSupported_null.js: Added.
+        * dom/svg/level3/xpath/Conformance_isSupported_null.svg: Added.
+        * dom/svg/level3/xpath/Element_Nodes-expected.txt: Added.
+        * dom/svg/level3/xpath/Element_Nodes.js: Added.
+        * dom/svg/level3/xpath/Element_Nodes.svg: Added.
+        * dom/svg/level3/xpath/Processing_Instruction_Nodes-expected.txt: Added.
+        * dom/svg/level3/xpath/Processing_Instruction_Nodes.js: Added.
+        * dom/svg/level3/xpath/Processing_Instruction_Nodes.svg: Added.
+        * dom/svg/level3/xpath/Text_Nodes-expected.txt: Added.
+        * dom/svg/level3/xpath/Text_Nodes.js: Added.
+        * dom/svg/level3/xpath/Text_Nodes.svg: Added.
+        * dom/svg/level3/xpath/XPathEvaluatorCast01-expected.txt: Added.
+        * dom/svg/level3/xpath/XPathEvaluatorCast01.js: Added.
+        * dom/svg/level3/xpath/XPathEvaluatorCast01.svg: Added.
+        * dom/svg/level3/xpath/XPathEvaluator_createExpression_INVALID_EXPRESSION_ERR-expected.txt: Added.
+        * dom/svg/level3/xpath/XPathEvaluator_createExpression_INVALID_EXPRESSION_ERR.js: Added.
+        * dom/svg/level3/xpath/XPathEvaluator_createExpression_INVALID_EXPRESSION_ERR.svg: Added.
+        * dom/svg/level3/xpath/XPathEvaluator_createExpression_NAMESPACE_ERR_01-expected.txt: Added.
+        * dom/svg/level3/xpath/XPathEvaluator_createExpression_NAMESPACE_ERR_01.js: Added.
+        * dom/svg/level3/xpath/XPathEvaluator_createExpression_NAMESPACE_ERR_01.svg: Added.
+        * dom/svg/level3/xpath/XPathEvaluator_createExpression_NAMESPACE_ERR_02-expected.txt: Added.
+        * dom/svg/level3/xpath/XPathEvaluator_createExpression_NAMESPACE_ERR_02.js: Added.
+        * dom/svg/level3/xpath/XPathEvaluator_createExpression_NAMESPACE_ERR_02.svg: Added.
+        * dom/svg/level3/xpath/XPathEvaluator_createExpression_NS-expected.txt: Added.
+        * dom/svg/level3/xpath/XPathEvaluator_createExpression_NS.js: Added.
+        * dom/svg/level3/xpath/XPathEvaluator_createExpression_NS.svg: Added.
+        * dom/svg/level3/xpath/XPathEvaluator_createExpression_no_NS-expected.txt: Added.
+        * dom/svg/level3/xpath/XPathEvaluator_createExpression_no_NS.js: Added.
+        * dom/svg/level3/xpath/XPathEvaluator_createExpression_no_NS.svg: Added.
+        * dom/svg/level3/xpath/XPathEvaluator_createNSResolver_all-expected.txt: Added.
+        * dom/svg/level3/xpath/XPathEvaluator_createNSResolver_all.js: Added.
+        * dom/svg/level3/xpath/XPathEvaluator_createNSResolver_all.svg: Added.
+        * dom/svg/level3/xpath/XPathEvaluator_createNSResolver_document-expected.txt: Added.
+        * dom/svg/level3/xpath/XPathEvaluator_createNSResolver_document.js: Added.
+        * dom/svg/level3/xpath/XPathEvaluator_createNSResolver_document.svg: Added.
+        * dom/svg/level3/xpath/XPathEvaluator_createNSResolver_documentElement-expected.txt: Added.
+        * dom/svg/level3/xpath/XPathEvaluator_createNSResolver_documentElement.js: Added.
+        * dom/svg/level3/xpath/XPathEvaluator_createNSResolver_documentElement.svg: Added.
+        * dom/svg/level3/xpath/XPathEvaluator_evaluate_INVALID_EXPRESSION_ERR-expected.txt: Added.
+        * dom/svg/level3/xpath/XPathEvaluator_evaluate_INVALID_EXPRESSION_ERR.js: Added.
+        * dom/svg/level3/xpath/XPathEvaluator_evaluate_INVALID_EXPRESSION_ERR.svg: Added.
+        * dom/svg/level3/xpath/XPathEvaluator_evaluate_NAMESPACE_ERR-expected.txt: Added.
+        * dom/svg/level3/xpath/XPathEvaluator_evaluate_NAMESPACE_ERR.js: Added.
+        * dom/svg/level3/xpath/XPathEvaluator_evaluate_NAMESPACE_ERR.svg: Added.
+        * dom/svg/level3/xpath/XPathEvaluator_evaluate_NOT_SUPPORTED_ERR-expected.txt: Added.
+        * dom/svg/level3/xpath/XPathEvaluator_evaluate_NOT_SUPPORTED_ERR.js: Added.
+        * dom/svg/level3/xpath/XPathEvaluator_evaluate_NOT_SUPPORTED_ERR.svg: Added.
+        * dom/svg/level3/xpath/XPathEvaluator_evaluate_TYPE_ERR-expected.txt: Added.
+        * dom/svg/level3/xpath/XPathEvaluator_evaluate_TYPE_ERR.js: Added.
+        * dom/svg/level3/xpath/XPathEvaluator_evaluate_TYPE_ERR.svg: Added.
+        * dom/svg/level3/xpath/XPathEvaluator_evaluate_WRONG_DOCUMENT_ERR-expected.txt: Added.
+        * dom/svg/level3/xpath/XPathEvaluator_evaluate_WRONG_DOCUMENT_ERR.js: Added.
+        * dom/svg/level3/xpath/XPathEvaluator_evaluate_WRONG_DOCUMENT_ERR.svg: Added.
+        * dom/svg/level3/xpath/XPathEvaluator_evaluate_document-expected.txt: Added.
+        * dom/svg/level3/xpath/XPathEvaluator_evaluate_document.js: Added.
+        * dom/svg/level3/xpath/XPathEvaluator_evaluate_document.svg: Added.
+        * dom/svg/level3/xpath/XPathEvaluator_evaluate_documentElement-expected.txt: Added.
+        * dom/svg/level3/xpath/XPathEvaluator_evaluate_documentElement.js: Added.
+        * dom/svg/level3/xpath/XPathEvaluator_evaluate_documentElement.svg: Added.
+        * dom/svg/level3/xpath/XPathExpression_evaluate_NOT_SUPPORTED_ERR-expected.txt: Added.
+        * dom/svg/level3/xpath/XPathExpression_evaluate_NOT_SUPPORTED_ERR.js: Added.
+        * dom/svg/level3/xpath/XPathExpression_evaluate_NOT_SUPPORTED_ERR.svg: Added.
+        * dom/svg/level3/xpath/XPathExpression_evaluate_WRONG_DOCUMENT_ERR-expected.txt: Added.
+        * dom/svg/level3/xpath/XPathExpression_evaluate_WRONG_DOCUMENT_ERR.js: Added.
+        * dom/svg/level3/xpath/XPathExpression_evaluate_WRONG_DOCUMENT_ERR.svg: Added.
+        * dom/svg/level3/xpath/XPathExpression_evaluate_document-expected.txt: Added.
+        * dom/svg/level3/xpath/XPathExpression_evaluate_document.js: Added.
+        * dom/svg/level3/xpath/XPathExpression_evaluate_document.svg: Added.
+        * dom/svg/level3/xpath/XPathExpression_evaluate_documentElement-expected.txt: Added.
+        * dom/svg/level3/xpath/XPathExpression_evaluate_documentElement.js: Added.
+        * dom/svg/level3/xpath/XPathExpression_evaluate_documentElement.svg: Added.
+        * dom/svg/level3/xpath/XPathNSResolver_lookupNamespaceURI_nist_dmstc-expected.txt: Added.
+        * dom/svg/level3/xpath/XPathNSResolver_lookupNamespaceURI_nist_dmstc.js: Added.
+        * dom/svg/level3/xpath/XPathNSResolver_lookupNamespaceURI_nist_dmstc.svg: Added.
+        * dom/svg/level3/xpath/XPathNSResolver_lookupNamespaceURI_null-expected.txt: Added.
+        * dom/svg/level3/xpath/XPathNSResolver_lookupNamespaceURI_null.js: Added.
+        * dom/svg/level3/xpath/XPathNSResolver_lookupNamespaceURI_null.svg: Added.
+        * dom/svg/level3/xpath/XPathNSResolver_lookupNamespaceURI_prefix-expected.txt: Added.
+        * dom/svg/level3/xpath/XPathNSResolver_lookupNamespaceURI_prefix.js: Added.
+        * dom/svg/level3/xpath/XPathNSResolver_lookupNamespaceURI_prefix.svg: Added.
+        * dom/svg/level3/xpath/XPathNSResolver_lookupNamespaceURI_xml-expected.txt: Added.
+        * dom/svg/level3/xpath/XPathNSResolver_lookupNamespaceURI_xml.js: Added.
+        * dom/svg/level3/xpath/XPathNSResolver_lookupNamespaceURI_xml.svg: Added.
+        * dom/svg/level3/xpath/XPathResult_TYPE_ERR-expected.txt: Added.
+        * dom/svg/level3/xpath/XPathResult_TYPE_ERR.js: Added.
+        * dom/svg/level3/xpath/XPathResult_TYPE_ERR.svg: Added.
+        * dom/svg/level3/xpath/XPathResult_booleanValue_false-expected.txt: Added.
+        * dom/svg/level3/xpath/XPathResult_booleanValue_false.js: Added.
+        * dom/svg/level3/xpath/XPathResult_booleanValue_false.svg: Added.
+        * dom/svg/level3/xpath/XPathResult_booleanValue_true-expected.txt: Added.
+        * dom/svg/level3/xpath/XPathResult_booleanValue_true.js: Added.
+        * dom/svg/level3/xpath/XPathResult_booleanValue_true.svg: Added.
+        * dom/svg/level3/xpath/XPathResult_invalidIteratorState_ANY_TYPE-expected.txt: Added.
+        * dom/svg/level3/xpath/XPathResult_invalidIteratorState_ANY_TYPE.js: Added.
+        * dom/svg/level3/xpath/XPathResult_invalidIteratorState_ANY_TYPE.svg: Added.
+        * dom/svg/level3/xpath/XPathResult_invalidIteratorState_ANY_UNORDERED_NODE_TYPE-expected.txt: Added.
+        * dom/svg/level3/xpath/XPathResult_invalidIteratorState_ANY_UNORDERED_NODE_TYPE.js: Added.
+        * dom/svg/level3/xpath/XPathResult_invalidIteratorState_ANY_UNORDERED_NODE_TYPE.svg: Added.
+        * dom/svg/level3/xpath/XPathResult_invalidIteratorState_BOOLEAN_TYPE-expected.txt: Added.
+        * dom/svg/level3/xpath/XPathResult_invalidIteratorState_BOOLEAN_TYPE.js: Added.
+        * dom/svg/level3/xpath/XPathResult_invalidIteratorState_BOOLEAN_TYPE.svg: Added.
+        * dom/svg/level3/xpath/XPathResult_invalidIteratorState_FIRST_ORDERED_NODE_TYPE-expected.txt: Added.
+        * dom/svg/level3/xpath/XPathResult_invalidIteratorState_FIRST_ORDERED_NODE_TYPE.js: Added.
+        * dom/svg/level3/xpath/XPathResult_invalidIteratorState_FIRST_ORDERED_NODE_TYPE.svg: Added.
+        * dom/svg/level3/xpath/XPathResult_invalidIteratorState_NUMBER_TYPE-expected.txt: Added.
+        * dom/svg/level3/xpath/XPathResult_invalidIteratorState_NUMBER_TYPE.js: Added.
+        * dom/svg/level3/xpath/XPathResult_invalidIteratorState_NUMBER_TYPE.svg: Added.
+        * dom/svg/level3/xpath/XPathResult_invalidIteratorState_ORDERED_NODE_ITERATOR_TYPE-expected.txt: Added.
+        * dom/svg/level3/xpath/XPathResult_invalidIteratorState_ORDERED_NODE_ITERATOR_TYPE.js: Added.
+        * dom/svg/level3/xpath/XPathResult_invalidIteratorState_ORDERED_NODE_ITERATOR_TYPE.svg: Added.
+        * dom/svg/level3/xpath/XPathResult_invalidIteratorState_ORDERED_NODE_SNAPSHOT_TYPE-expected.txt: Added.
+        * dom/svg/level3/xpath/XPathResult_invalidIteratorState_ORDERED_NODE_SNAPSHOT_TYPE.js: Added.
+        * dom/svg/level3/xpath/XPathResult_invalidIteratorState_ORDERED_NODE_SNAPSHOT_TYPE.svg: Added.
+        * dom/svg/level3/xpath/XPathResult_invalidIteratorState_STRING_TYPE-expected.txt: Added.
+        * dom/svg/level3/xpath/XPathResult_invalidIteratorState_STRING_TYPE.js: Added.
+        * dom/svg/level3/xpath/XPathResult_invalidIteratorState_STRING_TYPE.svg: Added.
+        * dom/svg/level3/xpath/XPathResult_invalidIteratorState_UNORDERED_NODE_ITERATOR_TYPE-expected.txt: Added.
+        * dom/svg/level3/xpath/XPathResult_invalidIteratorState_UNORDERED_NODE_ITERATOR_TYPE.js: Added.
+        * dom/svg/level3/xpath/XPathResult_invalidIteratorState_UNORDERED_NODE_ITERATOR_TYPE.svg: Added.
+        * dom/svg/level3/xpath/XPathResult_invalidIteratorState_UNORDERED_NODE_SNAPSHOT_TYPE-expected.txt: Added.
+        * dom/svg/level3/xpath/XPathResult_invalidIteratorState_UNORDERED_NODE_SNAPSHOT_TYPE.js: Added.
+        * dom/svg/level3/xpath/XPathResult_invalidIteratorState_UNORDERED_NODE_SNAPSHOT_TYPE.svg: Added.
+        * dom/svg/level3/xpath/XPathResult_iterateNext_INVALID_STATE_ERR-expected.txt: Added.
+        * dom/svg/level3/xpath/XPathResult_iterateNext_INVALID_STATE_ERR.js: Added.
+        * dom/svg/level3/xpath/XPathResult_iterateNext_INVALID_STATE_ERR.svg: Added.
+        * dom/svg/level3/xpath/XPathResult_iteratorNext_ORDERED_NODE_ITERATOR_TYPE-expected.txt: Added.
+        * dom/svg/level3/xpath/XPathResult_iteratorNext_ORDERED_NODE_ITERATOR_TYPE.js: Added.
+        * dom/svg/level3/xpath/XPathResult_iteratorNext_ORDERED_NODE_ITERATOR_TYPE.svg: Added.
+        * dom/svg/level3/xpath/XPathResult_iteratorNext_UNORDERED_NODE_ITERATOR_TYPE.js: Added.
+        * dom/svg/level3/xpath/XPathResult_numberValue-expected.txt: Added.
+        * dom/svg/level3/xpath/XPathResult_numberValue.js: Added.
+        * dom/svg/level3/xpath/XPathResult_numberValue.svg: Added.
+        * dom/svg/level3/xpath/XPathResult_resultType-expected.txt: Added.
+        * dom/svg/level3/xpath/XPathResult_resultType.js: Added.
+        * dom/svg/level3/xpath/XPathResult_resultType.svg: Added.
+        * dom/svg/level3/xpath/XPathResult_singleNodeValue_ANY_UNORDERED_NODE_TYPE-expected.txt: Added.
+        * dom/svg/level3/xpath/XPathResult_singleNodeValue_ANY_UNORDERED_NODE_TYPE.js: Added.
+        * dom/svg/level3/xpath/XPathResult_singleNodeValue_ANY_UNORDERED_NODE_TYPE.svg: Added.
+        * dom/svg/level3/xpath/XPathResult_singleNodeValue_FIRST_ORDERED_NODE_TYPE-expected.txt: Added.
+        * dom/svg/level3/xpath/XPathResult_singleNodeValue_FIRST_ORDERED_NODE_TYPE.js: Added.
+        * dom/svg/level3/xpath/XPathResult_singleNodeValue_FIRST_ORDERED_NODE_TYPE.svg: Added.
+        * dom/svg/level3/xpath/XPathResult_snapshotItem_ORDERED_NODE_SNAPSHOT_TYPE_null-expected.txt: Added.
+        * dom/svg/level3/xpath/XPathResult_snapshotItem_ORDERED_NODE_SNAPSHOT_TYPE_null.js: Added.
+        * dom/svg/level3/xpath/XPathResult_snapshotItem_ORDERED_NODE_SNAPSHOT_TYPE_null.svg: Added.
+        * dom/svg/level3/xpath/XPathResult_snapshotItem_ORDERED_NODE_SNAPSHOT_TYPE_order-expected.txt: Added.
+        * dom/svg/level3/xpath/XPathResult_snapshotItem_ORDERED_NODE_SNAPSHOT_TYPE_order.js: Added.
+        * dom/svg/level3/xpath/XPathResult_snapshotItem_ORDERED_NODE_SNAPSHOT_TYPE_order.svg: Added.
+        * dom/svg/level3/xpath/XPathResult_snapshotItem_UNORDERED_NODE_SNAPSHOT_TYPE_count-expected.txt: Added.
+        * dom/svg/level3/xpath/XPathResult_snapshotItem_UNORDERED_NODE_SNAPSHOT_TYPE_count.js: Added.
+        * dom/svg/level3/xpath/XPathResult_snapshotItem_UNORDERED_NODE_SNAPSHOT_TYPE_count.svg: Added.
+        * dom/svg/level3/xpath/XPathResult_snapshotItem_UNORDERED_NODE_SNAPSHOT_TYPE_null-expected.txt: Added.
+        * dom/svg/level3/xpath/XPathResult_snapshotItem_UNORDERED_NODE_SNAPSHOT_TYPE_null.js: Added.
+        * dom/svg/level3/xpath/XPathResult_snapshotItem_UNORDERED_NODE_SNAPSHOT_TYPE_null.svg: Added.
+        * dom/svg/level3/xpath/XPathResult_snapshotLength_ORDERED_NODE_SNAPSHOT_TYPE-expected.txt: Added.
+        * dom/svg/level3/xpath/XPathResult_snapshotLength_ORDERED_NODE_SNAPSHOT_TYPE.js: Added.
+        * dom/svg/level3/xpath/XPathResult_snapshotLength_ORDERED_NODE_SNAPSHOT_TYPE.svg: Added.
+        * dom/svg/level3/xpath/XPathResult_snapshotLength_UNORDERED_NODE_SNAPSHOT_TYPE-expected.txt: Added.
+        * dom/svg/level3/xpath/XPathResult_snapshotLength_UNORDERED_NODE_SNAPSHOT_TYPE.js: Added.
+        * dom/svg/level3/xpath/XPathResult_snapshotLength_UNORDERED_NODE_SNAPSHOT_TYPE.svg: Added.
+        * dom/svg/level3/xpath/XPathResult_stringValue-expected.txt: Added.
+        * dom/svg/level3/xpath/XPathResult_stringValue.js: Added.
+        * dom/svg/level3/xpath/XPathResult_stringValue.svg: Added.
+        * dom/svg/level3/xpath/svgunit.js: Added.
+
 2006-05-08  Alexey Proskuryakov  <ap@nypop.com>
 
         Reviewed by Darin.
         * fast/dom/prototype-chain-expected.txt: Fix up prototype chain now
         that Node is autogenerated.
 
->>>>>>> .r14170
 2006-04-25  Justin Garcia  <justin.garcia@apple.com>
 
         Reviewed by harrison
diff --git a/LayoutTests/dom/svg/level3/xpath/Attribute_Nodes-expected.txt b/LayoutTests/dom/svg/level3/xpath/Attribute_Nodes-expected.txt
new file mode 100644 (file)
index 0000000..631805d
--- /dev/null
@@ -0,0 +1,7 @@
+layer at (0,0) size 800x600
+  RenderCanvas at (0,0) size 800x600
+    KCanvasContainer {svg} at (0,0) size 100x100
+      KCanvasItem {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00L100.00,0.00L100.00,100.00L0.00,100.00"]
+      RenderSVGText {text} at (0,0) size 785x18
+        RenderText {#text} at (0,0) size 163x18
+          text run at (0,0) width 163: "Attribute_Nodes: Success"
diff --git a/LayoutTests/dom/svg/level3/xpath/Attribute_Nodes.js b/LayoutTests/dom/svg/level3/xpath/Attribute_Nodes.js
new file mode 100644 (file)
index 0000000..bef153f
--- /dev/null
@@ -0,0 +1,157 @@
+
+/*
+Copyright Â© 2001-2004 World Wide Web Consortium, 
+(Massachusetts Institute of Technology, European Research Consortium 
+for Informatics and Mathematics, Keio University). All 
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the 
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even 
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['Attribute_Nodes'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+//   This function is called by the testing framework before
+//      running the test suite.
+//
+//   If there are no configuration exceptions, asynchronous
+//        document loading is started.  Otherwise, the status
+//        is set to complete and the exception is immediately
+//        raised when entering the body of the test.
+//
+function setUpPage() {
+   setUpPageStatus = 'running';
+   try {
+     //
+     //   creates test document builder, may throw exception
+     //
+     builder = createConfiguredBuilder();
+
+      docsLoaded = 0;
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      docsLoaded += preload(docRef, "doc", "staff");
+        
+       if (docsLoaded == 1) {
+          setUpPage = 'complete';
+       }
+    } catch(ex) {
+       catchInitializationError(builder, ex);
+        setUpPage = 'complete';
+    }
+}
+
+
+
+//
+//   This method is called on the completion of 
+//      each asychronous load started in setUpTests.
+//
+//   When every synchronous loaded document has completed,
+//      the page status is changed which allows the
+//      body of the test to be executed.
+function loadComplete() {
+    if (++docsLoaded == 1) {
+        setUpPageStatus = 'complete';
+    }
+}
+
+
+/**
+* 
+      S1.2.2 Attribute Nodes - 
+      Create ANY_TYPE XPathResult matching  //@*,
+      check that each matching Node is an Attribute Node,
+      that parentNodes of returned Attributes are null,
+      and that ownerElements are in fact Elements.
+    
+* @author Bob Clary
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#Mapping
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#XPathEvaluator
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#XPathEvaluator-createNSResolver
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#XPathEvaluator-evaluate
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#XPathNSResolver
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#XPathResult
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#XPathResult-iterateNext
+*/
+function Attribute_Nodes() {
+   var success;
+    if(checkInitialization(builder, "Attribute_Nodes") != null) return;
+    var ANY_TYPE = 0;
+      var NUMBER_TYPE = 1;
+      var STRING_TYPE = 2;
+      var BOOLEAN_TYPE = 3;
+      var UNORDERED_NODE_ITERATOR_TYPE = 4;
+      var ORDERED_NODE_ITERATOR_TYPE = 5;
+      var UNORDERED_NODE_SNAPSHOT_TYPE = 6;
+      var ORDERED_NODE_SNAPSHOT_TYPE = 7;
+      var ANY_UNORDERED_NODE_TYPE = 8;
+      var FIRST_ORDERED_NODE_TYPE = 9;
+      var doc;
+      var resolver;
+      var evaluator;
+      var contextNode;
+      var inresult = null;
+
+      var outresult = null;
+
+      var expression = "//@*";
+      var xpathType = ANY_TYPE;
+      var outNode;
+      var nodeType;
+      var parent;
+      var owner;
+      var ownerType;
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      doc = load(docRef, "doc", "staff");
+      evaluator = createXPathEvaluator(doc);
+resolver = evaluator.createNSResolver(doc);
+      contextNode =  doc;
+outresult = evaluator.evaluate(expression,contextNode,resolver,xpathType,inresult);
+      outNode = outresult.iterateNext();
+      
+    while(
+       
+       (outNode != null)
+
+       ) {
+       nodeType = outNode.nodeType;
+
+      assertEquals("S1.2.2-Attribute-Nodes-nodeType",2,nodeType);
+       parent = outNode.parentNode;
+
+      assertNull("S1.2.2-Attribute-Nodes-parentNode",parent);
+    owner = outNode.ownerElement;
+
+      ownerType = owner.nodeType;
+
+      assertEquals("S1.2.2-Attribute-Nodes-owner-nodeType",1,ownerType);
+       outNode = outresult.iterateNext();
+      
+       }
+
+}
+
+
+
+
+function runTest() {
+   Attribute_Nodes();
+}
diff --git a/LayoutTests/dom/svg/level3/xpath/Attribute_Nodes.svg b/LayoutTests/dom/svg/level3/xpath/Attribute_Nodes.svg
new file mode 100644 (file)
index 0000000..39c24ca
--- /dev/null
@@ -0,0 +1,72 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>\r
+<!DOCTYPE svg SYSTEM "staff.dtd" [\r
+   <!ENTITY ent1 "es">\r
+   <!ENTITY ent2 "1900 Dallas Road">\r
+   <!ENTITY ent3 "Texas">\r
+   <!ENTITY ent4 "<entElement domestic='Yes'>Element data</entElement><?PItarget PIdata?>">\r
+   <!ENTITY ent5 PUBLIC "entityURI" "entityFile" NDATA notation1>\r
+   <!ENTITY ent1 "This entity should be discarded">\r
+   <!NOTATION notation1 PUBLIC "notation1File">\r
+   <!NOTATION notation2 SYSTEM "notation2File">\r
+   <!ATTLIST employee xmlns CDATA #IMPLIED>\r
+   <!ELEMENT svg (rect, script, employee+)>\r
+   <!ATTLIST svg \r
+      xmlns CDATA #FIXED "http://www.w3.org/2000/svg"\r
+      name CDATA #IMPLIED>\r
+   <!ELEMENT rect EMPTY>\r
+   <!ATTLIST rect \r
+      x CDATA #REQUIRED\r
+      y CDATA #REQUIRED\r
+      width CDATA #REQUIRED\r
+      height CDATA #REQUIRED>\r
+  <!ELEMENT script (#PCDATA)>\r
+  <!ATTLIST script type CDATA #IMPLIED>      \r
+]>\r
+<!-- This is comment number 1.-->\r
+<svg xmlns="http://www.w3.org/2000/svg"><rect x="0" y="0" width="100" height="100"/>\r
+<script xmlns="http://www.w3.org/1999/xhtml" src="Attribute_Nodes.js"/>\r
+<script xmlns="http://www.w3.org/1999/xhtml" src="svgunit.js"/>\r
+ <employee xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-1/Files">\r
+  <employeeId>EMP0001</employeeId>\r
+  <name>Margaret Martin</name>\r
+  <position>Accountant</position>           \r
+  <salary>56,000</salary>\r
+  <gender>Female</gender>\r
+  <address domestic="Yes">1230 North Ave. Dallas, Texas 98551</address>\r
+ </employee>\r
+ <employee xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-1/Files">\r
+  <employeeId>EMP0002</employeeId>\r
+  <name>Martha Raynolds<![CDATA[This is a CDATASection with EntityReference number 2 &ent2;]]>\r
+<![CDATA[This is an adjacent CDATASection with a reference to a tab &tab;]]></name>\r
+  <position>Secretary</position>\r
+  <salary>35,000</salary>\r
+  <gender>Female</gender>\r
+  <address domestic="Yes" street="Yes">&ent2; Dallas, &ent3;\r
+ 98554</address>\r
+ </employee>\r
+ <employee xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-1/Files">\r
+  <employeeId>EMP0003</employeeId>\r
+  <name>Roger\r
+ Jones</name>\r
+  <position>Department Manager</position>\r
+  <salary>100,000</salary>\r
+  <gender>&ent4;</gender>\r
+  <address domestic="Yes" street="No">PO Box 27 Irving, texas 98553</address>\r
+ </employee>\r
+ <employee xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-1/Files">\r
+  <employeeId>EMP0004</employeeId>\r
+  <name>Jeny Oconnor</name>\r
+  <position>Personnel Director</position>\r
+  <salary>95,000</salary>\r
+  <gender>Female</gender>\r
+  <address domestic="Yes" street="Y&ent1;">27 South Road. Dallas, Texas 98556</address>\r
+ </employee>\r
+ <employee xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-1/Files">\r
+  <employeeId>EMP0005</employeeId>\r
+  <name>Robert Myers</name>\r
+  <position>Computer Specialist</position>\r
+  <salary>90,000</salary>\r
+  <gender>male</gender>\r
+  <address street="Yes">1821 Nordic. Road, Irving Texas 98558</address>\r
+ </employee>\r
+ </svg>\r
diff --git a/LayoutTests/dom/svg/level3/xpath/Attribute_Nodes_xmlns-expected.txt b/LayoutTests/dom/svg/level3/xpath/Attribute_Nodes_xmlns-expected.txt
new file mode 100644 (file)
index 0000000..b09835e
--- /dev/null
@@ -0,0 +1,7 @@
+layer at (0,0) size 800x600
+  RenderCanvas at (0,0) size 800x600
+    KCanvasContainer {svg} at (0,0) size 100x100
+      KCanvasItem {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00L100.00,0.00L100.00,100.00L0.00,100.00"]
+      RenderSVGText {text} at (0,0) size 785x18
+        RenderText {#text} at (0,0) size 209x18
+          text run at (0,0) width 209: "Attribute_Nodes_xmlns: Success"
diff --git a/LayoutTests/dom/svg/level3/xpath/Attribute_Nodes_xmlns.js b/LayoutTests/dom/svg/level3/xpath/Attribute_Nodes_xmlns.js
new file mode 100644 (file)
index 0000000..ad2d870
--- /dev/null
@@ -0,0 +1,134 @@
+
+/*
+Copyright Â© 2001-2004 World Wide Web Consortium, 
+(Massachusetts Institute of Technology, European Research Consortium 
+for Informatics and Mathematics, Keio University). All 
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the 
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even 
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['Attribute_Nodes_xmlns'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+//   This function is called by the testing framework before
+//      running the test suite.
+//
+//   If there are no configuration exceptions, asynchronous
+//        document loading is started.  Otherwise, the status
+//        is set to complete and the exception is immediately
+//        raised when entering the body of the test.
+//
+function setUpPage() {
+   setUpPageStatus = 'running';
+   try {
+     //
+     //   creates test document builder, may throw exception
+     //
+     builder = createConfiguredBuilder();
+
+      docsLoaded = 0;
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      docsLoaded += preload(docRef, "doc", "staffNS");
+        
+       if (docsLoaded == 1) {
+          setUpPage = 'complete';
+       }
+    } catch(ex) {
+       catchInitializationError(builder, ex);
+        setUpPage = 'complete';
+    }
+}
+
+
+
+//
+//   This method is called on the completion of 
+//      each asychronous load started in setUpTests.
+//
+//   When every synchronous loaded document has completed,
+//      the page status is changed which allows the
+//      body of the test to be executed.
+function loadComplete() {
+    if (++docsLoaded == 1) {
+        setUpPageStatus = 'complete';
+    }
+}
+
+
+/**
+* 
+      S1.2.2 Attribute Nodes - 
+      Create ANY_TYPE XPathResult matching //@xmlns,
+      check that there are no matching Nodes by
+      checking for XPathResult.iterateNext == null
+      since namespace attributes are not retrievable.
+    
+* @author Bob Clary
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#Mapping
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#XPathEvaluator
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#XPathEvaluator-createNSResolver
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#XPathEvaluator-evaluate
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#XPathNSResolver
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#XPathResult
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#XPathResult-iterateNext
+*/
+function Attribute_Nodes_xmlns() {
+   var success;
+    if(checkInitialization(builder, "Attribute_Nodes_xmlns") != null) return;
+    var ANY_TYPE = 0;
+      var NUMBER_TYPE = 1;
+      var STRING_TYPE = 2;
+      var BOOLEAN_TYPE = 3;
+      var UNORDERED_NODE_ITERATOR_TYPE = 4;
+      var ORDERED_NODE_ITERATOR_TYPE = 5;
+      var UNORDERED_NODE_SNAPSHOT_TYPE = 6;
+      var ORDERED_NODE_SNAPSHOT_TYPE = 7;
+      var ANY_UNORDERED_NODE_TYPE = 8;
+      var FIRST_ORDERED_NODE_TYPE = 9;
+      var doc;
+      var resolver;
+      var evaluator;
+      var contextNode;
+      var inresult = null;
+
+      var outresult = null;
+
+      var expression = "//@xmlns";
+      var xpathType = ANY_TYPE;
+      var outNode;
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      doc = load(docRef, "doc", "staffNS");
+      evaluator = createXPathEvaluator(doc);
+resolver = evaluator.createNSResolver(doc);
+      contextNode =  doc;
+outresult = evaluator.evaluate(expression,contextNode,resolver,xpathType,inresult);
+      outNode = outresult.iterateNext();
+      assertNull("Attribute_Nodes_xmlnsxmlns",outNode);
+    
+}
+
+
+
+
+function runTest() {
+   Attribute_Nodes_xmlns();
+}
diff --git a/LayoutTests/dom/svg/level3/xpath/Attribute_Nodes_xmlns.svg b/LayoutTests/dom/svg/level3/xpath/Attribute_Nodes_xmlns.svg
new file mode 100644 (file)
index 0000000..84aff51
--- /dev/null
@@ -0,0 +1,74 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>\r
+<!DOCTYPE svg PUBLIC "STAFF" "staffNS.dtd" \r
+[\r
+   <!ENTITY ent1 "es">\r
+   <!ENTITY ent2 "1900 Dallas Road">\r
+   <!ENTITY ent3 "Texas">\r
+   <!ENTITY ent4 "<entElement1 xmlns:local1='www.xyz.com'>Element data</entElement1><?PItarget PIdata?>">\r
+   <!ENTITY ent5 PUBLIC "entityURI" "entityFile" NDATA notation1>\r
+   <!ENTITY ent6 PUBLIC "uri" "file" NDATA notation2>\r
+   <!ENTITY ent1 "This entity should be discarded">\r
+   <!NOTATION notation1 PUBLIC "notation1File">\r
+   <!NOTATION notation2 SYSTEM "notation2File">\r
+   <!ELEMENT svg (rect, script, employee+, emp:employee, employee*)>\r
+   <!ATTLIST svg \r
+      xmlns CDATA #FIXED "http://www.w3.org/2000/svg"\r
+      name CDATA #IMPLIED>\r
+   <!ELEMENT rect EMPTY>\r
+   <!ATTLIST rect \r
+      x CDATA #REQUIRED\r
+      y CDATA #REQUIRED\r
+      width CDATA #REQUIRED\r
+      height CDATA #REQUIRED>\r
+  <!ELEMENT script (#PCDATA)>\r
+  <!ATTLIST script type CDATA #IMPLIED>      \r
+]>\r
+<!-- This is comment number 1.-->\r
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:nist="http://www.nist.gov"><rect x="0" y="0" width="100" height="100"/>\r
+<script xmlns="http://www.w3.org/1999/xhtml" src="Attribute_Nodes_xmlns.js"/>\r
+<script xmlns="http://www.w3.org/1999/xhtml" src="svgunit.js"/>\r
+ <employee xmlns="http://www.nist.gov" xmlns:dmstc="http://www.usa.com">\r
+  <employeeId>EMP0001</employeeId>\r
+  <name>Margaret Martin</name>\r
+  <position>Accountant</position>           \r
+  <salary>56,000</salary>\r
+  <gender>Female</gender>\r
+  <address dmstc:domestic="Yes">1230 North Ave. Dallas, Texas 98551</address>\r
+ </employee>\r
+ <employee xmlns:dmstc="http://www.usa.com" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0002</employeeId>\r
+  <name>Martha Raynolds\r
+<![CDATA[This is a CDATASection with EntityReference number 2 &ent2;]]>\r
+<![CDATA[This is an adjacent CDATASection with a reference to a tab &tab;]]></name>\r
+  <position>Secretary</position>\r
+  <salary>35,000</salary>\r
+  <gender>Female</gender>\r
+  <address dmstc:domestic="Yes" street="Yes">&ent2; Dallas, &ent3;\r
+ 98554</address>\r
+ </employee>\r
+ <employee xmlns:dmstc="http://www.netzero.com" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0003</employeeId>\r
+  <name>Roger\r
+ Jones</name>\r
+  <position>Department Manager</position>\r
+  <salary>100,000</salary>\r
+  <gender>&ent4;</gender>\r
+  <address dmstc:domestic="Yes" street="No">PO Box 27 Irving, texas 98553</address>\r
+ </employee>\r
+ <emp:employee xmlns:emp="http://www.nist.gov" xmlns:nm="http://www.altavista.com" >    <emp:employeeId>EMP0004</emp:employeeId>\r
+  <nm:name>Jeny Oconnor</nm:name>\r
+  <emp:position>Personnel Director</emp:position>\r
+  <emp:salary>95,000</emp:salary>\r
+  <emp:gender>Female</emp:gender>\r
+  <emp:address emp:domestic="Yes" street="Y&ent1;" emp:zone="CANADA" emp:local1="TRUE">27 South Road. Dallas, texas 98556</emp:address>\r
+ </emp:employee>\r
+ <employee xmlns:emp2="http://www.nist.gov" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0005</employeeId>\r
+  <name>Robert Myers</name>\r
+  <position>Computer Specialist</position>\r
+  <salary>90,000</salary>\r
+  <gender>male</gender>\r
+  <address street="Yes" xmlns="http://www.nist.gov">1821 Nordic. Road, Irving Texas 98558</address>\r
+ </employee>\r
+ </svg>\r
\r
diff --git a/LayoutTests/dom/svg/level3/xpath/Comment_Nodes-expected.txt b/LayoutTests/dom/svg/level3/xpath/Comment_Nodes-expected.txt
new file mode 100644 (file)
index 0000000..6c3078d
--- /dev/null
@@ -0,0 +1,7 @@
+layer at (0,0) size 800x600
+  RenderCanvas at (0,0) size 800x600
+    KCanvasContainer {svg} at (0,0) size 100x100
+      KCanvasItem {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00L100.00,0.00L100.00,100.00L0.00,100.00"]
+      RenderSVGText {text} at (0,0) size 785x18
+        RenderText {#text} at (0,0) size 169x18
+          text run at (0,0) width 169: "Comment_Nodes: Success"
diff --git a/LayoutTests/dom/svg/level3/xpath/Comment_Nodes.js b/LayoutTests/dom/svg/level3/xpath/Comment_Nodes.js
new file mode 100644 (file)
index 0000000..a8e56d6
--- /dev/null
@@ -0,0 +1,144 @@
+
+/*
+Copyright Â© 2001-2004 World Wide Web Consortium, 
+(Massachusetts Institute of Technology, European Research Consortium 
+for Informatics and Mathematics, Keio University). All 
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the 
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even 
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['Comment_Nodes'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+//   This function is called by the testing framework before
+//      running the test suite.
+//
+//   If there are no configuration exceptions, asynchronous
+//        document loading is started.  Otherwise, the status
+//        is set to complete and the exception is immediately
+//        raised when entering the body of the test.
+//
+function setUpPage() {
+   setUpPageStatus = 'running';
+   try {
+     //
+     //   creates test document builder, may throw exception
+     //
+     builder = createConfiguredBuilder();
+
+      docsLoaded = 0;
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      docsLoaded += preload(docRef, "doc", "staff");
+        
+       if (docsLoaded == 1) {
+          setUpPage = 'complete';
+       }
+    } catch(ex) {
+       catchInitializationError(builder, ex);
+        setUpPage = 'complete';
+    }
+}
+
+
+
+//
+//   This method is called on the completion of 
+//      each asychronous load started in setUpTests.
+//
+//   When every synchronous loaded document has completed,
+//      the page status is changed which allows the
+//      body of the test to be executed.
+function loadComplete() {
+    if (++docsLoaded == 1) {
+        setUpPageStatus = 'complete';
+    }
+}
+
+
+/**
+* 
+      S1.2.6 Comment Nodes - 
+      Create ANY_TYPE XPathResult matching //comment(),
+      check that each matching Node is a Comment Node.
+    
+* @author Bob Clary
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#Mapping
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#XPathEvaluator
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#XPathEvaluator-createNSResolver
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#XPathEvaluator-evaluate
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#XPathNSResolver
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#XPathResult
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#XPathResult-iterateNext
+*/
+function Comment_Nodes() {
+   var success;
+    if(checkInitialization(builder, "Comment_Nodes") != null) return;
+    var ANY_TYPE = 0;
+      var NUMBER_TYPE = 1;
+      var STRING_TYPE = 2;
+      var BOOLEAN_TYPE = 3;
+      var UNORDERED_NODE_ITERATOR_TYPE = 4;
+      var ORDERED_NODE_ITERATOR_TYPE = 5;
+      var UNORDERED_NODE_SNAPSHOT_TYPE = 6;
+      var ORDERED_NODE_SNAPSHOT_TYPE = 7;
+      var ANY_UNORDERED_NODE_TYPE = 8;
+      var FIRST_ORDERED_NODE_TYPE = 9;
+      var doc;
+      var resolver;
+      var evaluator;
+      var contextNode;
+      var inresult = null;
+
+      var outresult = null;
+
+      var expression = "//comment()";
+      var xpathType = ANY_TYPE;
+      var currNode;
+      var nodeType;
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      doc = load(docRef, "doc", "staff");
+      evaluator = createXPathEvaluator(doc);
+resolver = evaluator.createNSResolver(doc);
+      contextNode =  doc;
+outresult = evaluator.evaluate(expression,contextNode,resolver,xpathType,inresult);
+      currNode = outresult.iterateNext();
+      
+    while(
+       
+       (currNode != null)
+
+       ) {
+       nodeType = currNode.nodeType;
+
+      assertEquals("S1.2.6-Comment-Nodes-nodeType",8,nodeType);
+       currNode = outresult.iterateNext();
+      
+       }
+
+}
+
+
+
+
+function runTest() {
+   Comment_Nodes();
+}
diff --git a/LayoutTests/dom/svg/level3/xpath/Comment_Nodes.svg b/LayoutTests/dom/svg/level3/xpath/Comment_Nodes.svg
new file mode 100644 (file)
index 0000000..9f1f7bf
--- /dev/null
@@ -0,0 +1,72 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>\r
+<!DOCTYPE svg SYSTEM "staff.dtd" [\r
+   <!ENTITY ent1 "es">\r
+   <!ENTITY ent2 "1900 Dallas Road">\r
+   <!ENTITY ent3 "Texas">\r
+   <!ENTITY ent4 "<entElement domestic='Yes'>Element data</entElement><?PItarget PIdata?>">\r
+   <!ENTITY ent5 PUBLIC "entityURI" "entityFile" NDATA notation1>\r
+   <!ENTITY ent1 "This entity should be discarded">\r
+   <!NOTATION notation1 PUBLIC "notation1File">\r
+   <!NOTATION notation2 SYSTEM "notation2File">\r
+   <!ATTLIST employee xmlns CDATA #IMPLIED>\r
+   <!ELEMENT svg (rect, script, employee+)>\r
+   <!ATTLIST svg \r
+      xmlns CDATA #FIXED "http://www.w3.org/2000/svg"\r
+      name CDATA #IMPLIED>\r
+   <!ELEMENT rect EMPTY>\r
+   <!ATTLIST rect \r
+      x CDATA #REQUIRED\r
+      y CDATA #REQUIRED\r
+      width CDATA #REQUIRED\r
+      height CDATA #REQUIRED>\r
+  <!ELEMENT script (#PCDATA)>\r
+  <!ATTLIST script type CDATA #IMPLIED>      \r
+]>\r
+<!-- This is comment number 1.-->\r
+<svg xmlns="http://www.w3.org/2000/svg"><rect x="0" y="0" width="100" height="100"/>\r
+<script xmlns="http://www.w3.org/1999/xhtml" src="Comment_Nodes.js"/>\r
+<script xmlns="http://www.w3.org/1999/xhtml" src="svgunit.js"/>\r
+ <employee xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-1/Files">\r
+  <employeeId>EMP0001</employeeId>\r
+  <name>Margaret Martin</name>\r
+  <position>Accountant</position>           \r
+  <salary>56,000</salary>\r
+  <gender>Female</gender>\r
+  <address domestic="Yes">1230 North Ave. Dallas, Texas 98551</address>\r
+ </employee>\r
+ <employee xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-1/Files">\r
+  <employeeId>EMP0002</employeeId>\r
+  <name>Martha Raynolds<![CDATA[This is a CDATASection with EntityReference number 2 &ent2;]]>\r
+<![CDATA[This is an adjacent CDATASection with a reference to a tab &tab;]]></name>\r
+  <position>Secretary</position>\r
+  <salary>35,000</salary>\r
+  <gender>Female</gender>\r
+  <address domestic="Yes" street="Yes">&ent2; Dallas, &ent3;\r
+ 98554</address>\r
+ </employee>\r
+ <employee xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-1/Files">\r
+  <employeeId>EMP0003</employeeId>\r
+  <name>Roger\r
+ Jones</name>\r
+  <position>Department Manager</position>\r
+  <salary>100,000</salary>\r
+  <gender>&ent4;</gender>\r
+  <address domestic="Yes" street="No">PO Box 27 Irving, texas 98553</address>\r
+ </employee>\r
+ <employee xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-1/Files">\r
+  <employeeId>EMP0004</employeeId>\r
+  <name>Jeny Oconnor</name>\r
+  <position>Personnel Director</position>\r
+  <salary>95,000</salary>\r
+  <gender>Female</gender>\r
+  <address domestic="Yes" street="Y&ent1;">27 South Road. Dallas, Texas 98556</address>\r
+ </employee>\r
+ <employee xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-1/Files">\r
+  <employeeId>EMP0005</employeeId>\r
+  <name>Robert Myers</name>\r
+  <position>Computer Specialist</position>\r
+  <salary>90,000</salary>\r
+  <gender>male</gender>\r
+  <address street="Yes">1821 Nordic. Road, Irving Texas 98558</address>\r
+ </employee>\r
+ </svg>\r
diff --git a/LayoutTests/dom/svg/level3/xpath/Conformance_Expressions-expected.txt b/LayoutTests/dom/svg/level3/xpath/Conformance_Expressions-expected.txt
new file mode 100644 (file)
index 0000000..56595b2
--- /dev/null
@@ -0,0 +1,7 @@
+layer at (0,0) size 800x600
+  RenderCanvas at (0,0) size 800x600
+    KCanvasContainer {svg} at (0,0) size 100x100
+      KCanvasItem {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00L100.00,0.00L100.00,100.00L0.00,100.00"]
+      RenderSVGText {text} at (0,0) size 785x18
+        RenderText {#text} at (0,0) size 228x18
+          text run at (0,0) width 228: "Conformance_Expressions: Success"
diff --git a/LayoutTests/dom/svg/level3/xpath/Conformance_Expressions.js b/LayoutTests/dom/svg/level3/xpath/Conformance_Expressions.js
new file mode 100644 (file)
index 0000000..0ce08e9
--- /dev/null
@@ -0,0 +1,307 @@
+
+/*
+Copyright Â© 2001-2004 World Wide Web Consortium, 
+(Massachusetts Institute of Technology, European Research Consortium 
+for Informatics and Mathematics, Keio University). All 
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the 
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even 
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['Conformance_Expressions'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+//   This function is called by the testing framework before
+//      running the test suite.
+//
+//   If there are no configuration exceptions, asynchronous
+//        document loading is started.  Otherwise, the status
+//        is set to complete and the exception is immediately
+//        raised when entering the body of the test.
+//
+function setUpPage() {
+   setUpPageStatus = 'running';
+   try {
+     //
+     //   creates test document builder, may throw exception
+     //
+     builder = createConfiguredBuilder();
+
+      docsLoaded = 0;
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      docsLoaded += preload(docRef, "doc", "staffNS");
+        
+       if (docsLoaded == 1) {
+          setUpPage = 'complete';
+       }
+    } catch(ex) {
+       catchInitializationError(builder, ex);
+        setUpPage = 'complete';
+    }
+}
+
+
+
+//
+//   This method is called on the completion of 
+//      each asychronous load started in setUpTests.
+//
+//   When every synchronous loaded document has completed,
+//      the page status is changed which allows the
+//      body of the test to be executed.
+function loadComplete() {
+    if (++docsLoaded == 1) {
+        setUpPageStatus = 'complete';
+    }
+}
+
+
+/**
+* 
+      1.3 Conformance - Iterate over a list of strings containing 
+      valid XPath expressions, calling XPathEvaluator.createExpression 
+      for each. If no expections are thrown and each result is non-null, 
+      then the test passes.
+    
+* @author Bob Clary
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#Conformance
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#XPathEvaluator
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#XPathEvaluator-createNSResolver
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#XPathEvaluator-createExpression
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#XPathNSResolver
+*/
+function Conformance_Expressions() {
+   var success;
+    if(checkInitialization(builder, "Conformance_Expressions") != null) return;
+    var doc;
+      var resolver;
+      var evaluator;
+      var expression;
+      var expressionList = new Array();
+
+      var xpathexpression;
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      doc = load(docRef, "doc", "staffNS");
+      evaluator = createXPathEvaluator(doc);
+resolver = evaluator.createNSResolver(doc);
+      expressionList[expressionList.length] = "/";
+expressionList[expressionList.length] = "child::comment()";
+expressionList[expressionList.length] = "child::text()";
+expressionList[expressionList.length] = "child::processing-instruction()";
+expressionList[expressionList.length] = "child::processing-instruction('name')";
+expressionList[expressionList.length] = "child::node()";
+expressionList[expressionList.length] = "child::*";
+expressionList[expressionList.length] = "child::nist:*";
+expressionList[expressionList.length] = "child::employee";
+expressionList[expressionList.length] = "descendant::comment()";
+expressionList[expressionList.length] = "descendant::text()";
+expressionList[expressionList.length] = "descendant::processing-instruction()";
+expressionList[expressionList.length] = "descendant::processing-instruction('name')";
+expressionList[expressionList.length] = "descendant::node()";
+expressionList[expressionList.length] = "descendant::*";
+expressionList[expressionList.length] = "descendant::nist:*";
+expressionList[expressionList.length] = "descendant::employee";
+expressionList[expressionList.length] = "parent::comment()";
+expressionList[expressionList.length] = "parent::text()";
+expressionList[expressionList.length] = "parent::processing-instruction()";
+expressionList[expressionList.length] = "parent::processing-instruction('name')";
+expressionList[expressionList.length] = "parent::node()";
+expressionList[expressionList.length] = "parent::*";
+expressionList[expressionList.length] = "parent::nist:*";
+expressionList[expressionList.length] = "parent::employee";
+expressionList[expressionList.length] = "ancestor::comment()";
+expressionList[expressionList.length] = "ancestor::text()";
+expressionList[expressionList.length] = "ancestor::processing-instruction()";
+expressionList[expressionList.length] = "ancestor::processing-instruction('name')";
+expressionList[expressionList.length] = "ancestor::node()";
+expressionList[expressionList.length] = "ancestor::*";
+expressionList[expressionList.length] = "ancestor::nist:*";
+expressionList[expressionList.length] = "ancestor::employee";
+expressionList[expressionList.length] = "following-sibling::comment()";
+expressionList[expressionList.length] = "following-sibling::text()";
+expressionList[expressionList.length] = "following-sibling::processing-instruction()";
+expressionList[expressionList.length] = "following-sibling::processing-instruction('name')";
+expressionList[expressionList.length] = "following-sibling::node()";
+expressionList[expressionList.length] = "following-sibling::*";
+expressionList[expressionList.length] = "following-sibling::nist:*";
+expressionList[expressionList.length] = "following-sibling::employee";
+expressionList[expressionList.length] = "preceding-sibling::comment()";
+expressionList[expressionList.length] = "preceding-sibling::text()";
+expressionList[expressionList.length] = "preceding-sibling::processing-instruction()";
+expressionList[expressionList.length] = "preceding-sibling::processing-instruction('name')";
+expressionList[expressionList.length] = "preceding-sibling::node()";
+expressionList[expressionList.length] = "preceding-sibling::*";
+expressionList[expressionList.length] = "preceding-sibling::nist:*";
+expressionList[expressionList.length] = "preceding-sibling::employee";
+expressionList[expressionList.length] = "following::comment()";
+expressionList[expressionList.length] = "following::text()";
+expressionList[expressionList.length] = "following::processing-instruction()";
+expressionList[expressionList.length] = "following::processing-instruction('name')";
+expressionList[expressionList.length] = "following::node()";
+expressionList[expressionList.length] = "following::*";
+expressionList[expressionList.length] = "following::nist:*";
+expressionList[expressionList.length] = "following::employee";
+expressionList[expressionList.length] = "preceding::comment()";
+expressionList[expressionList.length] = "preceding::text()";
+expressionList[expressionList.length] = "preceding::processing-instruction()";
+expressionList[expressionList.length] = "preceding::processing-instruction('name')";
+expressionList[expressionList.length] = "preceding::node()";
+expressionList[expressionList.length] = "preceding::*";
+expressionList[expressionList.length] = "preceding::nist:*";
+expressionList[expressionList.length] = "preceding::employee";
+expressionList[expressionList.length] = "attribute::comment()";
+expressionList[expressionList.length] = "attribute::text()";
+expressionList[expressionList.length] = "attribute::processing-instruction()";
+expressionList[expressionList.length] = "attribute::processing-instruction('name')";
+expressionList[expressionList.length] = "attribute::node()";
+expressionList[expressionList.length] = "attribute::*";
+expressionList[expressionList.length] = "attribute::nist:*";
+expressionList[expressionList.length] = "attribute::employee";
+expressionList[expressionList.length] = "namespace::comment()";
+expressionList[expressionList.length] = "namespace::text()";
+expressionList[expressionList.length] = "namespace::processing-instruction()";
+expressionList[expressionList.length] = "namespace::processing-instruction('name')";
+expressionList[expressionList.length] = "namespace::node()";
+expressionList[expressionList.length] = "namespace::*";
+expressionList[expressionList.length] = "namespace::nist:*";
+expressionList[expressionList.length] = "namespace::employee";
+expressionList[expressionList.length] = "self::comment()";
+expressionList[expressionList.length] = "self::text()";
+expressionList[expressionList.length] = "self::processing-instruction()";
+expressionList[expressionList.length] = "self::processing-instruction('name')";
+expressionList[expressionList.length] = "self::node()";
+expressionList[expressionList.length] = "self::*";
+expressionList[expressionList.length] = "self::nist:*";
+expressionList[expressionList.length] = "self::employee";
+expressionList[expressionList.length] = "descendant-or-self::comment()";
+expressionList[expressionList.length] = "descendant-or-self::text()";
+expressionList[expressionList.length] = "descendant-or-self::processing-instruction()";
+expressionList[expressionList.length] = "descendant-or-self::processing-instruction('name')";
+expressionList[expressionList.length] = "descendant-or-self::node()";
+expressionList[expressionList.length] = "descendant-or-self::*";
+expressionList[expressionList.length] = "descendant-or-self::nist:*";
+expressionList[expressionList.length] = "descendant-or-self::employee";
+expressionList[expressionList.length] = "ancestor-or-self::comment()";
+expressionList[expressionList.length] = "ancestor-or-self::text()";
+expressionList[expressionList.length] = "ancestor-or-self::processing-instruction()";
+expressionList[expressionList.length] = "ancestor-or-self::processing-instruction('name')";
+expressionList[expressionList.length] = "ancestor-or-self::node()";
+expressionList[expressionList.length] = "ancestor-or-self::*";
+expressionList[expressionList.length] = "ancestor-or-self::nist:*";
+expressionList[expressionList.length] = "ancestor-or-self::employee";
+expressionList[expressionList.length] = "comment()";
+expressionList[expressionList.length] = "text()";
+expressionList[expressionList.length] = "processing-instruction()";
+expressionList[expressionList.length] = "processing-instruction('name')";
+expressionList[expressionList.length] = "node()";
+expressionList[expressionList.length] = "*";
+expressionList[expressionList.length] = "nist:*";
+expressionList[expressionList.length] = "employee";
+expressionList[expressionList.length] = ".//comment()";
+expressionList[expressionList.length] = ".//text()";
+expressionList[expressionList.length] = ".//processing-instruction()";
+expressionList[expressionList.length] = ".//processing-instruction('name')";
+expressionList[expressionList.length] = ".//node()";
+expressionList[expressionList.length] = ".//*";
+expressionList[expressionList.length] = ".//nist:*";
+expressionList[expressionList.length] = ".//employee";
+expressionList[expressionList.length] = "../comment()";
+expressionList[expressionList.length] = "../text()";
+expressionList[expressionList.length] = "../processing-instruction()";
+expressionList[expressionList.length] = "../processing-instruction('name')";
+expressionList[expressionList.length] = "../node()";
+expressionList[expressionList.length] = "../*";
+expressionList[expressionList.length] = "../nist:*";
+expressionList[expressionList.length] = "../employee";
+expressionList[expressionList.length] = "@attributename";
+expressionList[expressionList.length] = "./comment()";
+expressionList[expressionList.length] = "./text()";
+expressionList[expressionList.length] = "./processing-instruction()";
+expressionList[expressionList.length] = "./processing-instruction('name')";
+expressionList[expressionList.length] = "./node()";
+expressionList[expressionList.length] = "./*";
+expressionList[expressionList.length] = "./nist:*";
+expressionList[expressionList.length] = "./employee";
+expressionList[expressionList.length] = "comment() | text() | processing-instruction() | node()";
+expressionList[expressionList.length] = "employee[address]";
+expressionList[expressionList.length] = "employee/address[@street]";
+expressionList[expressionList.length] = "employee[position='Computer Specialist']";
+expressionList[expressionList.length] = "employee[position!='Computer Specialist']";
+expressionList[expressionList.length] = "employee[gender='Male' or gender='Female']";
+expressionList[expressionList.length] = "employee[gender!='Male' and gender!='Female']";
+expressionList[expressionList.length] = "employee/address[@street='Yes']";
+expressionList[expressionList.length] = "employee/address[@street!='Yes']";
+expressionList[expressionList.length] = "employee[position()=1]";
+expressionList[expressionList.length] = "employee[1]";
+expressionList[expressionList.length] = "employee[position()=last()]";
+expressionList[expressionList.length] = "employee[last()]";
+expressionList[expressionList.length] = "employee[position()>1 and position<last()]";
+expressionList[expressionList.length] = "employee[position()>=1 and position<=last()]";
+expressionList[expressionList.length] = "employee[count(.)>0]";
+expressionList[expressionList.length] = "employee[position() mod 2=0]";
+expressionList[expressionList.length] = "employee[position() mod -2=0]";
+expressionList[expressionList.length] = "employee[position() div 2=0]";
+expressionList[expressionList.length] = "employee[position() div -2=-1]";
+expressionList[expressionList.length] = "employee[position() div 2 * 2=position()]";
+expressionList[expressionList.length] = "employee[3 > 2 > 1]";
+expressionList[expressionList.length] = "id('CANADA')";
+expressionList[expressionList.length] = "*[local-name()='employee']";
+expressionList[expressionList.length] = "*[local-name(.)='employee']";
+expressionList[expressionList.length] = "*[local-name(employee)='employee']";
+expressionList[expressionList.length] = "*[local-name()='employee']";
+expressionList[expressionList.length] = "*[namespace-uri()='http://www.nist.gov']";
+expressionList[expressionList.length] = "*[name()='nist:employee']";
+expressionList[expressionList.length] = "*[string()]";
+expressionList[expressionList.length] = "*[string(10 div foo)='NaN']";
+expressionList[expressionList.length] = "*[concat('a', 'b', 'c')]";
+expressionList[expressionList.length] = "*[starts-with('employee', 'emp')]";
+expressionList[expressionList.length] = "*[contains('employee', 'emp')]";
+expressionList[expressionList.length] = "*[substring-before('employeeId', 'Id')]";
+expressionList[expressionList.length] = "*[substring-after('employeeId', 'employee')]";
+expressionList[expressionList.length] = "*[substring('employeeId', 4)]";
+expressionList[expressionList.length] = "*[substring('employeeId', 4, 5)]";
+expressionList[expressionList.length] = "*[string-length()=2]";
+expressionList[expressionList.length] = "*[string-length(.)=string-length(normalize-space(.))]";
+expressionList[expressionList.length] = "*[translate('bar', 'abc', 'ABC')='BAr']";
+expressionList[expressionList.length] = "*[boolean(.)]";
+expressionList[expressionList.length] = "*[not(boolean(.))]";
+expressionList[expressionList.length] = "*[true()]";
+expressionList[expressionList.length] = "*[false()]";
+expressionList[expressionList.length] = "*[lang('en')]";
+expressionList[expressionList.length] = "*[number()]";
+expressionList[expressionList.length] = "*[number('4')]";
+expressionList[expressionList.length] = "*[floor(.)]>0";
+expressionList[expressionList.length] = "*[ceiling(.)]<1";
+expressionList[expressionList.length] = "*[round(number(.))=0]<1";
+for(var indexN66388 = 0;indexN66388 < expressionList.length; indexN66388++) {
+      expression = expressionList[indexN66388];
+      xpathexpression = evaluator.createExpression(expression,resolver);
+      
+       }
+   
+}
+
+
+
+
+function runTest() {
+   Conformance_Expressions();
+}
diff --git a/LayoutTests/dom/svg/level3/xpath/Conformance_Expressions.svg b/LayoutTests/dom/svg/level3/xpath/Conformance_Expressions.svg
new file mode 100644 (file)
index 0000000..5593e74
--- /dev/null
@@ -0,0 +1,74 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>\r
+<!DOCTYPE svg PUBLIC "STAFF" "staffNS.dtd" \r
+[\r
+   <!ENTITY ent1 "es">\r
+   <!ENTITY ent2 "1900 Dallas Road">\r
+   <!ENTITY ent3 "Texas">\r
+   <!ENTITY ent4 "<entElement1 xmlns:local1='www.xyz.com'>Element data</entElement1><?PItarget PIdata?>">\r
+   <!ENTITY ent5 PUBLIC "entityURI" "entityFile" NDATA notation1>\r
+   <!ENTITY ent6 PUBLIC "uri" "file" NDATA notation2>\r
+   <!ENTITY ent1 "This entity should be discarded">\r
+   <!NOTATION notation1 PUBLIC "notation1File">\r
+   <!NOTATION notation2 SYSTEM "notation2File">\r
+   <!ELEMENT svg (rect, script, employee+, emp:employee, employee*)>\r
+   <!ATTLIST svg \r
+      xmlns CDATA #FIXED "http://www.w3.org/2000/svg"\r
+      name CDATA #IMPLIED>\r
+   <!ELEMENT rect EMPTY>\r
+   <!ATTLIST rect \r
+      x CDATA #REQUIRED\r
+      y CDATA #REQUIRED\r
+      width CDATA #REQUIRED\r
+      height CDATA #REQUIRED>\r
+  <!ELEMENT script (#PCDATA)>\r
+  <!ATTLIST script type CDATA #IMPLIED>      \r
+]>\r
+<!-- This is comment number 1.-->\r
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:nist="http://www.nist.gov"><rect x="0" y="0" width="100" height="100"/>\r
+<script xmlns="http://www.w3.org/1999/xhtml" src="Conformance_Expressions.js"/>\r
+<script xmlns="http://www.w3.org/1999/xhtml" src="svgunit.js"/>\r
+ <employee xmlns="http://www.nist.gov" xmlns:dmstc="http://www.usa.com">\r
+  <employeeId>EMP0001</employeeId>\r
+  <name>Margaret Martin</name>\r
+  <position>Accountant</position>           \r
+  <salary>56,000</salary>\r
+  <gender>Female</gender>\r
+  <address dmstc:domestic="Yes">1230 North Ave. Dallas, Texas 98551</address>\r
+ </employee>\r
+ <employee xmlns:dmstc="http://www.usa.com" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0002</employeeId>\r
+  <name>Martha Raynolds\r
+<![CDATA[This is a CDATASection with EntityReference number 2 &ent2;]]>\r
+<![CDATA[This is an adjacent CDATASection with a reference to a tab &tab;]]></name>\r
+  <position>Secretary</position>\r
+  <salary>35,000</salary>\r
+  <gender>Female</gender>\r
+  <address dmstc:domestic="Yes" street="Yes">&ent2; Dallas, &ent3;\r
+ 98554</address>\r
+ </employee>\r
+ <employee xmlns:dmstc="http://www.netzero.com" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0003</employeeId>\r
+  <name>Roger\r
+ Jones</name>\r
+  <position>Department Manager</position>\r
+  <salary>100,000</salary>\r
+  <gender>&ent4;</gender>\r
+  <address dmstc:domestic="Yes" street="No">PO Box 27 Irving, texas 98553</address>\r
+ </employee>\r
+ <emp:employee xmlns:emp="http://www.nist.gov" xmlns:nm="http://www.altavista.com" >    <emp:employeeId>EMP0004</emp:employeeId>\r
+  <nm:name>Jeny Oconnor</nm:name>\r
+  <emp:position>Personnel Director</emp:position>\r
+  <emp:salary>95,000</emp:salary>\r
+  <emp:gender>Female</emp:gender>\r
+  <emp:address emp:domestic="Yes" street="Y&ent1;" emp:zone="CANADA" emp:local1="TRUE">27 South Road. Dallas, texas 98556</emp:address>\r
+ </emp:employee>\r
+ <employee xmlns:emp2="http://www.nist.gov" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0005</employeeId>\r
+  <name>Robert Myers</name>\r
+  <position>Computer Specialist</position>\r
+  <salary>90,000</salary>\r
+  <gender>male</gender>\r
+  <address street="Yes" xmlns="http://www.nist.gov">1821 Nordic. Road, Irving Texas 98558</address>\r
+ </employee>\r
+ </svg>\r
\r
diff --git a/LayoutTests/dom/svg/level3/xpath/Conformance_ID-expected.txt b/LayoutTests/dom/svg/level3/xpath/Conformance_ID-expected.txt
new file mode 100644 (file)
index 0000000..d86cee1
--- /dev/null
@@ -0,0 +1,4 @@
+layer at (0,0) size 800x600
+  RenderCanvas at (0,0) size 800x600
+    KCanvasContainer {svg} at (0,0) size 100x100
+      KCanvasItem {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#000000]}] [data="M0.00,0.00L100.00,0.00L100.00,100.00L0.00,100.00"]
diff --git a/LayoutTests/dom/svg/level3/xpath/Conformance_ID.js b/LayoutTests/dom/svg/level3/xpath/Conformance_ID.js
new file mode 100644 (file)
index 0000000..97b9bf7
--- /dev/null
@@ -0,0 +1,132 @@
+
+/*
+Copyright Â© 2001-2004 World Wide Web Consortium, 
+(Massachusetts Institute of Technology, European Research Consortium 
+for Informatics and Mathematics, Keio University). All 
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the 
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even 
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['Conformance_ID'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+//   This function is called by the testing framework before
+//      running the test suite.
+//
+//   If there are no configuration exceptions, asynchronous
+//        document loading is started.  Otherwise, the status
+//        is set to complete and the exception is immediately
+//        raised when entering the body of the test.
+//
+function setUpPage() {
+   setUpPageStatus = 'running';
+   try {
+     //
+     //   creates test document builder, may throw exception
+     //
+     builder = createConfiguredBuilder();
+
+      docsLoaded = 0;
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      docsLoaded += preload(docRef, "doc", "internaldtd");
+        
+       if (docsLoaded == 1) {
+          setUpPage = 'complete';
+       }
+    } catch(ex) {
+       catchInitializationError(builder, ex);
+        setUpPage = 'complete';
+    }
+}
+
+
+
+//
+//   This method is called on the completion of 
+//      each asychronous load started in setUpTests.
+//
+//   When every synchronous loaded document has completed,
+//      the page status is changed which allows the
+//      body of the test to be executed.
+function loadComplete() {
+    if (++docsLoaded == 1) {
+        setUpPageStatus = 'complete';
+    }
+}
+
+
+/**
+* 
+      1.3 Conformance - Check that the element returned by XPath id() function
+      returns the same element as Document.getElementById
+    
+* @author Bob Clary
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#Conformance
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#XPathEvaluator
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#XPathEvaluator-createNSResolver
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#XPathNSResolver
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#XPathEvaluator-evaluate
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#XPathResult-iterateNext
+*/
+function Conformance_ID() {
+   var success;
+    if(checkInitialization(builder, "Conformance_ID") != null) return;
+    var ANY_TYPE = 0;
+      var NUMBER_TYPE = 1;
+      var STRING_TYPE = 2;
+      var BOOLEAN_TYPE = 3;
+      var UNORDERED_NODE_ITERATOR_TYPE = 4;
+      var ORDERED_NODE_ITERATOR_TYPE = 5;
+      var UNORDERED_NODE_SNAPSHOT_TYPE = 6;
+      var ORDERED_NODE_SNAPSHOT_TYPE = 7;
+      var ANY_UNORDERED_NODE_TYPE = 8;
+      var FIRST_ORDERED_NODE_TYPE = 9;
+      var doc;
+      var resolver;
+      var evaluator;
+      var contextNode;
+      var inresult = null;
+
+      var outresult = null;
+
+      var expression = "id('child1')";
+      var xpathType = ANY_TYPE;
+      var outNode;
+      var child1Element;
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      doc = load(docRef, "doc", "internaldtd");
+      evaluator = createXPathEvaluator(doc);
+resolver = evaluator.createNSResolver(doc);
+      contextNode =  doc;
+outresult = evaluator.evaluate(expression,contextNode,resolver,xpathType,inresult);
+      outNode = outresult.iterateNext();
+      child1Element = doc.getElementById("child1");
+      assertSame("S1.3-Conformance-ID",child1Element,outNode);
+
+}
+
+
+
+
+function runTest() {
+   Conformance_ID();
+}
diff --git a/LayoutTests/dom/svg/level3/xpath/Conformance_ID.svg b/LayoutTests/dom/svg/level3/xpath/Conformance_ID.svg
new file mode 100644 (file)
index 0000000..fa43d2f
--- /dev/null
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>\r
+<!DOCTYPE svg [\r
+  <!ELEMENT test (child)+ >\r
+  <!ATTLIST test xmlns CDATA #IMPLIED>\r
+  <!ELEMENT child EMPTY>\r
+  <!ATTLIST child id ID #IMPLIED>\r
+  <!ATTLIST child check CDATA #IMPLIED>\r
+   <!ELEMENT svg (rect, script, test)>\r
+   <!ATTLIST svg \r
+      xmlns CDATA #FIXED "http://www.w3.org/2000/svg"\r
+      name CDATA #IMPLIED>\r
+   <!ELEMENT rect EMPTY>\r
+   <!ATTLIST rect \r
+      x CDATA #REQUIRED\r
+      y CDATA #REQUIRED\r
+      width CDATA #REQUIRED\r
+      height CDATA #REQUIRED>\r
+  <!ELEMENT script (#PCDATA)>\r
+  <!ATTLIST script type CDATA #IMPLIED>      \r
+  <!ENTITY svgunit SYSTEM "svgunit.js">\r
+  <!ENTITY svgtest SYSTEM "Conformance_ID.js">  \r
+]>\r
+<svg xmlns="http://www.w3.org/2000/svg"><rect x="0" y="0" width="100" height="100"/><script type="text/ecmascript">&svgtest;&svgunit;</script>\r
+<test xmlns="http://www.example.org">\r
+  <child id="child1" check="child1"/>\r
+  <child id="child2" check="child2"/>\r
+</test>\r
+</svg>\r
+\r
diff --git a/LayoutTests/dom/svg/level3/xpath/Conformance_hasFeature_3-expected.txt b/LayoutTests/dom/svg/level3/xpath/Conformance_hasFeature_3-expected.txt
new file mode 100644 (file)
index 0000000..52be902
--- /dev/null
@@ -0,0 +1,7 @@
+layer at (0,0) size 800x600
+  RenderCanvas at (0,0) size 800x600
+    KCanvasContainer {svg} at (0,0) size 100x100
+      KCanvasItem {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00L100.00,0.00L100.00,100.00L0.00,100.00"]
+      RenderSVGText {text} at (0,0) size 785x18
+        RenderText {#text} at (0,0) size 236x18
+          text run at (0,0) width 236: "Conformance_hasFeature_3: Success"
diff --git a/LayoutTests/dom/svg/level3/xpath/Conformance_hasFeature_3.js b/LayoutTests/dom/svg/level3/xpath/Conformance_hasFeature_3.js
new file mode 100644 (file)
index 0000000..55db5bc
--- /dev/null
@@ -0,0 +1,105 @@
+
+/*
+Copyright Â© 2001-2004 World Wide Web Consortium, 
+(Massachusetts Institute of Technology, European Research Consortium 
+for Informatics and Mathematics, Keio University). All 
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the 
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even 
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['Conformance_hasFeature_3'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+//   This function is called by the testing framework before
+//      running the test suite.
+//
+//   If there are no configuration exceptions, asynchronous
+//        document loading is started.  Otherwise, the status
+//        is set to complete and the exception is immediately
+//        raised when entering the body of the test.
+//
+function setUpPage() {
+   setUpPageStatus = 'running';
+   try {
+     //
+     //   creates test document builder, may throw exception
+     //
+     builder = createConfiguredBuilder();
+
+      docsLoaded = 0;
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      docsLoaded += preload(docRef, "doc", "staffNS");
+        
+       if (docsLoaded == 1) {
+          setUpPage = 'complete';
+       }
+    } catch(ex) {
+       catchInitializationError(builder, ex);
+        setUpPage = 'complete';
+    }
+}
+
+
+
+//
+//   This method is called on the completion of 
+//      each asychronous load started in setUpTests.
+//
+//   When every synchronous loaded document has completed,
+//      the page status is changed which allows the
+//      body of the test to be executed.
+function loadComplete() {
+    if (++docsLoaded == 1) {
+        setUpPageStatus = 'complete';
+    }
+}
+
+
+/**
+* 
+      1.3 Conformance - Test if 
+      Document.implementation.hasFeature('XPath', "3.0") returns true
+    
+* @author Philippe Le Hégaret
+* @author Bob Clary
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#Conformance
+*/
+function Conformance_hasFeature_3() {
+   var success;
+    if(checkInitialization(builder, "Conformance_hasFeature_3") != null) return;
+    var doc;
+      var state;
+      var impl;
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      doc = load(docRef, "doc", "staffNS");
+      impl = doc.implementation;
+state = impl.hasFeature("xpATH","3.0");
+assertTrue("hasFeature-XPath-3.0",state);
+
+}
+
+
+
+
+function runTest() {
+   Conformance_hasFeature_3();
+}
diff --git a/LayoutTests/dom/svg/level3/xpath/Conformance_hasFeature_3.svg b/LayoutTests/dom/svg/level3/xpath/Conformance_hasFeature_3.svg
new file mode 100644 (file)
index 0000000..9617497
--- /dev/null
@@ -0,0 +1,74 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>\r
+<!DOCTYPE svg PUBLIC "STAFF" "staffNS.dtd" \r
+[\r
+   <!ENTITY ent1 "es">\r
+   <!ENTITY ent2 "1900 Dallas Road">\r
+   <!ENTITY ent3 "Texas">\r
+   <!ENTITY ent4 "<entElement1 xmlns:local1='www.xyz.com'>Element data</entElement1><?PItarget PIdata?>">\r
+   <!ENTITY ent5 PUBLIC "entityURI" "entityFile" NDATA notation1>\r
+   <!ENTITY ent6 PUBLIC "uri" "file" NDATA notation2>\r
+   <!ENTITY ent1 "This entity should be discarded">\r
+   <!NOTATION notation1 PUBLIC "notation1File">\r
+   <!NOTATION notation2 SYSTEM "notation2File">\r
+   <!ELEMENT svg (rect, script, employee+, emp:employee, employee*)>\r
+   <!ATTLIST svg \r
+      xmlns CDATA #FIXED "http://www.w3.org/2000/svg"\r
+      name CDATA #IMPLIED>\r
+   <!ELEMENT rect EMPTY>\r
+   <!ATTLIST rect \r
+      x CDATA #REQUIRED\r
+      y CDATA #REQUIRED\r
+      width CDATA #REQUIRED\r
+      height CDATA #REQUIRED>\r
+  <!ELEMENT script (#PCDATA)>\r
+  <!ATTLIST script type CDATA #IMPLIED>      \r
+]>\r
+<!-- This is comment number 1.-->\r
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:nist="http://www.nist.gov"><rect x="0" y="0" width="100" height="100"/>\r
+<script xmlns="http://www.w3.org/1999/xhtml" src="Conformance_hasFeature_3.js"/>\r
+<script xmlns="http://www.w3.org/1999/xhtml" src="svgunit.js"/>\r
+ <employee xmlns="http://www.nist.gov" xmlns:dmstc="http://www.usa.com">\r
+  <employeeId>EMP0001</employeeId>\r
+  <name>Margaret Martin</name>\r
+  <position>Accountant</position>           \r
+  <salary>56,000</salary>\r
+  <gender>Female</gender>\r
+  <address dmstc:domestic="Yes">1230 North Ave. Dallas, Texas 98551</address>\r
+ </employee>\r
+ <employee xmlns:dmstc="http://www.usa.com" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0002</employeeId>\r
+  <name>Martha Raynolds\r
+<![CDATA[This is a CDATASection with EntityReference number 2 &ent2;]]>\r
+<![CDATA[This is an adjacent CDATASection with a reference to a tab &tab;]]></name>\r
+  <position>Secretary</position>\r
+  <salary>35,000</salary>\r
+  <gender>Female</gender>\r
+  <address dmstc:domestic="Yes" street="Yes">&ent2; Dallas, &ent3;\r
+ 98554</address>\r
+ </employee>\r
+ <employee xmlns:dmstc="http://www.netzero.com" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0003</employeeId>\r
+  <name>Roger\r
+ Jones</name>\r
+  <position>Department Manager</position>\r
+  <salary>100,000</salary>\r
+  <gender>&ent4;</gender>\r
+  <address dmstc:domestic="Yes" street="No">PO Box 27 Irving, texas 98553</address>\r
+ </employee>\r
+ <emp:employee xmlns:emp="http://www.nist.gov" xmlns:nm="http://www.altavista.com" >    <emp:employeeId>EMP0004</emp:employeeId>\r
+  <nm:name>Jeny Oconnor</nm:name>\r
+  <emp:position>Personnel Director</emp:position>\r
+  <emp:salary>95,000</emp:salary>\r
+  <emp:gender>Female</emp:gender>\r
+  <emp:address emp:domestic="Yes" street="Y&ent1;" emp:zone="CANADA" emp:local1="TRUE">27 South Road. Dallas, texas 98556</emp:address>\r
+ </emp:employee>\r
+ <employee xmlns:emp2="http://www.nist.gov" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0005</employeeId>\r
+  <name>Robert Myers</name>\r
+  <position>Computer Specialist</position>\r
+  <salary>90,000</salary>\r
+  <gender>male</gender>\r
+  <address street="Yes" xmlns="http://www.nist.gov">1821 Nordic. Road, Irving Texas 98558</address>\r
+ </employee>\r
+ </svg>\r
\r
diff --git a/LayoutTests/dom/svg/level3/xpath/Conformance_hasFeature_empty-expected.txt b/LayoutTests/dom/svg/level3/xpath/Conformance_hasFeature_empty-expected.txt
new file mode 100644 (file)
index 0000000..a227578
--- /dev/null
@@ -0,0 +1,7 @@
+layer at (0,0) size 800x600
+  RenderCanvas at (0,0) size 800x600
+    KCanvasContainer {svg} at (0,0) size 100x100
+      KCanvasItem {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00L100.00,0.00L100.00,100.00L0.00,100.00"]
+      RenderSVGText {text} at (0,0) size 785x18
+        RenderText {#text} at (0,0) size 267x18
+          text run at (0,0) width 267: "Conformance_hasFeature_empty: Success"
diff --git a/LayoutTests/dom/svg/level3/xpath/Conformance_hasFeature_empty.js b/LayoutTests/dom/svg/level3/xpath/Conformance_hasFeature_empty.js
new file mode 100644 (file)
index 0000000..c1085cc
--- /dev/null
@@ -0,0 +1,105 @@
+
+/*
+Copyright Â© 2001-2004 World Wide Web Consortium, 
+(Massachusetts Institute of Technology, European Research Consortium 
+for Informatics and Mathematics, Keio University). All 
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the 
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even 
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['Conformance_hasFeature_empty'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+//   This function is called by the testing framework before
+//      running the test suite.
+//
+//   If there are no configuration exceptions, asynchronous
+//        document loading is started.  Otherwise, the status
+//        is set to complete and the exception is immediately
+//        raised when entering the body of the test.
+//
+function setUpPage() {
+   setUpPageStatus = 'running';
+   try {
+     //
+     //   creates test document builder, may throw exception
+     //
+     builder = createConfiguredBuilder();
+
+      docsLoaded = 0;
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      docsLoaded += preload(docRef, "doc", "staffNS");
+        
+       if (docsLoaded == 1) {
+          setUpPage = 'complete';
+       }
+    } catch(ex) {
+       catchInitializationError(builder, ex);
+        setUpPage = 'complete';
+    }
+}
+
+
+
+//
+//   This method is called on the completion of 
+//      each asychronous load started in setUpTests.
+//
+//   When every synchronous loaded document has completed,
+//      the page status is changed which allows the
+//      body of the test to be executed.
+function loadComplete() {
+    if (++docsLoaded == 1) {
+        setUpPageStatus = 'complete';
+    }
+}
+
+
+/**
+* 
+      1.3 Conformance - Test if 
+      Document.implementation.hasFeature('XPath', "") returns true
+    
+* @author Philippe Le Hégaret
+* @author Bob Clary
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#Interfaces
+*/
+function Conformance_hasFeature_empty() {
+   var success;
+    if(checkInitialization(builder, "Conformance_hasFeature_empty") != null) return;
+    var doc;
+      var state;
+      var impl;
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      doc = load(docRef, "doc", "staffNS");
+      impl = doc.implementation;
+state = impl.hasFeature("xpATH","");
+assertTrue("hasFeature-XPath-empty",state);
+
+}
+
+
+
+
+function runTest() {
+   Conformance_hasFeature_empty();
+}
diff --git a/LayoutTests/dom/svg/level3/xpath/Conformance_hasFeature_empty.svg b/LayoutTests/dom/svg/level3/xpath/Conformance_hasFeature_empty.svg
new file mode 100644 (file)
index 0000000..8162c84
--- /dev/null
@@ -0,0 +1,74 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>\r
+<!DOCTYPE svg PUBLIC "STAFF" "staffNS.dtd" \r
+[\r
+   <!ENTITY ent1 "es">\r
+   <!ENTITY ent2 "1900 Dallas Road">\r
+   <!ENTITY ent3 "Texas">\r
+   <!ENTITY ent4 "<entElement1 xmlns:local1='www.xyz.com'>Element data</entElement1><?PItarget PIdata?>">\r
+   <!ENTITY ent5 PUBLIC "entityURI" "entityFile" NDATA notation1>\r
+   <!ENTITY ent6 PUBLIC "uri" "file" NDATA notation2>\r
+   <!ENTITY ent1 "This entity should be discarded">\r
+   <!NOTATION notation1 PUBLIC "notation1File">\r
+   <!NOTATION notation2 SYSTEM "notation2File">\r
+   <!ELEMENT svg (rect, script, employee+, emp:employee, employee*)>\r
+   <!ATTLIST svg \r
+      xmlns CDATA #FIXED "http://www.w3.org/2000/svg"\r
+      name CDATA #IMPLIED>\r
+   <!ELEMENT rect EMPTY>\r
+   <!ATTLIST rect \r
+      x CDATA #REQUIRED\r
+      y CDATA #REQUIRED\r
+      width CDATA #REQUIRED\r
+      height CDATA #REQUIRED>\r
+  <!ELEMENT script (#PCDATA)>\r
+  <!ATTLIST script type CDATA #IMPLIED>      \r
+]>\r
+<!-- This is comment number 1.-->\r
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:nist="http://www.nist.gov"><rect x="0" y="0" width="100" height="100"/>\r
+<script xmlns="http://www.w3.org/1999/xhtml" src="Conformance_hasFeature_empty.js"/>\r
+<script xmlns="http://www.w3.org/1999/xhtml" src="svgunit.js"/>\r
+ <employee xmlns="http://www.nist.gov" xmlns:dmstc="http://www.usa.com">\r
+  <employeeId>EMP0001</employeeId>\r
+  <name>Margaret Martin</name>\r
+  <position>Accountant</position>           \r
+  <salary>56,000</salary>\r
+  <gender>Female</gender>\r
+  <address dmstc:domestic="Yes">1230 North Ave. Dallas, Texas 98551</address>\r
+ </employee>\r
+ <employee xmlns:dmstc="http://www.usa.com" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0002</employeeId>\r
+  <name>Martha Raynolds\r
+<![CDATA[This is a CDATASection with EntityReference number 2 &ent2;]]>\r
+<![CDATA[This is an adjacent CDATASection with a reference to a tab &tab;]]></name>\r
+  <position>Secretary</position>\r
+  <salary>35,000</salary>\r
+  <gender>Female</gender>\r
+  <address dmstc:domestic="Yes" street="Yes">&ent2; Dallas, &ent3;\r
+ 98554</address>\r
+ </employee>\r
+ <employee xmlns:dmstc="http://www.netzero.com" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0003</employeeId>\r
+  <name>Roger\r
+ Jones</name>\r
+  <position>Department Manager</position>\r
+  <salary>100,000</salary>\r
+  <gender>&ent4;</gender>\r
+  <address dmstc:domestic="Yes" street="No">PO Box 27 Irving, texas 98553</address>\r
+ </employee>\r
+ <emp:employee xmlns:emp="http://www.nist.gov" xmlns:nm="http://www.altavista.com" >    <emp:employeeId>EMP0004</emp:employeeId>\r
+  <nm:name>Jeny Oconnor</nm:name>\r
+  <emp:position>Personnel Director</emp:position>\r
+  <emp:salary>95,000</emp:salary>\r
+  <emp:gender>Female</emp:gender>\r
+  <emp:address emp:domestic="Yes" street="Y&ent1;" emp:zone="CANADA" emp:local1="TRUE">27 South Road. Dallas, texas 98556</emp:address>\r
+ </emp:employee>\r
+ <employee xmlns:emp2="http://www.nist.gov" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0005</employeeId>\r
+  <name>Robert Myers</name>\r
+  <position>Computer Specialist</position>\r
+  <salary>90,000</salary>\r
+  <gender>male</gender>\r
+  <address street="Yes" xmlns="http://www.nist.gov">1821 Nordic. Road, Irving Texas 98558</address>\r
+ </employee>\r
+ </svg>\r
\r
diff --git a/LayoutTests/dom/svg/level3/xpath/Conformance_hasFeature_null-expected.txt b/LayoutTests/dom/svg/level3/xpath/Conformance_hasFeature_null-expected.txt
new file mode 100644 (file)
index 0000000..19406bf
--- /dev/null
@@ -0,0 +1,7 @@
+layer at (0,0) size 800x600
+  RenderCanvas at (0,0) size 800x600
+    KCanvasContainer {svg} at (0,0) size 100x100
+      KCanvasItem {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00L100.00,0.00L100.00,100.00L0.00,100.00"]
+      RenderSVGText {text} at (0,0) size 785x18
+        RenderText {#text} at (0,0) size 252x18
+          text run at (0,0) width 252: "Conformance_hasFeature_null: Success"
diff --git a/LayoutTests/dom/svg/level3/xpath/Conformance_hasFeature_null.js b/LayoutTests/dom/svg/level3/xpath/Conformance_hasFeature_null.js
new file mode 100644 (file)
index 0000000..beb1263
--- /dev/null
@@ -0,0 +1,107 @@
+
+/*
+Copyright Â© 2001-2004 World Wide Web Consortium, 
+(Massachusetts Institute of Technology, European Research Consortium 
+for Informatics and Mathematics, Keio University). All 
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the 
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even 
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['Conformance_hasFeature_null'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+//   This function is called by the testing framework before
+//      running the test suite.
+//
+//   If there are no configuration exceptions, asynchronous
+//        document loading is started.  Otherwise, the status
+//        is set to complete and the exception is immediately
+//        raised when entering the body of the test.
+//
+function setUpPage() {
+   setUpPageStatus = 'running';
+   try {
+     //
+     //   creates test document builder, may throw exception
+     //
+     builder = createConfiguredBuilder();
+
+      docsLoaded = 0;
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      docsLoaded += preload(docRef, "doc", "staffNS");
+        
+       if (docsLoaded == 1) {
+          setUpPage = 'complete';
+       }
+    } catch(ex) {
+       catchInitializationError(builder, ex);
+        setUpPage = 'complete';
+    }
+}
+
+
+
+//
+//   This method is called on the completion of 
+//      each asychronous load started in setUpTests.
+//
+//   When every synchronous loaded document has completed,
+//      the page status is changed which allows the
+//      body of the test to be executed.
+function loadComplete() {
+    if (++docsLoaded == 1) {
+        setUpPageStatus = 'complete';
+    }
+}
+
+
+/**
+* 
+      1.3 Conformance - Test if 
+      Document.implementation.hasFeature('XPath', null) returns true
+    
+* @author Philippe Le Hégaret
+* @author Bob Clary
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#Conformance
+*/
+function Conformance_hasFeature_null() {
+   var success;
+    if(checkInitialization(builder, "Conformance_hasFeature_null") != null) return;
+    var doc;
+      var state;
+      var impl;
+      var nullValue = null;
+
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      doc = load(docRef, "doc", "staffNS");
+      impl = doc.implementation;
+state = impl.hasFeature("xpATH",nullValue);
+assertTrue("hasFeature-XPath-null",state);
+
+}
+
+
+
+
+function runTest() {
+   Conformance_hasFeature_null();
+}
diff --git a/LayoutTests/dom/svg/level3/xpath/Conformance_hasFeature_null.svg b/LayoutTests/dom/svg/level3/xpath/Conformance_hasFeature_null.svg
new file mode 100644 (file)
index 0000000..62e7221
--- /dev/null
@@ -0,0 +1,74 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>\r
+<!DOCTYPE svg PUBLIC "STAFF" "staffNS.dtd" \r
+[\r
+   <!ENTITY ent1 "es">\r
+   <!ENTITY ent2 "1900 Dallas Road">\r
+   <!ENTITY ent3 "Texas">\r
+   <!ENTITY ent4 "<entElement1 xmlns:local1='www.xyz.com'>Element data</entElement1><?PItarget PIdata?>">\r
+   <!ENTITY ent5 PUBLIC "entityURI" "entityFile" NDATA notation1>\r
+   <!ENTITY ent6 PUBLIC "uri" "file" NDATA notation2>\r
+   <!ENTITY ent1 "This entity should be discarded">\r
+   <!NOTATION notation1 PUBLIC "notation1File">\r
+   <!NOTATION notation2 SYSTEM "notation2File">\r
+   <!ELEMENT svg (rect, script, employee+, emp:employee, employee*)>\r
+   <!ATTLIST svg \r
+      xmlns CDATA #FIXED "http://www.w3.org/2000/svg"\r
+      name CDATA #IMPLIED>\r
+   <!ELEMENT rect EMPTY>\r
+   <!ATTLIST rect \r
+      x CDATA #REQUIRED\r
+      y CDATA #REQUIRED\r
+      width CDATA #REQUIRED\r
+      height CDATA #REQUIRED>\r
+  <!ELEMENT script (#PCDATA)>\r
+  <!ATTLIST script type CDATA #IMPLIED>      \r
+]>\r
+<!-- This is comment number 1.-->\r
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:nist="http://www.nist.gov"><rect x="0" y="0" width="100" height="100"/>\r
+<script xmlns="http://www.w3.org/1999/xhtml" src="Conformance_hasFeature_null.js"/>\r
+<script xmlns="http://www.w3.org/1999/xhtml" src="svgunit.js"/>\r
+ <employee xmlns="http://www.nist.gov" xmlns:dmstc="http://www.usa.com">\r
+  <employeeId>EMP0001</employeeId>\r
+  <name>Margaret Martin</name>\r
+  <position>Accountant</position>           \r
+  <salary>56,000</salary>\r
+  <gender>Female</gender>\r
+  <address dmstc:domestic="Yes">1230 North Ave. Dallas, Texas 98551</address>\r
+ </employee>\r
+ <employee xmlns:dmstc="http://www.usa.com" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0002</employeeId>\r
+  <name>Martha Raynolds\r
+<![CDATA[This is a CDATASection with EntityReference number 2 &ent2;]]>\r
+<![CDATA[This is an adjacent CDATASection with a reference to a tab &tab;]]></name>\r
+  <position>Secretary</position>\r
+  <salary>35,000</salary>\r
+  <gender>Female</gender>\r
+  <address dmstc:domestic="Yes" street="Yes">&ent2; Dallas, &ent3;\r
+ 98554</address>\r
+ </employee>\r
+ <employee xmlns:dmstc="http://www.netzero.com" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0003</employeeId>\r
+  <name>Roger\r
+ Jones</name>\r
+  <position>Department Manager</position>\r
+  <salary>100,000</salary>\r
+  <gender>&ent4;</gender>\r
+  <address dmstc:domestic="Yes" street="No">PO Box 27 Irving, texas 98553</address>\r
+ </employee>\r
+ <emp:employee xmlns:emp="http://www.nist.gov" xmlns:nm="http://www.altavista.com" >    <emp:employeeId>EMP0004</emp:employeeId>\r
+  <nm:name>Jeny Oconnor</nm:name>\r
+  <emp:position>Personnel Director</emp:position>\r
+  <emp:salary>95,000</emp:salary>\r
+  <emp:gender>Female</emp:gender>\r
+  <emp:address emp:domestic="Yes" street="Y&ent1;" emp:zone="CANADA" emp:local1="TRUE">27 South Road. Dallas, texas 98556</emp:address>\r
+ </emp:employee>\r
+ <employee xmlns:emp2="http://www.nist.gov" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0005</employeeId>\r
+  <name>Robert Myers</name>\r
+  <position>Computer Specialist</position>\r
+  <salary>90,000</salary>\r
+  <gender>male</gender>\r
+  <address street="Yes" xmlns="http://www.nist.gov">1821 Nordic. Road, Irving Texas 98558</address>\r
+ </employee>\r
+ </svg>\r
\r
diff --git a/LayoutTests/dom/svg/level3/xpath/Conformance_isSupported_3-expected.txt b/LayoutTests/dom/svg/level3/xpath/Conformance_isSupported_3-expected.txt
new file mode 100644 (file)
index 0000000..9f92c57
--- /dev/null
@@ -0,0 +1,7 @@
+layer at (0,0) size 800x600
+  RenderCanvas at (0,0) size 800x600
+    KCanvasContainer {svg} at (0,0) size 100x100
+      KCanvasItem {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00L100.00,0.00L100.00,100.00L0.00,100.00"]
+      RenderSVGText {text} at (0,0) size 785x18
+        RenderText {#text} at (0,0) size 243x18
+          text run at (0,0) width 243: "Conformance_isSupported_3: Success"
diff --git a/LayoutTests/dom/svg/level3/xpath/Conformance_isSupported_3.js b/LayoutTests/dom/svg/level3/xpath/Conformance_isSupported_3.js
new file mode 100644 (file)
index 0000000..fb8cf27
--- /dev/null
@@ -0,0 +1,110 @@
+
+/*
+Copyright Â© 2001-2004 World Wide Web Consortium, 
+(Massachusetts Institute of Technology, European Research Consortium 
+for Informatics and Mathematics, Keio University). All 
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the 
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even 
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['Conformance_isSupported_3'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+//   This function is called by the testing framework before
+//      running the test suite.
+//
+//   If there are no configuration exceptions, asynchronous
+//        document loading is started.  Otherwise, the status
+//        is set to complete and the exception is immediately
+//        raised when entering the body of the test.
+//
+function setUpPage() {
+   setUpPageStatus = 'running';
+   try {
+     //
+     //   creates test document builder, may throw exception
+     //
+     builder = createConfiguredBuilder();
+
+      docsLoaded = 0;
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      docsLoaded += preload(docRef, "doc", "staffNS");
+        
+       if (docsLoaded == 1) {
+          setUpPage = 'complete';
+       }
+    } catch(ex) {
+       catchInitializationError(builder, ex);
+        setUpPage = 'complete';
+    }
+}
+
+
+
+//
+//   This method is called on the completion of 
+//      each asychronous load started in setUpTests.
+//
+//   When every synchronous loaded document has completed,
+//      the page status is changed which allows the
+//      body of the test to be executed.
+function loadComplete() {
+    if (++docsLoaded == 1) {
+        setUpPageStatus = 'complete';
+    }
+}
+
+
+/**
+* 
+      1.3 Conformance - The "feature" parameter in the 
+      "Node.isSupported(feature,version)"
+      method is the name of the feature and the version is the version
+      number of the feature to test.  XPath is the legal value for the
+      XPath module.  The method should return "true".
+      
+      Retrieve the DOM document on which the
+      "isSupported(feature,version)" method is invoked with "feature"
+      equal to "XPath" and version to "3.0".  The method should return a
+      boolean "true".
+    
+* @author Philippe Le Hégaret
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#Conformance
+*/
+function Conformance_isSupported_3() {
+   var success;
+    if(checkInitialization(builder, "Conformance_isSupported_3") != null) return;
+    var doc;
+      var state;
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      doc = load(docRef, "doc", "staffNS");
+      state = doc.isSupported("xpATH","3.0");
+      assertTrue("isSupported-XPath-3.0",state);
+
+}
+
+
+
+
+function runTest() {
+   Conformance_isSupported_3();
+}
diff --git a/LayoutTests/dom/svg/level3/xpath/Conformance_isSupported_3.svg b/LayoutTests/dom/svg/level3/xpath/Conformance_isSupported_3.svg
new file mode 100644 (file)
index 0000000..d521207
--- /dev/null
@@ -0,0 +1,74 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>\r
+<!DOCTYPE svg PUBLIC "STAFF" "staffNS.dtd" \r
+[\r
+   <!ENTITY ent1 "es">\r
+   <!ENTITY ent2 "1900 Dallas Road">\r
+   <!ENTITY ent3 "Texas">\r
+   <!ENTITY ent4 "<entElement1 xmlns:local1='www.xyz.com'>Element data</entElement1><?PItarget PIdata?>">\r
+   <!ENTITY ent5 PUBLIC "entityURI" "entityFile" NDATA notation1>\r
+   <!ENTITY ent6 PUBLIC "uri" "file" NDATA notation2>\r
+   <!ENTITY ent1 "This entity should be discarded">\r
+   <!NOTATION notation1 PUBLIC "notation1File">\r
+   <!NOTATION notation2 SYSTEM "notation2File">\r
+   <!ELEMENT svg (rect, script, employee+, emp:employee, employee*)>\r
+   <!ATTLIST svg \r
+      xmlns CDATA #FIXED "http://www.w3.org/2000/svg"\r
+      name CDATA #IMPLIED>\r
+   <!ELEMENT rect EMPTY>\r
+   <!ATTLIST rect \r
+      x CDATA #REQUIRED\r
+      y CDATA #REQUIRED\r
+      width CDATA #REQUIRED\r
+      height CDATA #REQUIRED>\r
+  <!ELEMENT script (#PCDATA)>\r
+  <!ATTLIST script type CDATA #IMPLIED>      \r
+]>\r
+<!-- This is comment number 1.-->\r
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:nist="http://www.nist.gov"><rect x="0" y="0" width="100" height="100"/>\r
+<script xmlns="http://www.w3.org/1999/xhtml" src="Conformance_isSupported_3.js"/>\r
+<script xmlns="http://www.w3.org/1999/xhtml" src="svgunit.js"/>\r
+ <employee xmlns="http://www.nist.gov" xmlns:dmstc="http://www.usa.com">\r
+  <employeeId>EMP0001</employeeId>\r
+  <name>Margaret Martin</name>\r
+  <position>Accountant</position>           \r
+  <salary>56,000</salary>\r
+  <gender>Female</gender>\r
+  <address dmstc:domestic="Yes">1230 North Ave. Dallas, Texas 98551</address>\r
+ </employee>\r
+ <employee xmlns:dmstc="http://www.usa.com" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0002</employeeId>\r
+  <name>Martha Raynolds\r
+<![CDATA[This is a CDATASection with EntityReference number 2 &ent2;]]>\r
+<![CDATA[This is an adjacent CDATASection with a reference to a tab &tab;]]></name>\r
+  <position>Secretary</position>\r
+  <salary>35,000</salary>\r
+  <gender>Female</gender>\r
+  <address dmstc:domestic="Yes" street="Yes">&ent2; Dallas, &ent3;\r
+ 98554</address>\r
+ </employee>\r
+ <employee xmlns:dmstc="http://www.netzero.com" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0003</employeeId>\r
+  <name>Roger\r
+ Jones</name>\r
+  <position>Department Manager</position>\r
+  <salary>100,000</salary>\r
+  <gender>&ent4;</gender>\r
+  <address dmstc:domestic="Yes" street="No">PO Box 27 Irving, texas 98553</address>\r
+ </employee>\r
+ <emp:employee xmlns:emp="http://www.nist.gov" xmlns:nm="http://www.altavista.com" >    <emp:employeeId>EMP0004</emp:employeeId>\r
+  <nm:name>Jeny Oconnor</nm:name>\r
+  <emp:position>Personnel Director</emp:position>\r
+  <emp:salary>95,000</emp:salary>\r
+  <emp:gender>Female</emp:gender>\r
+  <emp:address emp:domestic="Yes" street="Y&ent1;" emp:zone="CANADA" emp:local1="TRUE">27 South Road. Dallas, texas 98556</emp:address>\r
+ </emp:employee>\r
+ <employee xmlns:emp2="http://www.nist.gov" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0005</employeeId>\r
+  <name>Robert Myers</name>\r
+  <position>Computer Specialist</position>\r
+  <salary>90,000</salary>\r
+  <gender>male</gender>\r
+  <address street="Yes" xmlns="http://www.nist.gov">1821 Nordic. Road, Irving Texas 98558</address>\r
+ </employee>\r
+ </svg>\r
\r
diff --git a/LayoutTests/dom/svg/level3/xpath/Conformance_isSupported_empty-expected.txt b/LayoutTests/dom/svg/level3/xpath/Conformance_isSupported_empty-expected.txt
new file mode 100644 (file)
index 0000000..adf36b2
--- /dev/null
@@ -0,0 +1,7 @@
+layer at (0,0) size 800x600
+  RenderCanvas at (0,0) size 800x600
+    KCanvasContainer {svg} at (0,0) size 100x100
+      KCanvasItem {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00L100.00,0.00L100.00,100.00L0.00,100.00"]
+      RenderSVGText {text} at (0,0) size 785x18
+        RenderText {#text} at (0,0) size 274x18
+          text run at (0,0) width 274: "Conformance_isSupported_empty: Success"
diff --git a/LayoutTests/dom/svg/level3/xpath/Conformance_isSupported_empty.js b/LayoutTests/dom/svg/level3/xpath/Conformance_isSupported_empty.js
new file mode 100644 (file)
index 0000000..639323b
--- /dev/null
@@ -0,0 +1,112 @@
+
+/*
+Copyright Â© 2001-2004 World Wide Web Consortium, 
+(Massachusetts Institute of Technology, European Research Consortium 
+for Informatics and Mathematics, Keio University). All 
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the 
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even 
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['Conformance_isSupported_empty'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+//   This function is called by the testing framework before
+//      running the test suite.
+//
+//   If there are no configuration exceptions, asynchronous
+//        document loading is started.  Otherwise, the status
+//        is set to complete and the exception is immediately
+//        raised when entering the body of the test.
+//
+function setUpPage() {
+   setUpPageStatus = 'running';
+   try {
+     //
+     //   creates test document builder, may throw exception
+     //
+     builder = createConfiguredBuilder();
+
+      docsLoaded = 0;
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      docsLoaded += preload(docRef, "doc", "staffNS");
+        
+       if (docsLoaded == 1) {
+          setUpPage = 'complete';
+       }
+    } catch(ex) {
+       catchInitializationError(builder, ex);
+        setUpPage = 'complete';
+    }
+}
+
+
+
+//
+//   This method is called on the completion of 
+//      each asychronous load started in setUpTests.
+//
+//   When every synchronous loaded document has completed,
+//      the page status is changed which allows the
+//      body of the test to be executed.
+function loadComplete() {
+    if (++docsLoaded == 1) {
+        setUpPageStatus = 'complete';
+    }
+}
+
+
+/**
+* 
+      1.3 Conformance - The "feature" parameter in the 
+      "Node.isSupported(feature,version)"
+      method is the name of the feature and the version is the version
+      number of the feature to test.  XPath is the legal value for the
+      XPath module.  The method should return "true".
+      
+      Retrieve the DOM document on which the
+      "isSupported(feature,version)" method is invoked with "feature"
+      equal to "XPath" and version to the empty string "".  The method 
+      should return a boolean "true" if the implementation claims support 
+      for some version for XPath.
+    
+* @author Philippe Le Hégaret
+* @author Bob Clary
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#Conformance
+*/
+function Conformance_isSupported_empty() {
+   var success;
+    if(checkInitialization(builder, "Conformance_isSupported_empty") != null) return;
+    var doc;
+      var state;
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      doc = load(docRef, "doc", "staffNS");
+      state = doc.isSupported("xpATH","");
+      assertTrue("isSupported-XPath-empty",state);
+
+}
+
+
+
+
+function runTest() {
+   Conformance_isSupported_empty();
+}
diff --git a/LayoutTests/dom/svg/level3/xpath/Conformance_isSupported_empty.svg b/LayoutTests/dom/svg/level3/xpath/Conformance_isSupported_empty.svg
new file mode 100644 (file)
index 0000000..d622bc7
--- /dev/null
@@ -0,0 +1,74 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>\r
+<!DOCTYPE svg PUBLIC "STAFF" "staffNS.dtd" \r
+[\r
+   <!ENTITY ent1 "es">\r
+   <!ENTITY ent2 "1900 Dallas Road">\r
+   <!ENTITY ent3 "Texas">\r
+   <!ENTITY ent4 "<entElement1 xmlns:local1='www.xyz.com'>Element data</entElement1><?PItarget PIdata?>">\r
+   <!ENTITY ent5 PUBLIC "entityURI" "entityFile" NDATA notation1>\r
+   <!ENTITY ent6 PUBLIC "uri" "file" NDATA notation2>\r
+   <!ENTITY ent1 "This entity should be discarded">\r
+   <!NOTATION notation1 PUBLIC "notation1File">\r
+   <!NOTATION notation2 SYSTEM "notation2File">\r
+   <!ELEMENT svg (rect, script, employee+, emp:employee, employee*)>\r
+   <!ATTLIST svg \r
+      xmlns CDATA #FIXED "http://www.w3.org/2000/svg"\r
+      name CDATA #IMPLIED>\r
+   <!ELEMENT rect EMPTY>\r
+   <!ATTLIST rect \r
+      x CDATA #REQUIRED\r
+      y CDATA #REQUIRED\r
+      width CDATA #REQUIRED\r
+      height CDATA #REQUIRED>\r
+  <!ELEMENT script (#PCDATA)>\r
+  <!ATTLIST script type CDATA #IMPLIED>      \r
+]>\r
+<!-- This is comment number 1.-->\r
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:nist="http://www.nist.gov"><rect x="0" y="0" width="100" height="100"/>\r
+<script xmlns="http://www.w3.org/1999/xhtml" src="Conformance_isSupported_empty.js"/>\r
+<script xmlns="http://www.w3.org/1999/xhtml" src="svgunit.js"/>\r
+ <employee xmlns="http://www.nist.gov" xmlns:dmstc="http://www.usa.com">\r
+  <employeeId>EMP0001</employeeId>\r
+  <name>Margaret Martin</name>\r
+  <position>Accountant</position>           \r
+  <salary>56,000</salary>\r
+  <gender>Female</gender>\r
+  <address dmstc:domestic="Yes">1230 North Ave. Dallas, Texas 98551</address>\r
+ </employee>\r
+ <employee xmlns:dmstc="http://www.usa.com" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0002</employeeId>\r
+  <name>Martha Raynolds\r
+<![CDATA[This is a CDATASection with EntityReference number 2 &ent2;]]>\r
+<![CDATA[This is an adjacent CDATASection with a reference to a tab &tab;]]></name>\r
+  <position>Secretary</position>\r
+  <salary>35,000</salary>\r
+  <gender>Female</gender>\r
+  <address dmstc:domestic="Yes" street="Yes">&ent2; Dallas, &ent3;\r
+ 98554</address>\r
+ </employee>\r
+ <employee xmlns:dmstc="http://www.netzero.com" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0003</employeeId>\r
+  <name>Roger\r
+ Jones</name>\r
+  <position>Department Manager</position>\r
+  <salary>100,000</salary>\r
+  <gender>&ent4;</gender>\r
+  <address dmstc:domestic="Yes" street="No">PO Box 27 Irving, texas 98553</address>\r
+ </employee>\r
+ <emp:employee xmlns:emp="http://www.nist.gov" xmlns:nm="http://www.altavista.com" >    <emp:employeeId>EMP0004</emp:employeeId>\r
+  <nm:name>Jeny Oconnor</nm:name>\r
+  <emp:position>Personnel Director</emp:position>\r
+  <emp:salary>95,000</emp:salary>\r
+  <emp:gender>Female</emp:gender>\r
+  <emp:address emp:domestic="Yes" street="Y&ent1;" emp:zone="CANADA" emp:local1="TRUE">27 South Road. Dallas, texas 98556</emp:address>\r
+ </emp:employee>\r
+ <employee xmlns:emp2="http://www.nist.gov" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0005</employeeId>\r
+  <name>Robert Myers</name>\r
+  <position>Computer Specialist</position>\r
+  <salary>90,000</salary>\r
+  <gender>male</gender>\r
+  <address street="Yes" xmlns="http://www.nist.gov">1821 Nordic. Road, Irving Texas 98558</address>\r
+ </employee>\r
+ </svg>\r
\r
diff --git a/LayoutTests/dom/svg/level3/xpath/Conformance_isSupported_null-expected.txt b/LayoutTests/dom/svg/level3/xpath/Conformance_isSupported_null-expected.txt
new file mode 100644 (file)
index 0000000..67b5005
--- /dev/null
@@ -0,0 +1,7 @@
+layer at (0,0) size 800x600
+  RenderCanvas at (0,0) size 800x600
+    KCanvasContainer {svg} at (0,0) size 100x100
+      KCanvasItem {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00L100.00,0.00L100.00,100.00L0.00,100.00"]
+      RenderSVGText {text} at (0,0) size 785x18
+        RenderText {#text} at (0,0) size 259x18
+          text run at (0,0) width 259: "Conformance_isSupported_null: Success"
diff --git a/LayoutTests/dom/svg/level3/xpath/Conformance_isSupported_null.js b/LayoutTests/dom/svg/level3/xpath/Conformance_isSupported_null.js
new file mode 100644 (file)
index 0000000..dc497a9
--- /dev/null
@@ -0,0 +1,105 @@
+
+/*
+Copyright Â© 2001-2004 World Wide Web Consortium, 
+(Massachusetts Institute of Technology, European Research Consortium 
+for Informatics and Mathematics, Keio University). All 
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the 
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even 
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['Conformance_isSupported_null'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+//   This function is called by the testing framework before
+//      running the test suite.
+//
+//   If there are no configuration exceptions, asynchronous
+//        document loading is started.  Otherwise, the status
+//        is set to complete and the exception is immediately
+//        raised when entering the body of the test.
+//
+function setUpPage() {
+   setUpPageStatus = 'running';
+   try {
+     //
+     //   creates test document builder, may throw exception
+     //
+     builder = createConfiguredBuilder();
+
+      docsLoaded = 0;
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      docsLoaded += preload(docRef, "doc", "staffNS");
+        
+       if (docsLoaded == 1) {
+          setUpPage = 'complete';
+       }
+    } catch(ex) {
+       catchInitializationError(builder, ex);
+        setUpPage = 'complete';
+    }
+}
+
+
+
+//
+//   This method is called on the completion of 
+//      each asychronous load started in setUpTests.
+//
+//   When every synchronous loaded document has completed,
+//      the page status is changed which allows the
+//      body of the test to be executed.
+function loadComplete() {
+    if (++docsLoaded == 1) {
+        setUpPageStatus = 'complete';
+    }
+}
+
+
+/**
+* 
+      1.3 Conformance - Test if 
+      Document.isSupported('XPath', null) returns true
+    
+* @author Philippe Le Hégaret
+* @author Bob Clary
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#Conformance
+*/
+function Conformance_isSupported_null() {
+   var success;
+    if(checkInitialization(builder, "Conformance_isSupported_null") != null) return;
+    var doc;
+      var state;
+      var nullValue = null;
+
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      doc = load(docRef, "doc", "staffNS");
+      state = doc.isSupported("xpATH",nullValue);
+      assertTrue("isSupported-XPath-null",state);
+
+}
+
+
+
+
+function runTest() {
+   Conformance_isSupported_null();
+}
diff --git a/LayoutTests/dom/svg/level3/xpath/Conformance_isSupported_null.svg b/LayoutTests/dom/svg/level3/xpath/Conformance_isSupported_null.svg
new file mode 100644 (file)
index 0000000..0966983
--- /dev/null
@@ -0,0 +1,74 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>\r
+<!DOCTYPE svg PUBLIC "STAFF" "staffNS.dtd" \r
+[\r
+   <!ENTITY ent1 "es">\r
+   <!ENTITY ent2 "1900 Dallas Road">\r
+   <!ENTITY ent3 "Texas">\r
+   <!ENTITY ent4 "<entElement1 xmlns:local1='www.xyz.com'>Element data</entElement1><?PItarget PIdata?>">\r
+   <!ENTITY ent5 PUBLIC "entityURI" "entityFile" NDATA notation1>\r
+   <!ENTITY ent6 PUBLIC "uri" "file" NDATA notation2>\r
+   <!ENTITY ent1 "This entity should be discarded">\r
+   <!NOTATION notation1 PUBLIC "notation1File">\r
+   <!NOTATION notation2 SYSTEM "notation2File">\r
+   <!ELEMENT svg (rect, script, employee+, emp:employee, employee*)>\r
+   <!ATTLIST svg \r
+      xmlns CDATA #FIXED "http://www.w3.org/2000/svg"\r
+      name CDATA #IMPLIED>\r
+   <!ELEMENT rect EMPTY>\r
+   <!ATTLIST rect \r
+      x CDATA #REQUIRED\r
+      y CDATA #REQUIRED\r
+      width CDATA #REQUIRED\r
+      height CDATA #REQUIRED>\r
+  <!ELEMENT script (#PCDATA)>\r
+  <!ATTLIST script type CDATA #IMPLIED>      \r
+]>\r
+<!-- This is comment number 1.-->\r
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:nist="http://www.nist.gov"><rect x="0" y="0" width="100" height="100"/>\r
+<script xmlns="http://www.w3.org/1999/xhtml" src="Conformance_isSupported_null.js"/>\r
+<script xmlns="http://www.w3.org/1999/xhtml" src="svgunit.js"/>\r
+ <employee xmlns="http://www.nist.gov" xmlns:dmstc="http://www.usa.com">\r
+  <employeeId>EMP0001</employeeId>\r
+  <name>Margaret Martin</name>\r
+  <position>Accountant</position>           \r
+  <salary>56,000</salary>\r
+  <gender>Female</gender>\r
+  <address dmstc:domestic="Yes">1230 North Ave. Dallas, Texas 98551</address>\r
+ </employee>\r
+ <employee xmlns:dmstc="http://www.usa.com" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0002</employeeId>\r
+  <name>Martha Raynolds\r
+<![CDATA[This is a CDATASection with EntityReference number 2 &ent2;]]>\r
+<![CDATA[This is an adjacent CDATASection with a reference to a tab &tab;]]></name>\r
+  <position>Secretary</position>\r
+  <salary>35,000</salary>\r
+  <gender>Female</gender>\r
+  <address dmstc:domestic="Yes" street="Yes">&ent2; Dallas, &ent3;\r
+ 98554</address>\r
+ </employee>\r
+ <employee xmlns:dmstc="http://www.netzero.com" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0003</employeeId>\r
+  <name>Roger\r
+ Jones</name>\r
+  <position>Department Manager</position>\r
+  <salary>100,000</salary>\r
+  <gender>&ent4;</gender>\r
+  <address dmstc:domestic="Yes" street="No">PO Box 27 Irving, texas 98553</address>\r
+ </employee>\r
+ <emp:employee xmlns:emp="http://www.nist.gov" xmlns:nm="http://www.altavista.com" >    <emp:employeeId>EMP0004</emp:employeeId>\r
+  <nm:name>Jeny Oconnor</nm:name>\r
+  <emp:position>Personnel Director</emp:position>\r
+  <emp:salary>95,000</emp:salary>\r
+  <emp:gender>Female</emp:gender>\r
+  <emp:address emp:domestic="Yes" street="Y&ent1;" emp:zone="CANADA" emp:local1="TRUE">27 South Road. Dallas, texas 98556</emp:address>\r
+ </emp:employee>\r
+ <employee xmlns:emp2="http://www.nist.gov" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0005</employeeId>\r
+  <name>Robert Myers</name>\r
+  <position>Computer Specialist</position>\r
+  <salary>90,000</salary>\r
+  <gender>male</gender>\r
+  <address street="Yes" xmlns="http://www.nist.gov">1821 Nordic. Road, Irving Texas 98558</address>\r
+ </employee>\r
+ </svg>\r
\r
diff --git a/LayoutTests/dom/svg/level3/xpath/Element_Nodes-expected.txt b/LayoutTests/dom/svg/level3/xpath/Element_Nodes-expected.txt
new file mode 100644 (file)
index 0000000..d0df982
--- /dev/null
@@ -0,0 +1,7 @@
+layer at (0,0) size 800x600
+  RenderCanvas at (0,0) size 800x600
+    KCanvasContainer {svg} at (0,0) size 100x100
+      KCanvasItem {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00L100.00,0.00L100.00,100.00L0.00,100.00"]
+      RenderSVGText {text} at (0,0) size 785x18
+        RenderText {#text} at (0,0) size 159x18
+          text run at (0,0) width 159: "Element_Nodes: Success"
diff --git a/LayoutTests/dom/svg/level3/xpath/Element_Nodes.js b/LayoutTests/dom/svg/level3/xpath/Element_Nodes.js
new file mode 100644 (file)
index 0000000..6d1ff27
--- /dev/null
@@ -0,0 +1,144 @@
+
+/*
+Copyright Â© 2001-2004 World Wide Web Consortium, 
+(Massachusetts Institute of Technology, European Research Consortium 
+for Informatics and Mathematics, Keio University). All 
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the 
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even 
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['Element_Nodes'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+//   This function is called by the testing framework before
+//      running the test suite.
+//
+//   If there are no configuration exceptions, asynchronous
+//        document loading is started.  Otherwise, the status
+//        is set to complete and the exception is immediately
+//        raised when entering the body of the test.
+//
+function setUpPage() {
+   setUpPageStatus = 'running';
+   try {
+     //
+     //   creates test document builder, may throw exception
+     //
+     builder = createConfiguredBuilder();
+
+      docsLoaded = 0;
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      docsLoaded += preload(docRef, "doc", "staff");
+        
+       if (docsLoaded == 1) {
+          setUpPage = 'complete';
+       }
+    } catch(ex) {
+       catchInitializationError(builder, ex);
+        setUpPage = 'complete';
+    }
+}
+
+
+
+//
+//   This method is called on the completion of 
+//      each asychronous load started in setUpTests.
+//
+//   When every synchronous loaded document has completed,
+//      the page status is changed which allows the
+//      body of the test to be executed.
+function loadComplete() {
+    if (++docsLoaded == 1) {
+        setUpPageStatus = 'complete';
+    }
+}
+
+
+/**
+* 
+      1.2.1- Element Nodes - Evaluate /staff/employee,
+      check that each matching Node in the result 
+      is an Element.
+    
+* @author Bob Clary
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#Mapping
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#XPathEvaluator
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#XPathEvaluator-createNSResolver
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#XPathEvaluator-evaluate
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#XPathResult
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#XPathNSResolver
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#XPathResult-iterateNext
+*/
+function Element_Nodes() {
+   var success;
+    if(checkInitialization(builder, "Element_Nodes") != null) return;
+    var ANY_TYPE = 0;
+      var NUMBER_TYPE = 1;
+      var STRING_TYPE = 2;
+      var BOOLEAN_TYPE = 3;
+      var UNORDERED_NODE_ITERATOR_TYPE = 4;
+      var ORDERED_NODE_ITERATOR_TYPE = 5;
+      var UNORDERED_NODE_SNAPSHOT_TYPE = 6;
+      var ORDERED_NODE_SNAPSHOT_TYPE = 7;
+      var ANY_UNORDERED_NODE_TYPE = 8;
+      var FIRST_ORDERED_NODE_TYPE = 9;
+      var doc;
+      var resolver;
+      var evaluator;
+      var contextNode;
+      var inresult = null;
+
+      var outresult = null;
+
+      var expression = "/staff/employee";
+      var xpathType = ANY_TYPE;
+      var outNode;
+      var nodeType;
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      doc = load(docRef, "doc", "staff");
+      evaluator = createXPathEvaluator(doc);
+resolver = evaluator.createNSResolver(doc);
+      contextNode =  doc;
+outresult = evaluator.evaluate(expression,contextNode,resolver,xpathType,inresult);
+      outNode = outresult.iterateNext();
+      
+    while(
+       
+       (outNode != null)
+
+       ) {
+       nodeType = outNode.nodeType;
+
+      assertEquals("S1.2.1-Element-Nodes-nodeType",1,nodeType);
+       outNode = outresult.iterateNext();
+      
+       }
+
+}
+
+
+
+
+function runTest() {
+   Element_Nodes();
+}
diff --git a/LayoutTests/dom/svg/level3/xpath/Element_Nodes.svg b/LayoutTests/dom/svg/level3/xpath/Element_Nodes.svg
new file mode 100644 (file)
index 0000000..a0fc3d8
--- /dev/null
@@ -0,0 +1,72 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>\r
+<!DOCTYPE svg SYSTEM "staff.dtd" [\r
+   <!ENTITY ent1 "es">\r
+   <!ENTITY ent2 "1900 Dallas Road">\r
+   <!ENTITY ent3 "Texas">\r
+   <!ENTITY ent4 "<entElement domestic='Yes'>Element data</entElement><?PItarget PIdata?>">\r
+   <!ENTITY ent5 PUBLIC "entityURI" "entityFile" NDATA notation1>\r
+   <!ENTITY ent1 "This entity should be discarded">\r
+   <!NOTATION notation1 PUBLIC "notation1File">\r
+   <!NOTATION notation2 SYSTEM "notation2File">\r
+   <!ATTLIST employee xmlns CDATA #IMPLIED>\r
+   <!ELEMENT svg (rect, script, employee+)>\r
+   <!ATTLIST svg \r
+      xmlns CDATA #FIXED "http://www.w3.org/2000/svg"\r
+      name CDATA #IMPLIED>\r
+   <!ELEMENT rect EMPTY>\r
+   <!ATTLIST rect \r
+      x CDATA #REQUIRED\r
+      y CDATA #REQUIRED\r
+      width CDATA #REQUIRED\r
+      height CDATA #REQUIRED>\r
+  <!ELEMENT script (#PCDATA)>\r
+  <!ATTLIST script type CDATA #IMPLIED>      \r
+]>\r
+<!-- This is comment number 1.-->\r
+<svg xmlns="http://www.w3.org/2000/svg"><rect x="0" y="0" width="100" height="100"/>\r
+<script xmlns="http://www.w3.org/1999/xhtml" src="Element_Nodes.js"/>\r
+<script xmlns="http://www.w3.org/1999/xhtml" src="svgunit.js"/>\r
+ <employee xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-1/Files">\r
+  <employeeId>EMP0001</employeeId>\r
+  <name>Margaret Martin</name>\r
+  <position>Accountant</position>           \r
+  <salary>56,000</salary>\r
+  <gender>Female</gender>\r
+  <address domestic="Yes">1230 North Ave. Dallas, Texas 98551</address>\r
+ </employee>\r
+ <employee xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-1/Files">\r
+  <employeeId>EMP0002</employeeId>\r
+  <name>Martha Raynolds<![CDATA[This is a CDATASection with EntityReference number 2 &ent2;]]>\r
+<![CDATA[This is an adjacent CDATASection with a reference to a tab &tab;]]></name>\r
+  <position>Secretary</position>\r
+  <salary>35,000</salary>\r
+  <gender>Female</gender>\r
+  <address domestic="Yes" street="Yes">&ent2; Dallas, &ent3;\r
+ 98554</address>\r
+ </employee>\r
+ <employee xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-1/Files">\r
+  <employeeId>EMP0003</employeeId>\r
+  <name>Roger\r
+ Jones</name>\r
+  <position>Department Manager</position>\r
+  <salary>100,000</salary>\r
+  <gender>&ent4;</gender>\r
+  <address domestic="Yes" street="No">PO Box 27 Irving, texas 98553</address>\r
+ </employee>\r
+ <employee xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-1/Files">\r
+  <employeeId>EMP0004</employeeId>\r
+  <name>Jeny Oconnor</name>\r
+  <position>Personnel Director</position>\r
+  <salary>95,000</salary>\r
+  <gender>Female</gender>\r
+  <address domestic="Yes" street="Y&ent1;">27 South Road. Dallas, Texas 98556</address>\r
+ </employee>\r
+ <employee xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-1/Files">\r
+  <employeeId>EMP0005</employeeId>\r
+  <name>Robert Myers</name>\r
+  <position>Computer Specialist</position>\r
+  <salary>90,000</salary>\r
+  <gender>male</gender>\r
+  <address street="Yes">1821 Nordic. Road, Irving Texas 98558</address>\r
+ </employee>\r
+ </svg>\r
diff --git a/LayoutTests/dom/svg/level3/xpath/Processing_Instruction_Nodes-expected.txt b/LayoutTests/dom/svg/level3/xpath/Processing_Instruction_Nodes-expected.txt
new file mode 100644 (file)
index 0000000..19e09cd
--- /dev/null
@@ -0,0 +1,7 @@
+layer at (0,0) size 800x600
+  RenderCanvas at (0,0) size 800x600
+    KCanvasContainer {svg} at (0,0) size 100x100
+      KCanvasItem {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00L100.00,0.00L100.00,100.00L0.00,100.00"]
+      RenderSVGText {text} at (0,0) size 785x18
+        RenderText {#text} at (0,0) size 250x18
+          text run at (0,0) width 250: "Processing_Instruction_Nodes: Success"
diff --git a/LayoutTests/dom/svg/level3/xpath/Processing_Instruction_Nodes.js b/LayoutTests/dom/svg/level3/xpath/Processing_Instruction_Nodes.js
new file mode 100644 (file)
index 0000000..4181987
--- /dev/null
@@ -0,0 +1,144 @@
+
+/*
+Copyright Â© 2001-2004 World Wide Web Consortium, 
+(Massachusetts Institute of Technology, European Research Consortium 
+for Informatics and Mathematics, Keio University). All 
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the 
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even 
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['Processing_Instruction_Nodes'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+//   This function is called by the testing framework before
+//      running the test suite.
+//
+//   If there are no configuration exceptions, asynchronous
+//        document loading is started.  Otherwise, the status
+//        is set to complete and the exception is immediately
+//        raised when entering the body of the test.
+//
+function setUpPage() {
+   setUpPageStatus = 'running';
+   try {
+     //
+     //   creates test document builder, may throw exception
+     //
+     builder = createConfiguredBuilder();
+
+      docsLoaded = 0;
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      docsLoaded += preload(docRef, "doc", "staff");
+        
+       if (docsLoaded == 1) {
+          setUpPage = 'complete';
+       }
+    } catch(ex) {
+       catchInitializationError(builder, ex);
+        setUpPage = 'complete';
+    }
+}
+
+
+
+//
+//   This method is called on the completion of 
+//      each asychronous load started in setUpTests.
+//
+//   When every synchronous loaded document has completed,
+//      the page status is changed which allows the
+//      body of the test to be executed.
+function loadComplete() {
+    if (++docsLoaded == 1) {
+        setUpPageStatus = 'complete';
+    }
+}
+
+
+/**
+* 
+      S1.2.7 Processing Instruction Nodes - 
+      Create ANY_TYPE XPathResult matching //processing-instruction(),
+      check that each matching Node is a Processing Instruction Node.
+    
+* @author Bob Clary
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#Mapping
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#XPathEvaluator
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#XPathEvaluator-createNSResolver
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#XPathEvaluator-evaluate
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#XPathNSResolver
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#XPathResult
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#XPathResult-iterateNext
+*/
+function Processing_Instruction_Nodes() {
+   var success;
+    if(checkInitialization(builder, "Processing_Instruction_Nodes") != null) return;
+    var ANY_TYPE = 0;
+      var NUMBER_TYPE = 1;
+      var STRING_TYPE = 2;
+      var BOOLEAN_TYPE = 3;
+      var UNORDERED_NODE_ITERATOR_TYPE = 4;
+      var ORDERED_NODE_ITERATOR_TYPE = 5;
+      var UNORDERED_NODE_SNAPSHOT_TYPE = 6;
+      var ORDERED_NODE_SNAPSHOT_TYPE = 7;
+      var ANY_UNORDERED_NODE_TYPE = 8;
+      var FIRST_ORDERED_NODE_TYPE = 9;
+      var doc;
+      var resolver;
+      var evaluator;
+      var contextNode;
+      var inresult = null;
+
+      var outresult = null;
+
+      var expression = "//processing-instruction()";
+      var xpathType = ANY_TYPE;
+      var currNode;
+      var nodeType;
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      doc = load(docRef, "doc", "staff");
+      evaluator = createXPathEvaluator(doc);
+resolver = evaluator.createNSResolver(doc);
+      contextNode =  doc;
+outresult = evaluator.evaluate(expression,contextNode,resolver,xpathType,inresult);
+      currNode = outresult.iterateNext();
+      
+    while(
+       
+       (currNode != null)
+
+       ) {
+       nodeType = currNode.nodeType;
+
+      assertEquals("S1.2.7-Processing-Instruction-Nodes-nodetype",7,nodeType);
+       currNode = outresult.iterateNext();
+      
+       }
+
+}
+
+
+
+
+function runTest() {
+   Processing_Instruction_Nodes();
+}
diff --git a/LayoutTests/dom/svg/level3/xpath/Processing_Instruction_Nodes.svg b/LayoutTests/dom/svg/level3/xpath/Processing_Instruction_Nodes.svg
new file mode 100644 (file)
index 0000000..4f72aaf
--- /dev/null
@@ -0,0 +1,72 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>\r
+<!DOCTYPE svg SYSTEM "staff.dtd" [\r
+   <!ENTITY ent1 "es">\r
+   <!ENTITY ent2 "1900 Dallas Road">\r
+   <!ENTITY ent3 "Texas">\r
+   <!ENTITY ent4 "<entElement domestic='Yes'>Element data</entElement><?PItarget PIdata?>">\r
+   <!ENTITY ent5 PUBLIC "entityURI" "entityFile" NDATA notation1>\r
+   <!ENTITY ent1 "This entity should be discarded">\r
+   <!NOTATION notation1 PUBLIC "notation1File">\r
+   <!NOTATION notation2 SYSTEM "notation2File">\r
+   <!ATTLIST employee xmlns CDATA #IMPLIED>\r
+   <!ELEMENT svg (rect, script, employee+)>\r
+   <!ATTLIST svg \r
+      xmlns CDATA #FIXED "http://www.w3.org/2000/svg"\r
+      name CDATA #IMPLIED>\r
+   <!ELEMENT rect EMPTY>\r
+   <!ATTLIST rect \r
+      x CDATA #REQUIRED\r
+      y CDATA #REQUIRED\r
+      width CDATA #REQUIRED\r
+      height CDATA #REQUIRED>\r
+  <!ELEMENT script (#PCDATA)>\r
+  <!ATTLIST script type CDATA #IMPLIED>      \r
+]>\r
+<!-- This is comment number 1.-->\r
+<svg xmlns="http://www.w3.org/2000/svg"><rect x="0" y="0" width="100" height="100"/>\r
+<script xmlns="http://www.w3.org/1999/xhtml" src="Processing_Instruction_Nodes.js"/>\r
+<script xmlns="http://www.w3.org/1999/xhtml" src="svgunit.js"/>\r
+ <employee xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-1/Files">\r
+  <employeeId>EMP0001</employeeId>\r
+  <name>Margaret Martin</name>\r
+  <position>Accountant</position>           \r
+  <salary>56,000</salary>\r
+  <gender>Female</gender>\r
+  <address domestic="Yes">1230 North Ave. Dallas, Texas 98551</address>\r
+ </employee>\r
+ <employee xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-1/Files">\r
+  <employeeId>EMP0002</employeeId>\r
+  <name>Martha Raynolds<![CDATA[This is a CDATASection with EntityReference number 2 &ent2;]]>\r
+<![CDATA[This is an adjacent CDATASection with a reference to a tab &tab;]]></name>\r
+  <position>Secretary</position>\r
+  <salary>35,000</salary>\r
+  <gender>Female</gender>\r
+  <address domestic="Yes" street="Yes">&ent2; Dallas, &ent3;\r
+ 98554</address>\r
+ </employee>\r
+ <employee xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-1/Files">\r
+  <employeeId>EMP0003</employeeId>\r
+  <name>Roger\r
+ Jones</name>\r
+  <position>Department Manager</position>\r
+  <salary>100,000</salary>\r
+  <gender>&ent4;</gender>\r
+  <address domestic="Yes" street="No">PO Box 27 Irving, texas 98553</address>\r
+ </employee>\r
+ <employee xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-1/Files">\r
+  <employeeId>EMP0004</employeeId>\r
+  <name>Jeny Oconnor</name>\r
+  <position>Personnel Director</position>\r
+  <salary>95,000</salary>\r
+  <gender>Female</gender>\r
+  <address domestic="Yes" street="Y&ent1;">27 South Road. Dallas, Texas 98556</address>\r
+ </employee>\r
+ <employee xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-1/Files">\r
+  <employeeId>EMP0005</employeeId>\r
+  <name>Robert Myers</name>\r
+  <position>Computer Specialist</position>\r
+  <salary>90,000</salary>\r
+  <gender>male</gender>\r
+  <address street="Yes">1821 Nordic. Road, Irving Texas 98558</address>\r
+ </employee>\r
+ </svg>\r
diff --git a/LayoutTests/dom/svg/level3/xpath/Text_Nodes-expected.txt b/LayoutTests/dom/svg/level3/xpath/Text_Nodes-expected.txt
new file mode 100644 (file)
index 0000000..c035a5f
--- /dev/null
@@ -0,0 +1,10 @@
+layer at (0,0) size 800x600
+  RenderCanvas at (0,0) size 800x600
+    KCanvasContainer {svg} at (0,0) size 100x100
+      KCanvasItem {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#FF0000]}] [data="M0.00,0.00L100.00,0.00L100.00,100.00L0.00,100.00"]
+      RenderSVGText {text} at (0,0) size 785x18
+        RenderText {#text} at (0,0) size 78x18
+          text run at (0,0) width 78: "Text_Nodes"
+      RenderSVGText {text} at (0,0) size 785x18
+        RenderText {#text} at (0,0) size 331x18
+          text run at (0,0) width 331: "S1.2.4-Text-Nodes-Adjacent-Next: assertTrue failed"
diff --git a/LayoutTests/dom/svg/level3/xpath/Text_Nodes.js b/LayoutTests/dom/svg/level3/xpath/Text_Nodes.js
new file mode 100644 (file)
index 0000000..7bcba4a
--- /dev/null
@@ -0,0 +1,200 @@
+
+/*
+Copyright Â© 2001-2004 World Wide Web Consortium, 
+(Massachusetts Institute of Technology, European Research Consortium 
+for Informatics and Mathematics, Keio University). All 
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the 
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even 
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['Text_Nodes'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+//   This function is called by the testing framework before
+//      running the test suite.
+//
+//   If there are no configuration exceptions, asynchronous
+//        document loading is started.  Otherwise, the status
+//        is set to complete and the exception is immediately
+//        raised when entering the body of the test.
+//
+function setUpPage() {
+   setUpPageStatus = 'running';
+   try {
+     //
+     //   creates test document builder, may throw exception
+     //
+     builder = createConfiguredBuilder();
+
+      docsLoaded = 0;
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      docsLoaded += preload(docRef, "doc", "staff");
+        
+       if (docsLoaded == 1) {
+          setUpPage = 'complete';
+       }
+    } catch(ex) {
+       catchInitializationError(builder, ex);
+        setUpPage = 'complete';
+    }
+}
+
+
+
+//
+//   This method is called on the completion of 
+//      each asychronous load started in setUpTests.
+//
+//   When every synchronous loaded document has completed,
+//      the page status is changed which allows the
+//      body of the test to be executed.
+function loadComplete() {
+    if (++docsLoaded == 1) {
+        setUpPageStatus = 'complete';
+    }
+}
+
+
+/**
+* 
+      1.2.4 Text Nodes - 
+      Create ANY_TYPE XPathResult matching //text(),
+      check that each matching Node is a Text Node, and
+      that no pair of nodes in the result are siblings.
+    
+* @author Bob Clary
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#Mapping
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#XPathEvaluator
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#XPathEvaluator-createNSResolver
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#XPathEvaluator-evaluate
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#XPathNSResolver
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#XPathResult
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#XPathResult-iterateNext
+*/
+function Text_Nodes() {
+   var success;
+    if(checkInitialization(builder, "Text_Nodes") != null) return;
+    var ANY_TYPE = 0;
+      var NUMBER_TYPE = 1;
+      var STRING_TYPE = 2;
+      var BOOLEAN_TYPE = 3;
+      var UNORDERED_NODE_ITERATOR_TYPE = 4;
+      var ORDERED_NODE_ITERATOR_TYPE = 5;
+      var UNORDERED_NODE_SNAPSHOT_TYPE = 6;
+      var ORDERED_NODE_SNAPSHOT_TYPE = 7;
+      var ANY_UNORDERED_NODE_TYPE = 8;
+      var FIRST_ORDERED_NODE_TYPE = 9;
+      var doc;
+      var resolver;
+      var evaluator;
+      var contextNode;
+      var inresult = null;
+
+      var outresult = null;
+
+      var expression = "//text()";
+      var xpathType = ANY_TYPE;
+      var currNode;
+      var nextNode;
+      var currNodeNextSibling;
+      var nextNodePrevSibling;
+      var nodeType;
+      var isTextNode;
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      doc = load(docRef, "doc", "staff");
+      evaluator = createXPathEvaluator(doc);
+resolver = evaluator.createNSResolver(doc);
+      contextNode =  doc;
+outresult = evaluator.evaluate(expression,contextNode,resolver,xpathType,inresult);
+      currNode = outresult.iterateNext();
+      
+    while(
+       
+       (currNode != null)
+
+       ) {
+       nodeType = currNode.nodeType;
+
+      isTextNode = "true";
+
+       if(
+       
+       (!(3 == nodeType) && !(4 == nodeType))
+
+       ) {
+       isTextNode = "false";
+
+       }
+       assertEquals("S1.2.4-Text-Nodes-nodeType","true".toLowerCase(),isTextNode.toLowerCase());
+       nextNode = outresult.iterateNext();
+      
+       if(
+       
+       (nextNode != null)
+
+       ) {
+       currNodeNextSibling = currNode.nextSibling;
+
+      
+       if(
+       
+       same(nextNode,currNodeNextSibling)
+
+       ) {
+       /* dummy statement */
+
+       }
+       
+               else {
+                       assertTrue("S1.2.4-Text-Nodes-Adjacent-Next",false);
+
+               }
+       nextNodePrevSibling = nextNode.previousSibling;
+
+      
+       if(
+       
+       same(nextNodePrevSibling,currNode)
+
+       ) {
+       /* dummy statement */
+
+       }
+       
+               else {
+                       assertTrue("S1.2.4-Text-Nodes-Adjacent-Prev",false);
+
+               }
+       
+       }
+       currNode =  nextNode;
+
+       }
+
+}
+
+
+
+
+function runTest() {
+   Text_Nodes();
+}
diff --git a/LayoutTests/dom/svg/level3/xpath/Text_Nodes.svg b/LayoutTests/dom/svg/level3/xpath/Text_Nodes.svg
new file mode 100644 (file)
index 0000000..3616264
--- /dev/null
@@ -0,0 +1,72 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>\r
+<!DOCTYPE svg SYSTEM "staff.dtd" [\r
+   <!ENTITY ent1 "es">\r
+   <!ENTITY ent2 "1900 Dallas Road">\r
+   <!ENTITY ent3 "Texas">\r
+   <!ENTITY ent4 "<entElement domestic='Yes'>Element data</entElement><?PItarget PIdata?>">\r
+   <!ENTITY ent5 PUBLIC "entityURI" "entityFile" NDATA notation1>\r
+   <!ENTITY ent1 "This entity should be discarded">\r
+   <!NOTATION notation1 PUBLIC "notation1File">\r
+   <!NOTATION notation2 SYSTEM "notation2File">\r
+   <!ATTLIST employee xmlns CDATA #IMPLIED>\r
+   <!ELEMENT svg (rect, script, employee+)>\r
+   <!ATTLIST svg \r
+      xmlns CDATA #FIXED "http://www.w3.org/2000/svg"\r
+      name CDATA #IMPLIED>\r
+   <!ELEMENT rect EMPTY>\r
+   <!ATTLIST rect \r
+      x CDATA #REQUIRED\r
+      y CDATA #REQUIRED\r
+      width CDATA #REQUIRED\r
+      height CDATA #REQUIRED>\r
+  <!ELEMENT script (#PCDATA)>\r
+  <!ATTLIST script type CDATA #IMPLIED>      \r
+]>\r
+<!-- This is comment number 1.-->\r
+<svg xmlns="http://www.w3.org/2000/svg"><rect x="0" y="0" width="100" height="100"/>\r
+<script xmlns="http://www.w3.org/1999/xhtml" src="Text_Nodes.js"/>\r
+<script xmlns="http://www.w3.org/1999/xhtml" src="svgunit.js"/>\r
+ <employee xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-1/Files">\r
+  <employeeId>EMP0001</employeeId>\r
+  <name>Margaret Martin</name>\r
+  <position>Accountant</position>           \r
+  <salary>56,000</salary>\r
+  <gender>Female</gender>\r
+  <address domestic="Yes">1230 North Ave. Dallas, Texas 98551</address>\r
+ </employee>\r
+ <employee xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-1/Files">\r
+  <employeeId>EMP0002</employeeId>\r
+  <name>Martha Raynolds<![CDATA[This is a CDATASection with EntityReference number 2 &ent2;]]>\r
+<![CDATA[This is an adjacent CDATASection with a reference to a tab &tab;]]></name>\r
+  <position>Secretary</position>\r
+  <salary>35,000</salary>\r
+  <gender>Female</gender>\r
+  <address domestic="Yes" street="Yes">&ent2; Dallas, &ent3;\r
+ 98554</address>\r
+ </employee>\r
+ <employee xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-1/Files">\r
+  <employeeId>EMP0003</employeeId>\r
+  <name>Roger\r
+ Jones</name>\r
+  <position>Department Manager</position>\r
+  <salary>100,000</salary>\r
+  <gender>&ent4;</gender>\r
+  <address domestic="Yes" street="No">PO Box 27 Irving, texas 98553</address>\r
+ </employee>\r
+ <employee xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-1/Files">\r
+  <employeeId>EMP0004</employeeId>\r
+  <name>Jeny Oconnor</name>\r
+  <position>Personnel Director</position>\r
+  <salary>95,000</salary>\r
+  <gender>Female</gender>\r
+  <address domestic="Yes" street="Y&ent1;">27 South Road. Dallas, Texas 98556</address>\r
+ </employee>\r
+ <employee xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-1/Files">\r
+  <employeeId>EMP0005</employeeId>\r
+  <name>Robert Myers</name>\r
+  <position>Computer Specialist</position>\r
+  <salary>90,000</salary>\r
+  <gender>male</gender>\r
+  <address street="Yes">1821 Nordic. Road, Irving Texas 98558</address>\r
+ </employee>\r
+ </svg>\r
diff --git a/LayoutTests/dom/svg/level3/xpath/XPathEvaluatorCast01-expected.txt b/LayoutTests/dom/svg/level3/xpath/XPathEvaluatorCast01-expected.txt
new file mode 100644 (file)
index 0000000..8a80f7c
--- /dev/null
@@ -0,0 +1,7 @@
+layer at (0,0) size 800x600
+  RenderCanvas at (0,0) size 800x600
+    KCanvasContainer {svg} at (0,0) size 100x100
+      KCanvasItem {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00L100.00,0.00L100.00,100.00L0.00,100.00"]
+      RenderSVGText {text} at (0,0) size 785x18
+        RenderText {#text} at (0,0) size 203x18
+          text run at (0,0) width 203: "XPathEvaluatorCast01: Success"
diff --git a/LayoutTests/dom/svg/level3/xpath/XPathEvaluatorCast01.js b/LayoutTests/dom/svg/level3/xpath/XPathEvaluatorCast01.js
new file mode 100644 (file)
index 0000000..ec9f5cc
--- /dev/null
@@ -0,0 +1,102 @@
+
+/*
+Copyright Â© 2001-2004 World Wide Web Consortium, 
+(Massachusetts Institute of Technology, European Research Consortium 
+for Informatics and Mathematics, Keio University). All 
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the 
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even 
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['XPathEvaluatorCast01'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+//   This function is called by the testing framework before
+//      running the test suite.
+//
+//   If there are no configuration exceptions, asynchronous
+//        document loading is started.  Otherwise, the status
+//        is set to complete and the exception is immediately
+//        raised when entering the body of the test.
+//
+function setUpPage() {
+   setUpPageStatus = 'running';
+   try {
+     //
+     //   creates test document builder, may throw exception
+     //
+     builder = createConfiguredBuilder();
+
+      docsLoaded = 0;
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      docsLoaded += preload(docRef, "doc", "staffNS");
+        
+       if (docsLoaded == 1) {
+          setUpPage = 'complete';
+       }
+    } catch(ex) {
+       catchInitializationError(builder, ex);
+        setUpPage = 'complete';
+    }
+}
+
+
+
+//
+//   This method is called on the completion of 
+//      each asychronous load started in setUpTests.
+//
+//   When every synchronous loaded document has completed,
+//      the page status is changed which allows the
+//      body of the test to be executed.
+function loadComplete() {
+    if (++docsLoaded == 1) {
+        setUpPageStatus = 'complete';
+    }
+}
+
+
+/**
+* 
+A document is created using implementation.createDocument and 
+cast to a XPathEvaluator interface.
+
+* @author Philippe Le Hégaret
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#XPathEvaluator
+*/
+function XPathEvaluatorCast01() {
+   var success;
+    if(checkInitialization(builder, "XPathEvaluatorCast01") != null) return;
+    var doc;
+      var xpEvaluator;
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      doc = load(docRef, "doc", "staffNS");
+      xpEvaluator = createXPathEvaluator(doc);
+assertNotNull("notnull",xpEvaluator);
+
+}
+
+
+
+
+function runTest() {
+   XPathEvaluatorCast01();
+}
diff --git a/LayoutTests/dom/svg/level3/xpath/XPathEvaluatorCast01.svg b/LayoutTests/dom/svg/level3/xpath/XPathEvaluatorCast01.svg
new file mode 100644 (file)
index 0000000..9a9b370
--- /dev/null
@@ -0,0 +1,74 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>\r
+<!DOCTYPE svg PUBLIC "STAFF" "staffNS.dtd" \r
+[\r
+   <!ENTITY ent1 "es">\r
+   <!ENTITY ent2 "1900 Dallas Road">\r
+   <!ENTITY ent3 "Texas">\r
+   <!ENTITY ent4 "<entElement1 xmlns:local1='www.xyz.com'>Element data</entElement1><?PItarget PIdata?>">\r
+   <!ENTITY ent5 PUBLIC "entityURI" "entityFile" NDATA notation1>\r
+   <!ENTITY ent6 PUBLIC "uri" "file" NDATA notation2>\r
+   <!ENTITY ent1 "This entity should be discarded">\r
+   <!NOTATION notation1 PUBLIC "notation1File">\r
+   <!NOTATION notation2 SYSTEM "notation2File">\r
+   <!ELEMENT svg (rect, script, employee+, emp:employee, employee*)>\r
+   <!ATTLIST svg \r
+      xmlns CDATA #FIXED "http://www.w3.org/2000/svg"\r
+      name CDATA #IMPLIED>\r
+   <!ELEMENT rect EMPTY>\r
+   <!ATTLIST rect \r
+      x CDATA #REQUIRED\r
+      y CDATA #REQUIRED\r
+      width CDATA #REQUIRED\r
+      height CDATA #REQUIRED>\r
+  <!ELEMENT script (#PCDATA)>\r
+  <!ATTLIST script type CDATA #IMPLIED>      \r
+]>\r
+<!-- This is comment number 1.-->\r
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:nist="http://www.nist.gov"><rect x="0" y="0" width="100" height="100"/>\r
+<script xmlns="http://www.w3.org/1999/xhtml" src="XPathEvaluatorCast01.js"/>\r
+<script xmlns="http://www.w3.org/1999/xhtml" src="svgunit.js"/>\r
+ <employee xmlns="http://www.nist.gov" xmlns:dmstc="http://www.usa.com">\r
+  <employeeId>EMP0001</employeeId>\r
+  <name>Margaret Martin</name>\r
+  <position>Accountant</position>           \r
+  <salary>56,000</salary>\r
+  <gender>Female</gender>\r
+  <address dmstc:domestic="Yes">1230 North Ave. Dallas, Texas 98551</address>\r
+ </employee>\r
+ <employee xmlns:dmstc="http://www.usa.com" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0002</employeeId>\r
+  <name>Martha Raynolds\r
+<![CDATA[This is a CDATASection with EntityReference number 2 &ent2;]]>\r
+<![CDATA[This is an adjacent CDATASection with a reference to a tab &tab;]]></name>\r
+  <position>Secretary</position>\r
+  <salary>35,000</salary>\r
+  <gender>Female</gender>\r
+  <address dmstc:domestic="Yes" street="Yes">&ent2; Dallas, &ent3;\r
+ 98554</address>\r
+ </employee>\r
+ <employee xmlns:dmstc="http://www.netzero.com" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0003</employeeId>\r
+  <name>Roger\r
+ Jones</name>\r
+  <position>Department Manager</position>\r
+  <salary>100,000</salary>\r
+  <gender>&ent4;</gender>\r
+  <address dmstc:domestic="Yes" street="No">PO Box 27 Irving, texas 98553</address>\r
+ </employee>\r
+ <emp:employee xmlns:emp="http://www.nist.gov" xmlns:nm="http://www.altavista.com" >    <emp:employeeId>EMP0004</emp:employeeId>\r
+  <nm:name>Jeny Oconnor</nm:name>\r
+  <emp:position>Personnel Director</emp:position>\r
+  <emp:salary>95,000</emp:salary>\r
+  <emp:gender>Female</emp:gender>\r
+  <emp:address emp:domestic="Yes" street="Y&ent1;" emp:zone="CANADA" emp:local1="TRUE">27 South Road. Dallas, texas 98556</emp:address>\r
+ </emp:employee>\r
+ <employee xmlns:emp2="http://www.nist.gov" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0005</employeeId>\r
+  <name>Robert Myers</name>\r
+  <position>Computer Specialist</position>\r
+  <salary>90,000</salary>\r
+  <gender>male</gender>\r
+  <address street="Yes" xmlns="http://www.nist.gov">1821 Nordic. Road, Irving Texas 98558</address>\r
+ </employee>\r
+ </svg>\r
\r
diff --git a/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createExpression_INVALID_EXPRESSION_ERR-expected.txt b/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createExpression_INVALID_EXPRESSION_ERR-expected.txt
new file mode 100644 (file)
index 0000000..71d4375
--- /dev/null
@@ -0,0 +1,7 @@
+layer at (0,0) size 800x600
+  RenderCanvas at (0,0) size 800x600
+    KCanvasContainer {svg} at (0,0) size 100x100
+      KCanvasItem {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00L100.00,0.00L100.00,100.00L0.00,100.00"]
+      RenderSVGText {text} at (0,0) size 785x18
+        RenderText {#text} at (0,0) size 497x18
+          text run at (0,0) width 497: "XPathEvaluator_createExpression_INVALID_EXPRESSION_ERR: Success"
diff --git a/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createExpression_INVALID_EXPRESSION_ERR.js b/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createExpression_INVALID_EXPRESSION_ERR.js
new file mode 100644 (file)
index 0000000..0d79e08
--- /dev/null
@@ -0,0 +1,122 @@
+
+/*
+Copyright Â© 2001-2004 World Wide Web Consortium, 
+(Massachusetts Institute of Technology, European Research Consortium 
+for Informatics and Mathematics, Keio University). All 
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the 
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even 
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['XPathEvaluator_createExpression_INVALID_EXPRESSION_ERR'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+//   This function is called by the testing framework before
+//      running the test suite.
+//
+//   If there are no configuration exceptions, asynchronous
+//        document loading is started.  Otherwise, the status
+//        is set to complete and the exception is immediately
+//        raised when entering the body of the test.
+//
+function setUpPage() {
+   setUpPageStatus = 'running';
+   try {
+     //
+     //   creates test document builder, may throw exception
+     //
+     builder = createConfiguredBuilder();
+
+      docsLoaded = 0;
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      docsLoaded += preload(docRef, "doc", "staffNS");
+        
+       if (docsLoaded == 1) {
+          setUpPage = 'complete';
+       }
+    } catch(ex) {
+       catchInitializationError(builder, ex);
+        setUpPage = 'complete';
+    }
+}
+
+
+
+//
+//   This method is called on the completion of 
+//      each asychronous load started in setUpTests.
+//
+//   When every synchronous loaded document has completed,
+//      the page status is changed which allows the
+//      body of the test to be executed.
+function loadComplete() {
+    if (++docsLoaded == 1) {
+        setUpPageStatus = 'complete';
+    }
+}
+
+
+/**
+* 
+      The XPathEvaluator can create a "XPathExpression" using the method
+      "createExpression(expression, resolver)".
+      
+      Retrieve the DOM document on which the
+      'createExpression("12a", null)' method is
+      invoked with the document element.  The method should fail to create
+      pre-compiled expression and throws
+      XPathException.INVALID_EXPRESSION_ERR
+      since "12a" is not an XPath expression.
+    
+* @author Philippe Le Hégaret
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#XPathEvaluator-createExpression
+*/
+function XPathEvaluator_createExpression_INVALID_EXPRESSION_ERR() {
+   var success;
+    if(checkInitialization(builder, "XPathEvaluator_createExpression_INVALID_EXPRESSION_ERR") != null) return;
+    var nullNSResolver = null;
+
+      var doc;
+      var xpEvaluator;
+      var exp;
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      doc = load(docRef, "doc", "staffNS");
+      xpEvaluator = createXPathEvaluator(doc);
+
+       {
+               success = false;
+               try {
+            exp = xpEvaluator.createExpression("12a",nullNSResolver);
+        }
+               catch(ex) {            
+      success = (typeof(ex.code) != 'undefined' && ex.code == 51);
+               }
+               assertTrue("throw_INVALID_EXPRESSION_ERR",success);
+       }
+
+}
+
+
+
+
+function runTest() {
+   XPathEvaluator_createExpression_INVALID_EXPRESSION_ERR();
+}
diff --git a/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createExpression_INVALID_EXPRESSION_ERR.svg b/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createExpression_INVALID_EXPRESSION_ERR.svg
new file mode 100644 (file)
index 0000000..467eb6e
--- /dev/null
@@ -0,0 +1,74 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>\r
+<!DOCTYPE svg PUBLIC "STAFF" "staffNS.dtd" \r
+[\r
+   <!ENTITY ent1 "es">\r
+   <!ENTITY ent2 "1900 Dallas Road">\r
+   <!ENTITY ent3 "Texas">\r
+   <!ENTITY ent4 "<entElement1 xmlns:local1='www.xyz.com'>Element data</entElement1><?PItarget PIdata?>">\r
+   <!ENTITY ent5 PUBLIC "entityURI" "entityFile" NDATA notation1>\r
+   <!ENTITY ent6 PUBLIC "uri" "file" NDATA notation2>\r
+   <!ENTITY ent1 "This entity should be discarded">\r
+   <!NOTATION notation1 PUBLIC "notation1File">\r
+   <!NOTATION notation2 SYSTEM "notation2File">\r
+   <!ELEMENT svg (rect, script, employee+, emp:employee, employee*)>\r
+   <!ATTLIST svg \r
+      xmlns CDATA #FIXED "http://www.w3.org/2000/svg"\r
+      name CDATA #IMPLIED>\r
+   <!ELEMENT rect EMPTY>\r
+   <!ATTLIST rect \r
+      x CDATA #REQUIRED\r
+      y CDATA #REQUIRED\r
+      width CDATA #REQUIRED\r
+      height CDATA #REQUIRED>\r
+  <!ELEMENT script (#PCDATA)>\r
+  <!ATTLIST script type CDATA #IMPLIED>      \r
+]>\r
+<!-- This is comment number 1.-->\r
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:nist="http://www.nist.gov"><rect x="0" y="0" width="100" height="100"/>\r
+<script xmlns="http://www.w3.org/1999/xhtml" src="XPathEvaluator_createExpression_INVALID_EXPRESSION_ERR.js"/>\r
+<script xmlns="http://www.w3.org/1999/xhtml" src="svgunit.js"/>\r
+ <employee xmlns="http://www.nist.gov" xmlns:dmstc="http://www.usa.com">\r
+  <employeeId>EMP0001</employeeId>\r
+  <name>Margaret Martin</name>\r
+  <position>Accountant</position>           \r
+  <salary>56,000</salary>\r
+  <gender>Female</gender>\r
+  <address dmstc:domestic="Yes">1230 North Ave. Dallas, Texas 98551</address>\r
+ </employee>\r
+ <employee xmlns:dmstc="http://www.usa.com" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0002</employeeId>\r
+  <name>Martha Raynolds\r
+<![CDATA[This is a CDATASection with EntityReference number 2 &ent2;]]>\r
+<![CDATA[This is an adjacent CDATASection with a reference to a tab &tab;]]></name>\r
+  <position>Secretary</position>\r
+  <salary>35,000</salary>\r
+  <gender>Female</gender>\r
+  <address dmstc:domestic="Yes" street="Yes">&ent2; Dallas, &ent3;\r
+ 98554</address>\r
+ </employee>\r
+ <employee xmlns:dmstc="http://www.netzero.com" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0003</employeeId>\r
+  <name>Roger\r
+ Jones</name>\r
+  <position>Department Manager</position>\r
+  <salary>100,000</salary>\r
+  <gender>&ent4;</gender>\r
+  <address dmstc:domestic="Yes" street="No">PO Box 27 Irving, texas 98553</address>\r
+ </employee>\r
+ <emp:employee xmlns:emp="http://www.nist.gov" xmlns:nm="http://www.altavista.com" >    <emp:employeeId>EMP0004</emp:employeeId>\r
+  <nm:name>Jeny Oconnor</nm:name>\r
+  <emp:position>Personnel Director</emp:position>\r
+  <emp:salary>95,000</emp:salary>\r
+  <emp:gender>Female</emp:gender>\r
+  <emp:address emp:domestic="Yes" street="Y&ent1;" emp:zone="CANADA" emp:local1="TRUE">27 South Road. Dallas, texas 98556</emp:address>\r
+ </emp:employee>\r
+ <employee xmlns:emp2="http://www.nist.gov" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0005</employeeId>\r
+  <name>Robert Myers</name>\r
+  <position>Computer Specialist</position>\r
+  <salary>90,000</salary>\r
+  <gender>male</gender>\r
+  <address street="Yes" xmlns="http://www.nist.gov">1821 Nordic. Road, Irving Texas 98558</address>\r
+ </employee>\r
+ </svg>\r
\r
diff --git a/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createExpression_NAMESPACE_ERR_01-expected.txt b/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createExpression_NAMESPACE_ERR_01-expected.txt
new file mode 100644 (file)
index 0000000..d3f1631
--- /dev/null
@@ -0,0 +1,7 @@
+layer at (0,0) size 800x600
+  RenderCanvas at (0,0) size 800x600
+    KCanvasContainer {svg} at (0,0) size 100x100
+      KCanvasItem {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00L100.00,0.00L100.00,100.00L0.00,100.00"]
+      RenderSVGText {text} at (0,0) size 785x18
+        RenderText {#text} at (0,0) size 445x18
+          text run at (0,0) width 445: "XPathEvaluator_createExpression_NAMESPACE_ERR_01: Success"
diff --git a/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createExpression_NAMESPACE_ERR_01.js b/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createExpression_NAMESPACE_ERR_01.js
new file mode 100644 (file)
index 0000000..4151a11
--- /dev/null
@@ -0,0 +1,121 @@
+
+/*
+Copyright Â© 2001-2004 World Wide Web Consortium, 
+(Massachusetts Institute of Technology, European Research Consortium 
+for Informatics and Mathematics, Keio University). All 
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the 
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even 
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['XPathEvaluator_createExpression_NAMESPACE_ERR_01'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+//   This function is called by the testing framework before
+//      running the test suite.
+//
+//   If there are no configuration exceptions, asynchronous
+//        document loading is started.  Otherwise, the status
+//        is set to complete and the exception is immediately
+//        raised when entering the body of the test.
+//
+function setUpPage() {
+   setUpPageStatus = 'running';
+   try {
+     //
+     //   creates test document builder, may throw exception
+     //
+     builder = createConfiguredBuilder();
+
+      docsLoaded = 0;
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      docsLoaded += preload(docRef, "doc", "staffNS");
+        
+       if (docsLoaded == 1) {
+          setUpPage = 'complete';
+       }
+    } catch(ex) {
+       catchInitializationError(builder, ex);
+        setUpPage = 'complete';
+    }
+}
+
+
+
+//
+//   This method is called on the completion of 
+//      each asychronous load started in setUpTests.
+//
+//   When every synchronous loaded document has completed,
+//      the page status is changed which allows the
+//      body of the test to be executed.
+function loadComplete() {
+    if (++docsLoaded == 1) {
+        setUpPageStatus = 'complete';
+    }
+}
+
+
+/**
+* 
+      The XPathEvaluator can create a "XPathExpression" using the method
+      "createExpression(expression, resolver)".
+      
+      Retrieve the DOM document on which the
+      'createExpression("/jfouffa:employee", null)' method is
+      invoked with the document element.  The method should fail to create
+      pre-compiled expression and throws DOMException.NAMESPACE_ERR
+      since the prefix jfouffa is not mapped.
+    
+* @author Philippe Le Hégaret
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#XPathEvaluator-createExpression
+*/
+function XPathEvaluator_createExpression_NAMESPACE_ERR_01() {
+   var success;
+    if(checkInitialization(builder, "XPathEvaluator_createExpression_NAMESPACE_ERR_01") != null) return;
+    var doc;
+      var xpEvaluator;
+      var nullNSResolver = null;
+
+      var exp;
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      doc = load(docRef, "doc", "staffNS");
+      xpEvaluator = createXPathEvaluator(doc);
+
+       {
+               success = false;
+               try {
+            exp = xpEvaluator.createExpression("/jfouffa:employee",nullNSResolver);
+        }
+               catch(ex) {
+      success = (typeof(ex.code) != 'undefined' && ex.code == 14);
+               }
+               assertTrue("throw_NAMESPACE_ERR",success);
+       }
+
+}
+
+
+
+
+function runTest() {
+   XPathEvaluator_createExpression_NAMESPACE_ERR_01();
+}
diff --git a/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createExpression_NAMESPACE_ERR_01.svg b/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createExpression_NAMESPACE_ERR_01.svg
new file mode 100644 (file)
index 0000000..71751e7
--- /dev/null
@@ -0,0 +1,74 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>\r
+<!DOCTYPE svg PUBLIC "STAFF" "staffNS.dtd" \r
+[\r
+   <!ENTITY ent1 "es">\r
+   <!ENTITY ent2 "1900 Dallas Road">\r
+   <!ENTITY ent3 "Texas">\r
+   <!ENTITY ent4 "<entElement1 xmlns:local1='www.xyz.com'>Element data</entElement1><?PItarget PIdata?>">\r
+   <!ENTITY ent5 PUBLIC "entityURI" "entityFile" NDATA notation1>\r
+   <!ENTITY ent6 PUBLIC "uri" "file" NDATA notation2>\r
+   <!ENTITY ent1 "This entity should be discarded">\r
+   <!NOTATION notation1 PUBLIC "notation1File">\r
+   <!NOTATION notation2 SYSTEM "notation2File">\r
+   <!ELEMENT svg (rect, script, employee+, emp:employee, employee*)>\r
+   <!ATTLIST svg \r
+      xmlns CDATA #FIXED "http://www.w3.org/2000/svg"\r
+      name CDATA #IMPLIED>\r
+   <!ELEMENT rect EMPTY>\r
+   <!ATTLIST rect \r
+      x CDATA #REQUIRED\r
+      y CDATA #REQUIRED\r
+      width CDATA #REQUIRED\r
+      height CDATA #REQUIRED>\r
+  <!ELEMENT script (#PCDATA)>\r
+  <!ATTLIST script type CDATA #IMPLIED>      \r
+]>\r
+<!-- This is comment number 1.-->\r
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:nist="http://www.nist.gov"><rect x="0" y="0" width="100" height="100"/>\r
+<script xmlns="http://www.w3.org/1999/xhtml" src="XPathEvaluator_createExpression_NAMESPACE_ERR_01.js"/>\r
+<script xmlns="http://www.w3.org/1999/xhtml" src="svgunit.js"/>\r
+ <employee xmlns="http://www.nist.gov" xmlns:dmstc="http://www.usa.com">\r
+  <employeeId>EMP0001</employeeId>\r
+  <name>Margaret Martin</name>\r
+  <position>Accountant</position>           \r
+  <salary>56,000</salary>\r
+  <gender>Female</gender>\r
+  <address dmstc:domestic="Yes">1230 North Ave. Dallas, Texas 98551</address>\r
+ </employee>\r
+ <employee xmlns:dmstc="http://www.usa.com" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0002</employeeId>\r
+  <name>Martha Raynolds\r
+<![CDATA[This is a CDATASection with EntityReference number 2 &ent2;]]>\r
+<![CDATA[This is an adjacent CDATASection with a reference to a tab &tab;]]></name>\r
+  <position>Secretary</position>\r
+  <salary>35,000</salary>\r
+  <gender>Female</gender>\r
+  <address dmstc:domestic="Yes" street="Yes">&ent2; Dallas, &ent3;\r
+ 98554</address>\r
+ </employee>\r
+ <employee xmlns:dmstc="http://www.netzero.com" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0003</employeeId>\r
+  <name>Roger\r
+ Jones</name>\r
+  <position>Department Manager</position>\r
+  <salary>100,000</salary>\r
+  <gender>&ent4;</gender>\r
+  <address dmstc:domestic="Yes" street="No">PO Box 27 Irving, texas 98553</address>\r
+ </employee>\r
+ <emp:employee xmlns:emp="http://www.nist.gov" xmlns:nm="http://www.altavista.com" >    <emp:employeeId>EMP0004</emp:employeeId>\r
+  <nm:name>Jeny Oconnor</nm:name>\r
+  <emp:position>Personnel Director</emp:position>\r
+  <emp:salary>95,000</emp:salary>\r
+  <emp:gender>Female</emp:gender>\r
+  <emp:address emp:domestic="Yes" street="Y&ent1;" emp:zone="CANADA" emp:local1="TRUE">27 South Road. Dallas, texas 98556</emp:address>\r
+ </emp:employee>\r
+ <employee xmlns:emp2="http://www.nist.gov" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0005</employeeId>\r
+  <name>Robert Myers</name>\r
+  <position>Computer Specialist</position>\r
+  <salary>90,000</salary>\r
+  <gender>male</gender>\r
+  <address street="Yes" xmlns="http://www.nist.gov">1821 Nordic. Road, Irving Texas 98558</address>\r
+ </employee>\r
+ </svg>\r
\r
diff --git a/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createExpression_NAMESPACE_ERR_02-expected.txt b/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createExpression_NAMESPACE_ERR_02-expected.txt
new file mode 100644 (file)
index 0000000..cb9f027
--- /dev/null
@@ -0,0 +1,7 @@
+layer at (0,0) size 800x600
+  RenderCanvas at (0,0) size 800x600
+    KCanvasContainer {svg} at (0,0) size 100x100
+      KCanvasItem {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00L100.00,0.00L100.00,100.00L0.00,100.00"]
+      RenderSVGText {text} at (0,0) size 785x18
+        RenderText {#text} at (0,0) size 445x18
+          text run at (0,0) width 445: "XPathEvaluator_createExpression_NAMESPACE_ERR_02: Success"
diff --git a/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createExpression_NAMESPACE_ERR_02.js b/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createExpression_NAMESPACE_ERR_02.js
new file mode 100644 (file)
index 0000000..e22aa45
--- /dev/null
@@ -0,0 +1,124 @@
+
+/*
+Copyright Â© 2001-2004 World Wide Web Consortium, 
+(Massachusetts Institute of Technology, European Research Consortium 
+for Informatics and Mathematics, Keio University). All 
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the 
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even 
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['XPathEvaluator_createExpression_NAMESPACE_ERR_02'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+//   This function is called by the testing framework before
+//      running the test suite.
+//
+//   If there are no configuration exceptions, asynchronous
+//        document loading is started.  Otherwise, the status
+//        is set to complete and the exception is immediately
+//        raised when entering the body of the test.
+//
+function setUpPage() {
+   setUpPageStatus = 'running';
+   try {
+     //
+     //   creates test document builder, may throw exception
+     //
+     builder = createConfiguredBuilder();
+
+      docsLoaded = 0;
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      docsLoaded += preload(docRef, "doc", "staffNS");
+        
+       if (docsLoaded == 1) {
+          setUpPage = 'complete';
+       }
+    } catch(ex) {
+       catchInitializationError(builder, ex);
+        setUpPage = 'complete';
+    }
+}
+
+
+
+//
+//   This method is called on the completion of 
+//      each asychronous load started in setUpTests.
+//
+//   When every synchronous loaded document has completed,
+//      the page status is changed which allows the
+//      body of the test to be executed.
+function loadComplete() {
+    if (++docsLoaded == 1) {
+        setUpPageStatus = 'complete';
+    }
+}
+
+
+/**
+* 
+      The XPathEvaluator can create a "XPathExpression" using the method
+      "createExpression(expression, resolver)".
+      
+      Retrieve the DOM document on which the
+      'createExpression("/staff/jfouffa:employee", resolver)' method is
+      invoked with the document element. The method should fail to create
+      pre-compiled expression and throws DOMException.NAMESPACE_ERR
+      since the prefix jfouffa is not mapped.
+    
+* @author Philippe Le Hégaret
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#XPathEvaluator-createExpression
+*/
+function XPathEvaluator_createExpression_NAMESPACE_ERR_02() {
+   var success;
+    if(checkInitialization(builder, "XPathEvaluator_createExpression_NAMESPACE_ERR_02") != null) return;
+    var doc;
+      var xpEvaluator;
+      var exp;
+      var root;
+      var resolver;
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      doc = load(docRef, "doc", "staffNS");
+      xpEvaluator = createXPathEvaluator(doc);
+root = doc.documentElement;
+
+      resolver = xpEvaluator.createNSResolver(root);
+      
+       {
+               success = false;
+               try {
+            exp = xpEvaluator.createExpression("/staff/jfouffa:employee",resolver);
+        }
+               catch(ex) {
+      success = (typeof(ex.code) != 'undefined' && ex.code == 14);
+               }
+               assertTrue("throw_NAMESPACE_ERR",success);
+       }
+
+}
+
+
+
+
+function runTest() {
+   XPathEvaluator_createExpression_NAMESPACE_ERR_02();
+}
diff --git a/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createExpression_NAMESPACE_ERR_02.svg b/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createExpression_NAMESPACE_ERR_02.svg
new file mode 100644 (file)
index 0000000..031b464
--- /dev/null
@@ -0,0 +1,74 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>\r
+<!DOCTYPE svg PUBLIC "STAFF" "staffNS.dtd" \r
+[\r
+   <!ENTITY ent1 "es">\r
+   <!ENTITY ent2 "1900 Dallas Road">\r
+   <!ENTITY ent3 "Texas">\r
+   <!ENTITY ent4 "<entElement1 xmlns:local1='www.xyz.com'>Element data</entElement1><?PItarget PIdata?>">\r
+   <!ENTITY ent5 PUBLIC "entityURI" "entityFile" NDATA notation1>\r
+   <!ENTITY ent6 PUBLIC "uri" "file" NDATA notation2>\r
+   <!ENTITY ent1 "This entity should be discarded">\r
+   <!NOTATION notation1 PUBLIC "notation1File">\r
+   <!NOTATION notation2 SYSTEM "notation2File">\r
+   <!ELEMENT svg (rect, script, employee+, emp:employee, employee*)>\r
+   <!ATTLIST svg \r
+      xmlns CDATA #FIXED "http://www.w3.org/2000/svg"\r
+      name CDATA #IMPLIED>\r
+   <!ELEMENT rect EMPTY>\r
+   <!ATTLIST rect \r
+      x CDATA #REQUIRED\r
+      y CDATA #REQUIRED\r
+      width CDATA #REQUIRED\r
+      height CDATA #REQUIRED>\r
+  <!ELEMENT script (#PCDATA)>\r
+  <!ATTLIST script type CDATA #IMPLIED>      \r
+]>\r
+<!-- This is comment number 1.-->\r
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:nist="http://www.nist.gov"><rect x="0" y="0" width="100" height="100"/>\r
+<script xmlns="http://www.w3.org/1999/xhtml" src="XPathEvaluator_createExpression_NAMESPACE_ERR_02.js"/>\r
+<script xmlns="http://www.w3.org/1999/xhtml" src="svgunit.js"/>\r
+ <employee xmlns="http://www.nist.gov" xmlns:dmstc="http://www.usa.com">\r
+  <employeeId>EMP0001</employeeId>\r
+  <name>Margaret Martin</name>\r
+  <position>Accountant</position>           \r
+  <salary>56,000</salary>\r
+  <gender>Female</gender>\r
+  <address dmstc:domestic="Yes">1230 North Ave. Dallas, Texas 98551</address>\r
+ </employee>\r
+ <employee xmlns:dmstc="http://www.usa.com" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0002</employeeId>\r
+  <name>Martha Raynolds\r
+<![CDATA[This is a CDATASection with EntityReference number 2 &ent2;]]>\r
+<![CDATA[This is an adjacent CDATASection with a reference to a tab &tab;]]></name>\r
+  <position>Secretary</position>\r
+  <salary>35,000</salary>\r
+  <gender>Female</gender>\r
+  <address dmstc:domestic="Yes" street="Yes">&ent2; Dallas, &ent3;\r
+ 98554</address>\r
+ </employee>\r
+ <employee xmlns:dmstc="http://www.netzero.com" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0003</employeeId>\r
+  <name>Roger\r
+ Jones</name>\r
+  <position>Department Manager</position>\r
+  <salary>100,000</salary>\r
+  <gender>&ent4;</gender>\r
+  <address dmstc:domestic="Yes" street="No">PO Box 27 Irving, texas 98553</address>\r
+ </employee>\r
+ <emp:employee xmlns:emp="http://www.nist.gov" xmlns:nm="http://www.altavista.com" >    <emp:employeeId>EMP0004</emp:employeeId>\r
+  <nm:name>Jeny Oconnor</nm:name>\r
+  <emp:position>Personnel Director</emp:position>\r
+  <emp:salary>95,000</emp:salary>\r
+  <emp:gender>Female</emp:gender>\r
+  <emp:address emp:domestic="Yes" street="Y&ent1;" emp:zone="CANADA" emp:local1="TRUE">27 South Road. Dallas, texas 98556</emp:address>\r
+ </emp:employee>\r
+ <employee xmlns:emp2="http://www.nist.gov" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0005</employeeId>\r
+  <name>Robert Myers</name>\r
+  <position>Computer Specialist</position>\r
+  <salary>90,000</salary>\r
+  <gender>male</gender>\r
+  <address street="Yes" xmlns="http://www.nist.gov">1821 Nordic. Road, Irving Texas 98558</address>\r
+ </employee>\r
+ </svg>\r
\r
diff --git a/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createExpression_NS-expected.txt b/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createExpression_NS-expected.txt
new file mode 100644 (file)
index 0000000..c95ecbb
--- /dev/null
@@ -0,0 +1,7 @@
+layer at (0,0) size 800x600
+  RenderCanvas at (0,0) size 800x600
+    KCanvasContainer {svg} at (0,0) size 100x100
+      KCanvasItem {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00L100.00,0.00L100.00,100.00L0.00,100.00"]
+      RenderSVGText {text} at (0,0) size 785x18
+        RenderText {#text} at (0,0) size 303x18
+          text run at (0,0) width 303: "XPathEvaluator_createExpression_NS: Success"
diff --git a/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createExpression_NS.js b/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createExpression_NS.js
new file mode 100644 (file)
index 0000000..db895d4
--- /dev/null
@@ -0,0 +1,114 @@
+
+/*
+Copyright Â© 2001-2004 World Wide Web Consortium, 
+(Massachusetts Institute of Technology, European Research Consortium 
+for Informatics and Mathematics, Keio University). All 
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the 
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even 
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['XPathEvaluator_createExpression_NS'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+//   This function is called by the testing framework before
+//      running the test suite.
+//
+//   If there are no configuration exceptions, asynchronous
+//        document loading is started.  Otherwise, the status
+//        is set to complete and the exception is immediately
+//        raised when entering the body of the test.
+//
+function setUpPage() {
+   setUpPageStatus = 'running';
+   try {
+     //
+     //   creates test document builder, may throw exception
+     //
+     builder = createConfiguredBuilder();
+
+      docsLoaded = 0;
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      docsLoaded += preload(docRef, "doc", "staffNS");
+        
+       if (docsLoaded == 1) {
+          setUpPage = 'complete';
+       }
+    } catch(ex) {
+       catchInitializationError(builder, ex);
+        setUpPage = 'complete';
+    }
+}
+
+
+
+//
+//   This method is called on the completion of 
+//      each asychronous load started in setUpTests.
+//
+//   When every synchronous loaded document has completed,
+//      the page status is changed which allows the
+//      body of the test to be executed.
+function loadComplete() {
+    if (++docsLoaded == 1) {
+        setUpPageStatus = 'complete';
+    }
+}
+
+
+/**
+* 
+      The XPathEvaluator can create a "XPathExpression" using the method
+      "createExpression(expression, resolver)".
+      
+      Retrieve the DOM document on which the
+      'createExpression("/staff/nist:employee", resolver)' method is
+      invoked with the document element.  The method should return a
+      pre-compiled expression.
+    
+* @author Philippe Le Hégaret
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#XPathEvaluator-createExpression
+*/
+function XPathEvaluator_createExpression_NS() {
+   var success;
+    if(checkInitialization(builder, "XPathEvaluator_createExpression_NS") != null) return;
+    var doc;
+      var xpEvaluator;
+      var exp;
+      var root;
+      var resolver;
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      doc = load(docRef, "doc", "staffNS");
+      xpEvaluator = createXPathEvaluator(doc);
+root = doc.documentElement;
+
+      resolver = xpEvaluator.createNSResolver(root);
+      exp = xpEvaluator.createExpression("/staff/nist:employee",resolver);
+      assertNotNull("notnull",exp);
+
+}
+
+
+
+
+function runTest() {
+   XPathEvaluator_createExpression_NS();
+}
diff --git a/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createExpression_NS.svg b/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createExpression_NS.svg
new file mode 100644 (file)
index 0000000..08710f1
--- /dev/null
@@ -0,0 +1,74 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>\r
+<!DOCTYPE svg PUBLIC "STAFF" "staffNS.dtd" \r
+[\r
+   <!ENTITY ent1 "es">\r
+   <!ENTITY ent2 "1900 Dallas Road">\r
+   <!ENTITY ent3 "Texas">\r
+   <!ENTITY ent4 "<entElement1 xmlns:local1='www.xyz.com'>Element data</entElement1><?PItarget PIdata?>">\r
+   <!ENTITY ent5 PUBLIC "entityURI" "entityFile" NDATA notation1>\r
+   <!ENTITY ent6 PUBLIC "uri" "file" NDATA notation2>\r
+   <!ENTITY ent1 "This entity should be discarded">\r
+   <!NOTATION notation1 PUBLIC "notation1File">\r
+   <!NOTATION notation2 SYSTEM "notation2File">\r
+   <!ELEMENT svg (rect, script, employee+, emp:employee, employee*)>\r
+   <!ATTLIST svg \r
+      xmlns CDATA #FIXED "http://www.w3.org/2000/svg"\r
+      name CDATA #IMPLIED>\r
+   <!ELEMENT rect EMPTY>\r
+   <!ATTLIST rect \r
+      x CDATA #REQUIRED\r
+      y CDATA #REQUIRED\r
+      width CDATA #REQUIRED\r
+      height CDATA #REQUIRED>\r
+  <!ELEMENT script (#PCDATA)>\r
+  <!ATTLIST script type CDATA #IMPLIED>      \r
+]>\r
+<!-- This is comment number 1.-->\r
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:nist="http://www.nist.gov"><rect x="0" y="0" width="100" height="100"/>\r
+<script xmlns="http://www.w3.org/1999/xhtml" src="XPathEvaluator_createExpression_NS.js"/>\r
+<script xmlns="http://www.w3.org/1999/xhtml" src="svgunit.js"/>\r
+ <employee xmlns="http://www.nist.gov" xmlns:dmstc="http://www.usa.com">\r
+  <employeeId>EMP0001</employeeId>\r
+  <name>Margaret Martin</name>\r
+  <position>Accountant</position>           \r
+  <salary>56,000</salary>\r
+  <gender>Female</gender>\r
+  <address dmstc:domestic="Yes">1230 North Ave. Dallas, Texas 98551</address>\r
+ </employee>\r
+ <employee xmlns:dmstc="http://www.usa.com" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0002</employeeId>\r
+  <name>Martha Raynolds\r
+<![CDATA[This is a CDATASection with EntityReference number 2 &ent2;]]>\r
+<![CDATA[This is an adjacent CDATASection with a reference to a tab &tab;]]></name>\r
+  <position>Secretary</position>\r
+  <salary>35,000</salary>\r
+  <gender>Female</gender>\r
+  <address dmstc:domestic="Yes" street="Yes">&ent2; Dallas, &ent3;\r
+ 98554</address>\r
+ </employee>\r
+ <employee xmlns:dmstc="http://www.netzero.com" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0003</employeeId>\r
+  <name>Roger\r
+ Jones</name>\r
+  <position>Department Manager</position>\r
+  <salary>100,000</salary>\r
+  <gender>&ent4;</gender>\r
+  <address dmstc:domestic="Yes" street="No">PO Box 27 Irving, texas 98553</address>\r
+ </employee>\r
+ <emp:employee xmlns:emp="http://www.nist.gov" xmlns:nm="http://www.altavista.com" >    <emp:employeeId>EMP0004</emp:employeeId>\r
+  <nm:name>Jeny Oconnor</nm:name>\r
+  <emp:position>Personnel Director</emp:position>\r
+  <emp:salary>95,000</emp:salary>\r
+  <emp:gender>Female</emp:gender>\r
+  <emp:address emp:domestic="Yes" street="Y&ent1;" emp:zone="CANADA" emp:local1="TRUE">27 South Road. Dallas, texas 98556</emp:address>\r
+ </emp:employee>\r
+ <employee xmlns:emp2="http://www.nist.gov" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0005</employeeId>\r
+  <name>Robert Myers</name>\r
+  <position>Computer Specialist</position>\r
+  <salary>90,000</salary>\r
+  <gender>male</gender>\r
+  <address street="Yes" xmlns="http://www.nist.gov">1821 Nordic. Road, Irving Texas 98558</address>\r
+ </employee>\r
+ </svg>\r
\r
diff --git a/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createExpression_no_NS-expected.txt b/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createExpression_no_NS-expected.txt
new file mode 100644 (file)
index 0000000..14e7632
--- /dev/null
@@ -0,0 +1,7 @@
+layer at (0,0) size 800x600
+  RenderCanvas at (0,0) size 800x600
+    KCanvasContainer {svg} at (0,0) size 100x100
+      KCanvasItem {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00L100.00,0.00L100.00,100.00L0.00,100.00"]
+      RenderSVGText {text} at (0,0) size 785x18
+        RenderText {#text} at (0,0) size 327x18
+          text run at (0,0) width 327: "XPathEvaluator_createExpression_no_NS: Success"
diff --git a/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createExpression_no_NS.js b/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createExpression_no_NS.js
new file mode 100644 (file)
index 0000000..b188c6e
--- /dev/null
@@ -0,0 +1,110 @@
+
+/*
+Copyright Â© 2001-2004 World Wide Web Consortium, 
+(Massachusetts Institute of Technology, European Research Consortium 
+for Informatics and Mathematics, Keio University). All 
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the 
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even 
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['XPathEvaluator_createExpression_no_NS'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+//   This function is called by the testing framework before
+//      running the test suite.
+//
+//   If there are no configuration exceptions, asynchronous
+//        document loading is started.  Otherwise, the status
+//        is set to complete and the exception is immediately
+//        raised when entering the body of the test.
+//
+function setUpPage() {
+   setUpPageStatus = 'running';
+   try {
+     //
+     //   creates test document builder, may throw exception
+     //
+     builder = createConfiguredBuilder();
+
+      docsLoaded = 0;
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      docsLoaded += preload(docRef, "doc", "staffNS");
+        
+       if (docsLoaded == 1) {
+          setUpPage = 'complete';
+       }
+    } catch(ex) {
+       catchInitializationError(builder, ex);
+        setUpPage = 'complete';
+    }
+}
+
+
+
+//
+//   This method is called on the completion of 
+//      each asychronous load started in setUpTests.
+//
+//   When every synchronous loaded document has completed,
+//      the page status is changed which allows the
+//      body of the test to be executed.
+function loadComplete() {
+    if (++docsLoaded == 1) {
+        setUpPageStatus = 'complete';
+    }
+}
+
+
+/**
+* 
+      The XPathEvaluator can create a "XPathExpression" using the method
+      "createExpression(expression, resolver)".
+      
+      Retrieve the DOM document on which the
+      "createExpression("/", null)" method is invoked with the document
+      element. The method should return a pre-compiled expression.
+    
+* @author Philippe Le Hégaret
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#XPathEvaluator-createExpression
+*/
+function XPathEvaluator_createExpression_no_NS() {
+   var success;
+    if(checkInitialization(builder, "XPathEvaluator_createExpression_no_NS") != null) return;
+    var doc;
+      var xpEvaluator;
+      var nullNSResolver = null;
+
+      var exp;
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      doc = load(docRef, "doc", "staffNS");
+      xpEvaluator = createXPathEvaluator(doc);
+exp = xpEvaluator.createExpression("/",nullNSResolver);
+      assertNotNull("notnull",exp);
+
+}
+
+
+
+
+function runTest() {
+   XPathEvaluator_createExpression_no_NS();
+}
diff --git a/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createExpression_no_NS.svg b/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createExpression_no_NS.svg
new file mode 100644 (file)
index 0000000..fdfca3b
--- /dev/null
@@ -0,0 +1,74 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>\r
+<!DOCTYPE svg PUBLIC "STAFF" "staffNS.dtd" \r
+[\r
+   <!ENTITY ent1 "es">\r
+   <!ENTITY ent2 "1900 Dallas Road">\r
+   <!ENTITY ent3 "Texas">\r
+   <!ENTITY ent4 "<entElement1 xmlns:local1='www.xyz.com'>Element data</entElement1><?PItarget PIdata?>">\r
+   <!ENTITY ent5 PUBLIC "entityURI" "entityFile" NDATA notation1>\r
+   <!ENTITY ent6 PUBLIC "uri" "file" NDATA notation2>\r
+   <!ENTITY ent1 "This entity should be discarded">\r
+   <!NOTATION notation1 PUBLIC "notation1File">\r
+   <!NOTATION notation2 SYSTEM "notation2File">\r
+   <!ELEMENT svg (rect, script, employee+, emp:employee, employee*)>\r
+   <!ATTLIST svg \r
+      xmlns CDATA #FIXED "http://www.w3.org/2000/svg"\r
+      name CDATA #IMPLIED>\r
+   <!ELEMENT rect EMPTY>\r
+   <!ATTLIST rect \r
+      x CDATA #REQUIRED\r
+      y CDATA #REQUIRED\r
+      width CDATA #REQUIRED\r
+      height CDATA #REQUIRED>\r
+  <!ELEMENT script (#PCDATA)>\r
+  <!ATTLIST script type CDATA #IMPLIED>      \r
+]>\r
+<!-- This is comment number 1.-->\r
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:nist="http://www.nist.gov"><rect x="0" y="0" width="100" height="100"/>\r
+<script xmlns="http://www.w3.org/1999/xhtml" src="XPathEvaluator_createExpression_no_NS.js"/>\r
+<script xmlns="http://www.w3.org/1999/xhtml" src="svgunit.js"/>\r
+ <employee xmlns="http://www.nist.gov" xmlns:dmstc="http://www.usa.com">\r
+  <employeeId>EMP0001</employeeId>\r
+  <name>Margaret Martin</name>\r
+  <position>Accountant</position>           \r
+  <salary>56,000</salary>\r
+  <gender>Female</gender>\r
+  <address dmstc:domestic="Yes">1230 North Ave. Dallas, Texas 98551</address>\r
+ </employee>\r
+ <employee xmlns:dmstc="http://www.usa.com" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0002</employeeId>\r
+  <name>Martha Raynolds\r
+<![CDATA[This is a CDATASection with EntityReference number 2 &ent2;]]>\r
+<![CDATA[This is an adjacent CDATASection with a reference to a tab &tab;]]></name>\r
+  <position>Secretary</position>\r
+  <salary>35,000</salary>\r
+  <gender>Female</gender>\r
+  <address dmstc:domestic="Yes" street="Yes">&ent2; Dallas, &ent3;\r
+ 98554</address>\r
+ </employee>\r
+ <employee xmlns:dmstc="http://www.netzero.com" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0003</employeeId>\r
+  <name>Roger\r
+ Jones</name>\r
+  <position>Department Manager</position>\r
+  <salary>100,000</salary>\r
+  <gender>&ent4;</gender>\r
+  <address dmstc:domestic="Yes" street="No">PO Box 27 Irving, texas 98553</address>\r
+ </employee>\r
+ <emp:employee xmlns:emp="http://www.nist.gov" xmlns:nm="http://www.altavista.com" >    <emp:employeeId>EMP0004</emp:employeeId>\r
+  <nm:name>Jeny Oconnor</nm:name>\r
+  <emp:position>Personnel Director</emp:position>\r
+  <emp:salary>95,000</emp:salary>\r
+  <emp:gender>Female</emp:gender>\r
+  <emp:address emp:domestic="Yes" street="Y&ent1;" emp:zone="CANADA" emp:local1="TRUE">27 South Road. Dallas, texas 98556</emp:address>\r
+ </emp:employee>\r
+ <employee xmlns:emp2="http://www.nist.gov" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0005</employeeId>\r
+  <name>Robert Myers</name>\r
+  <position>Computer Specialist</position>\r
+  <salary>90,000</salary>\r
+  <gender>male</gender>\r
+  <address street="Yes" xmlns="http://www.nist.gov">1821 Nordic. Road, Irving Texas 98558</address>\r
+ </employee>\r
+ </svg>\r
\r
diff --git a/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createNSResolver_all-expected.txt b/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createNSResolver_all-expected.txt
new file mode 100644 (file)
index 0000000..bc12906
--- /dev/null
@@ -0,0 +1,7 @@
+layer at (0,0) size 800x600
+  RenderCanvas at (0,0) size 800x600
+    KCanvasContainer {svg} at (0,0) size 100x100
+      KCanvasItem {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00L100.00,0.00L100.00,100.00L0.00,100.00"]
+      RenderSVGText {text} at (0,0) size 785x18
+        RenderText {#text} at (0,0) size 304x18
+          text run at (0,0) width 304: "XPathEvaluator_createNSResolver_all: Success"
diff --git a/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createNSResolver_all.js b/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createNSResolver_all.js
new file mode 100644 (file)
index 0000000..088fe27
--- /dev/null
@@ -0,0 +1,140 @@
+
+/*
+Copyright Â© 2001-2004 World Wide Web Consortium, 
+(Massachusetts Institute of Technology, European Research Consortium 
+for Informatics and Mathematics, Keio University). All 
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the 
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even 
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['XPathEvaluator_createNSResolver_all'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+//   This function is called by the testing framework before
+//      running the test suite.
+//
+//   If there are no configuration exceptions, asynchronous
+//        document loading is started.  Otherwise, the status
+//        is set to complete and the exception is immediately
+//        raised when entering the body of the test.
+//
+function setUpPage() {
+   setUpPageStatus = 'running';
+   try {
+     //
+     //   creates test document builder, may throw exception
+     //
+     builder = createConfiguredBuilder();
+
+      docsLoaded = 0;
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      docsLoaded += preload(docRef, "doc", "staffNS");
+        
+       if (docsLoaded == 1) {
+          setUpPage = 'complete';
+       }
+    } catch(ex) {
+       catchInitializationError(builder, ex);
+        setUpPage = 'complete';
+    }
+}
+
+
+
+//
+//   This method is called on the completion of 
+//      each asychronous load started in setUpTests.
+//
+//   When every synchronous loaded document has completed,
+//      the page status is changed which allows the
+//      body of the test to be executed.
+function loadComplete() {
+    if (++docsLoaded == 1) {
+        setUpPageStatus = 'complete';
+    }
+}
+
+
+/**
+* 
+      Iterate over all nodes in the test document, creating
+      XPathNSResolvers checking that none return a null object.
+    
+* @author Bob Clary
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#XPathEvaluator
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#XPathEvaluator-createNSResolver
+*/
+function XPathEvaluator_createNSResolver_all() {
+   var success;
+    if(checkInitialization(builder, "XPathEvaluator_createNSResolver_all") != null) return;
+    var doc;
+      var staff;
+      var staffchildren;
+      var staffchild;
+      var staffgrandchildren;
+      var staffgrandchild;
+      var staffgreatgrandchildren;
+      var staffgreatgrandchild;
+      var resolver;
+      var evaluator;
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      doc = load(docRef, "doc", "staffNS");
+      evaluator = createXPathEvaluator(doc);
+resolver = evaluator.createNSResolver(doc);
+      assertNotNull("documentnotnull",resolver);
+staff = doc.documentElement;
+
+      resolver = evaluator.createNSResolver(staff);
+      assertNotNull("documentElementnotnull",resolver);
+staffchildren = staff.childNodes;
+
+      for(var indexN65644 = 0;indexN65644 < staffchildren.length; indexN65644++) {
+      staffchild = staffchildren.item(indexN65644);
+      resolver = evaluator.createNSResolver(staffchild);
+      assertNotNull("staffchildnotnull",resolver);
+staffgrandchildren = staffchild.childNodes;
+
+      for(var indexN65661 = 0;indexN65661 < staffgrandchildren.length; indexN65661++) {
+      staffgrandchild = staffgrandchildren.item(indexN65661);
+      resolver = evaluator.createNSResolver(staffgrandchild);
+      assertNotNull("staffgrandchildnotnull",resolver);
+staffgreatgrandchildren = staffgrandchild.childNodes;
+
+      for(var indexN65678 = 0;indexN65678 < staffgreatgrandchildren.length; indexN65678++) {
+      staffgreatgrandchild = staffgreatgrandchildren.item(indexN65678);
+      resolver = evaluator.createNSResolver(staffgreatgrandchild);
+      assertNotNull("staffgreatgrandchildnotnull",resolver);
+
+       }
+   
+       }
+   
+       }
+   
+}
+
+
+
+
+function runTest() {
+   XPathEvaluator_createNSResolver_all();
+}
diff --git a/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createNSResolver_all.svg b/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createNSResolver_all.svg
new file mode 100644 (file)
index 0000000..a9668ea
--- /dev/null
@@ -0,0 +1,74 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>\r
+<!DOCTYPE svg PUBLIC "STAFF" "staffNS.dtd" \r
+[\r
+   <!ENTITY ent1 "es">\r
+   <!ENTITY ent2 "1900 Dallas Road">\r
+   <!ENTITY ent3 "Texas">\r
+   <!ENTITY ent4 "<entElement1 xmlns:local1='www.xyz.com'>Element data</entElement1><?PItarget PIdata?>">\r
+   <!ENTITY ent5 PUBLIC "entityURI" "entityFile" NDATA notation1>\r
+   <!ENTITY ent6 PUBLIC "uri" "file" NDATA notation2>\r
+   <!ENTITY ent1 "This entity should be discarded">\r
+   <!NOTATION notation1 PUBLIC "notation1File">\r
+   <!NOTATION notation2 SYSTEM "notation2File">\r
+   <!ELEMENT svg (rect, script, employee+, emp:employee, employee*)>\r
+   <!ATTLIST svg \r
+      xmlns CDATA #FIXED "http://www.w3.org/2000/svg"\r
+      name CDATA #IMPLIED>\r
+   <!ELEMENT rect EMPTY>\r
+   <!ATTLIST rect \r
+      x CDATA #REQUIRED\r
+      y CDATA #REQUIRED\r
+      width CDATA #REQUIRED\r
+      height CDATA #REQUIRED>\r
+  <!ELEMENT script (#PCDATA)>\r
+  <!ATTLIST script type CDATA #IMPLIED>      \r
+]>\r
+<!-- This is comment number 1.-->\r
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:nist="http://www.nist.gov"><rect x="0" y="0" width="100" height="100"/>\r
+<script xmlns="http://www.w3.org/1999/xhtml" src="XPathEvaluator_createNSResolver_all.js"/>\r
+<script xmlns="http://www.w3.org/1999/xhtml" src="svgunit.js"/>\r
+ <employee xmlns="http://www.nist.gov" xmlns:dmstc="http://www.usa.com">\r
+  <employeeId>EMP0001</employeeId>\r
+  <name>Margaret Martin</name>\r
+  <position>Accountant</position>           \r
+  <salary>56,000</salary>\r
+  <gender>Female</gender>\r
+  <address dmstc:domestic="Yes">1230 North Ave. Dallas, Texas 98551</address>\r
+ </employee>\r
+ <employee xmlns:dmstc="http://www.usa.com" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0002</employeeId>\r
+  <name>Martha Raynolds\r
+<![CDATA[This is a CDATASection with EntityReference number 2 &ent2;]]>\r
+<![CDATA[This is an adjacent CDATASection with a reference to a tab &tab;]]></name>\r
+  <position>Secretary</position>\r
+  <salary>35,000</salary>\r
+  <gender>Female</gender>\r
+  <address dmstc:domestic="Yes" street="Yes">&ent2; Dallas, &ent3;\r
+ 98554</address>\r
+ </employee>\r
+ <employee xmlns:dmstc="http://www.netzero.com" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0003</employeeId>\r
+  <name>Roger\r
+ Jones</name>\r
+  <position>Department Manager</position>\r
+  <salary>100,000</salary>\r
+  <gender>&ent4;</gender>\r
+  <address dmstc:domestic="Yes" street="No">PO Box 27 Irving, texas 98553</address>\r
+ </employee>\r
+ <emp:employee xmlns:emp="http://www.nist.gov" xmlns:nm="http://www.altavista.com" >    <emp:employeeId>EMP0004</emp:employeeId>\r
+  <nm:name>Jeny Oconnor</nm:name>\r
+  <emp:position>Personnel Director</emp:position>\r
+  <emp:salary>95,000</emp:salary>\r
+  <emp:gender>Female</emp:gender>\r
+  <emp:address emp:domestic="Yes" street="Y&ent1;" emp:zone="CANADA" emp:local1="TRUE">27 South Road. Dallas, texas 98556</emp:address>\r
+ </emp:employee>\r
+ <employee xmlns:emp2="http://www.nist.gov" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0005</employeeId>\r
+  <name>Robert Myers</name>\r
+  <position>Computer Specialist</position>\r
+  <salary>90,000</salary>\r
+  <gender>male</gender>\r
+  <address street="Yes" xmlns="http://www.nist.gov">1821 Nordic. Road, Irving Texas 98558</address>\r
+ </employee>\r
+ </svg>\r
\r
diff --git a/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createNSResolver_document-expected.txt b/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createNSResolver_document-expected.txt
new file mode 100644 (file)
index 0000000..f77d0d4
--- /dev/null
@@ -0,0 +1,7 @@
+layer at (0,0) size 800x600
+  RenderCanvas at (0,0) size 800x600
+    KCanvasContainer {svg} at (0,0) size 100x100
+      KCanvasItem {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00L100.00,0.00L100.00,100.00L0.00,100.00"]
+      RenderSVGText {text} at (0,0) size 785x18
+        RenderText {#text} at (0,0) size 351x18
+          text run at (0,0) width 351: "XPathEvaluator_createNSResolver_document: Success"
diff --git a/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createNSResolver_document.js b/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createNSResolver_document.js
new file mode 100644 (file)
index 0000000..7b16d2d
--- /dev/null
@@ -0,0 +1,108 @@
+
+/*
+Copyright Â© 2001-2004 World Wide Web Consortium, 
+(Massachusetts Institute of Technology, European Research Consortium 
+for Informatics and Mathematics, Keio University). All 
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the 
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even 
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['XPathEvaluator_createNSResolver_document'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+//   This function is called by the testing framework before
+//      running the test suite.
+//
+//   If there are no configuration exceptions, asynchronous
+//        document loading is started.  Otherwise, the status
+//        is set to complete and the exception is immediately
+//        raised when entering the body of the test.
+//
+function setUpPage() {
+   setUpPageStatus = 'running';
+   try {
+     //
+     //   creates test document builder, may throw exception
+     //
+     builder = createConfiguredBuilder();
+
+      docsLoaded = 0;
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      docsLoaded += preload(docRef, "doc", "staffNS");
+        
+       if (docsLoaded == 1) {
+          setUpPage = 'complete';
+       }
+    } catch(ex) {
+       catchInitializationError(builder, ex);
+        setUpPage = 'complete';
+    }
+}
+
+
+
+//
+//   This method is called on the completion of 
+//      each asychronous load started in setUpTests.
+//
+//   When every synchronous loaded document has completed,
+//      the page status is changed which allows the
+//      body of the test to be executed.
+function loadComplete() {
+    if (++docsLoaded == 1) {
+        setUpPageStatus = 'complete';
+    }
+}
+
+
+/**
+* 
+      The XPathEvaluator can create "XPathNSResolver" using the method
+      "createNSResolver(nodeResolver)".
+      
+      Retrieve the DOM document on which the
+      "createNSResolver(nodeResolver)" method is invoked with the document
+      itself. The method should return a resolver.
+    
+* @author Philippe Le Hégaret
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#XPathEvaluator-createNSResolver
+*/
+function XPathEvaluator_createNSResolver_document() {
+   var success;
+    if(checkInitialization(builder, "XPathEvaluator_createNSResolver_document") != null) return;
+    var doc;
+      var xpEvaluator;
+      var resolver;
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      doc = load(docRef, "doc", "staffNS");
+      xpEvaluator = createXPathEvaluator(doc);
+resolver = xpEvaluator.createNSResolver(doc);
+      assertNotNull("notnull",resolver);
+
+}
+
+
+
+
+function runTest() {
+   XPathEvaluator_createNSResolver_document();
+}
diff --git a/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createNSResolver_document.svg b/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createNSResolver_document.svg
new file mode 100644 (file)
index 0000000..235e45e
--- /dev/null
@@ -0,0 +1,74 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>\r
+<!DOCTYPE svg PUBLIC "STAFF" "staffNS.dtd" \r
+[\r
+   <!ENTITY ent1 "es">\r
+   <!ENTITY ent2 "1900 Dallas Road">\r
+   <!ENTITY ent3 "Texas">\r
+   <!ENTITY ent4 "<entElement1 xmlns:local1='www.xyz.com'>Element data</entElement1><?PItarget PIdata?>">\r
+   <!ENTITY ent5 PUBLIC "entityURI" "entityFile" NDATA notation1>\r
+   <!ENTITY ent6 PUBLIC "uri" "file" NDATA notation2>\r
+   <!ENTITY ent1 "This entity should be discarded">\r
+   <!NOTATION notation1 PUBLIC "notation1File">\r
+   <!NOTATION notation2 SYSTEM "notation2File">\r
+   <!ELEMENT svg (rect, script, employee+, emp:employee, employee*)>\r
+   <!ATTLIST svg \r
+      xmlns CDATA #FIXED "http://www.w3.org/2000/svg"\r
+      name CDATA #IMPLIED>\r
+   <!ELEMENT rect EMPTY>\r
+   <!ATTLIST rect \r
+      x CDATA #REQUIRED\r
+      y CDATA #REQUIRED\r
+      width CDATA #REQUIRED\r
+      height CDATA #REQUIRED>\r
+  <!ELEMENT script (#PCDATA)>\r
+  <!ATTLIST script type CDATA #IMPLIED>      \r
+]>\r
+<!-- This is comment number 1.-->\r
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:nist="http://www.nist.gov"><rect x="0" y="0" width="100" height="100"/>\r
+<script xmlns="http://www.w3.org/1999/xhtml" src="XPathEvaluator_createNSResolver_document.js"/>\r
+<script xmlns="http://www.w3.org/1999/xhtml" src="svgunit.js"/>\r
+ <employee xmlns="http://www.nist.gov" xmlns:dmstc="http://www.usa.com">\r
+  <employeeId>EMP0001</employeeId>\r
+  <name>Margaret Martin</name>\r
+  <position>Accountant</position>           \r
+  <salary>56,000</salary>\r
+  <gender>Female</gender>\r
+  <address dmstc:domestic="Yes">1230 North Ave. Dallas, Texas 98551</address>\r
+ </employee>\r
+ <employee xmlns:dmstc="http://www.usa.com" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0002</employeeId>\r
+  <name>Martha Raynolds\r
+<![CDATA[This is a CDATASection with EntityReference number 2 &ent2;]]>\r
+<![CDATA[This is an adjacent CDATASection with a reference to a tab &tab;]]></name>\r
+  <position>Secretary</position>\r
+  <salary>35,000</salary>\r
+  <gender>Female</gender>\r
+  <address dmstc:domestic="Yes" street="Yes">&ent2; Dallas, &ent3;\r
+ 98554</address>\r
+ </employee>\r
+ <employee xmlns:dmstc="http://www.netzero.com" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0003</employeeId>\r
+  <name>Roger\r
+ Jones</name>\r
+  <position>Department Manager</position>\r
+  <salary>100,000</salary>\r
+  <gender>&ent4;</gender>\r
+  <address dmstc:domestic="Yes" street="No">PO Box 27 Irving, texas 98553</address>\r
+ </employee>\r
+ <emp:employee xmlns:emp="http://www.nist.gov" xmlns:nm="http://www.altavista.com" >    <emp:employeeId>EMP0004</emp:employeeId>\r
+  <nm:name>Jeny Oconnor</nm:name>\r
+  <emp:position>Personnel Director</emp:position>\r
+  <emp:salary>95,000</emp:salary>\r
+  <emp:gender>Female</emp:gender>\r
+  <emp:address emp:domestic="Yes" street="Y&ent1;" emp:zone="CANADA" emp:local1="TRUE">27 South Road. Dallas, texas 98556</emp:address>\r
+ </emp:employee>\r
+ <employee xmlns:emp2="http://www.nist.gov" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0005</employeeId>\r
+  <name>Robert Myers</name>\r
+  <position>Computer Specialist</position>\r
+  <salary>90,000</salary>\r
+  <gender>male</gender>\r
+  <address street="Yes" xmlns="http://www.nist.gov">1821 Nordic. Road, Irving Texas 98558</address>\r
+ </employee>\r
+ </svg>\r
\r
diff --git a/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createNSResolver_documentElement-expected.txt b/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createNSResolver_documentElement-expected.txt
new file mode 100644 (file)
index 0000000..6952b89
--- /dev/null
@@ -0,0 +1,7 @@
+layer at (0,0) size 800x600
+  RenderCanvas at (0,0) size 800x600
+    KCanvasContainer {svg} at (0,0) size 100x100
+      KCanvasItem {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00L100.00,0.00L100.00,100.00L0.00,100.00"]
+      RenderSVGText {text} at (0,0) size 785x18
+        RenderText {#text} at (0,0) size 403x18
+          text run at (0,0) width 403: "XPathEvaluator_createNSResolver_documentElement: Success"
diff --git a/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createNSResolver_documentElement.js b/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createNSResolver_documentElement.js
new file mode 100644 (file)
index 0000000..cfe412a
--- /dev/null
@@ -0,0 +1,111 @@
+
+/*
+Copyright Â© 2001-2004 World Wide Web Consortium, 
+(Massachusetts Institute of Technology, European Research Consortium 
+for Informatics and Mathematics, Keio University). All 
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the 
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even 
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['XPathEvaluator_createNSResolver_documentElement'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+//   This function is called by the testing framework before
+//      running the test suite.
+//
+//   If there are no configuration exceptions, asynchronous
+//        document loading is started.  Otherwise, the status
+//        is set to complete and the exception is immediately
+//        raised when entering the body of the test.
+//
+function setUpPage() {
+   setUpPageStatus = 'running';
+   try {
+     //
+     //   creates test document builder, may throw exception
+     //
+     builder = createConfiguredBuilder();
+
+      docsLoaded = 0;
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      docsLoaded += preload(docRef, "doc", "staffNS");
+        
+       if (docsLoaded == 1) {
+          setUpPage = 'complete';
+       }
+    } catch(ex) {
+       catchInitializationError(builder, ex);
+        setUpPage = 'complete';
+    }
+}
+
+
+
+//
+//   This method is called on the completion of 
+//      each asychronous load started in setUpTests.
+//
+//   When every synchronous loaded document has completed,
+//      the page status is changed which allows the
+//      body of the test to be executed.
+function loadComplete() {
+    if (++docsLoaded == 1) {
+        setUpPageStatus = 'complete';
+    }
+}
+
+
+/**
+* 
+      The XPathEvaluator can create "XPathNSResolver" using the method
+      "createNSResolver(nodeResolver)".
+      
+      Retrieve the DOM document on which the
+      "createNSResolver(nodeResolver)" method is invoked with the document
+      element.  The method should return a resolver.
+    
+* @author Philippe Le Hégaret
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#XPathEvaluator-createNSResolver
+*/
+function XPathEvaluator_createNSResolver_documentElement() {
+   var success;
+    if(checkInitialization(builder, "XPathEvaluator_createNSResolver_documentElement") != null) return;
+    var doc;
+      var xpEvaluator;
+      var resolver;
+      var root;
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      doc = load(docRef, "doc", "staffNS");
+      xpEvaluator = createXPathEvaluator(doc);
+root = doc.documentElement;
+
+      resolver = xpEvaluator.createNSResolver(root);
+      assertNotNull("notnull",resolver);
+
+}
+
+
+
+
+function runTest() {
+   XPathEvaluator_createNSResolver_documentElement();
+}
diff --git a/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createNSResolver_documentElement.svg b/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_createNSResolver_documentElement.svg
new file mode 100644 (file)
index 0000000..de81d57
--- /dev/null
@@ -0,0 +1,74 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>\r
+<!DOCTYPE svg PUBLIC "STAFF" "staffNS.dtd" \r
+[\r
+   <!ENTITY ent1 "es">\r
+   <!ENTITY ent2 "1900 Dallas Road">\r
+   <!ENTITY ent3 "Texas">\r
+   <!ENTITY ent4 "<entElement1 xmlns:local1='www.xyz.com'>Element data</entElement1><?PItarget PIdata?>">\r
+   <!ENTITY ent5 PUBLIC "entityURI" "entityFile" NDATA notation1>\r
+   <!ENTITY ent6 PUBLIC "uri" "file" NDATA notation2>\r
+   <!ENTITY ent1 "This entity should be discarded">\r
+   <!NOTATION notation1 PUBLIC "notation1File">\r
+   <!NOTATION notation2 SYSTEM "notation2File">\r
+   <!ELEMENT svg (rect, script, employee+, emp:employee, employee*)>\r
+   <!ATTLIST svg \r
+      xmlns CDATA #FIXED "http://www.w3.org/2000/svg"\r
+      name CDATA #IMPLIED>\r
+   <!ELEMENT rect EMPTY>\r
+   <!ATTLIST rect \r
+      x CDATA #REQUIRED\r
+      y CDATA #REQUIRED\r
+      width CDATA #REQUIRED\r
+      height CDATA #REQUIRED>\r
+  <!ELEMENT script (#PCDATA)>\r
+  <!ATTLIST script type CDATA #IMPLIED>      \r
+]>\r
+<!-- This is comment number 1.-->\r
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:nist="http://www.nist.gov"><rect x="0" y="0" width="100" height="100"/>\r
+<script xmlns="http://www.w3.org/1999/xhtml" src="XPathEvaluator_createNSResolver_documentElement.js"/>\r
+<script xmlns="http://www.w3.org/1999/xhtml" src="svgunit.js"/>\r
+ <employee xmlns="http://www.nist.gov" xmlns:dmstc="http://www.usa.com">\r
+  <employeeId>EMP0001</employeeId>\r
+  <name>Margaret Martin</name>\r
+  <position>Accountant</position>           \r
+  <salary>56,000</salary>\r
+  <gender>Female</gender>\r
+  <address dmstc:domestic="Yes">1230 North Ave. Dallas, Texas 98551</address>\r
+ </employee>\r
+ <employee xmlns:dmstc="http://www.usa.com" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0002</employeeId>\r
+  <name>Martha Raynolds\r
+<![CDATA[This is a CDATASection with EntityReference number 2 &ent2;]]>\r
+<![CDATA[This is an adjacent CDATASection with a reference to a tab &tab;]]></name>\r
+  <position>Secretary</position>\r
+  <salary>35,000</salary>\r
+  <gender>Female</gender>\r
+  <address dmstc:domestic="Yes" street="Yes">&ent2; Dallas, &ent3;\r
+ 98554</address>\r
+ </employee>\r
+ <employee xmlns:dmstc="http://www.netzero.com" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0003</employeeId>\r
+  <name>Roger\r
+ Jones</name>\r
+  <position>Department Manager</position>\r
+  <salary>100,000</salary>\r
+  <gender>&ent4;</gender>\r
+  <address dmstc:domestic="Yes" street="No">PO Box 27 Irving, texas 98553</address>\r
+ </employee>\r
+ <emp:employee xmlns:emp="http://www.nist.gov" xmlns:nm="http://www.altavista.com" >    <emp:employeeId>EMP0004</emp:employeeId>\r
+  <nm:name>Jeny Oconnor</nm:name>\r
+  <emp:position>Personnel Director</emp:position>\r
+  <emp:salary>95,000</emp:salary>\r
+  <emp:gender>Female</emp:gender>\r
+  <emp:address emp:domestic="Yes" street="Y&ent1;" emp:zone="CANADA" emp:local1="TRUE">27 South Road. Dallas, texas 98556</emp:address>\r
+ </emp:employee>\r
+ <employee xmlns:emp2="http://www.nist.gov" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0005</employeeId>\r
+  <name>Robert Myers</name>\r
+  <position>Computer Specialist</position>\r
+  <salary>90,000</salary>\r
+  <gender>male</gender>\r
+  <address street="Yes" xmlns="http://www.nist.gov">1821 Nordic. Road, Irving Texas 98558</address>\r
+ </employee>\r
+ </svg>\r
\r
diff --git a/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_INVALID_EXPRESSION_ERR-expected.txt b/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_INVALID_EXPRESSION_ERR-expected.txt
new file mode 100644 (file)
index 0000000..a049712
--- /dev/null
@@ -0,0 +1,7 @@
+layer at (0,0) size 800x600
+  RenderCanvas at (0,0) size 800x600
+    KCanvasContainer {svg} at (0,0) size 100x100
+      KCanvasItem {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00L100.00,0.00L100.00,100.00L0.00,100.00"]
+      RenderSVGText {text} at (0,0) size 785x18
+        RenderText {#text} at (0,0) size 442x18
+          text run at (0,0) width 442: "XPathEvaluator_evaluate_INVALID_EXPRESSION_ERR: Success"
diff --git a/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_INVALID_EXPRESSION_ERR.js b/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_INVALID_EXPRESSION_ERR.js
new file mode 100644 (file)
index 0000000..1fc7927
--- /dev/null
@@ -0,0 +1,120 @@
+
+/*
+Copyright Â© 2001-2004 World Wide Web Consortium, 
+(Massachusetts Institute of Technology, European Research Consortium 
+for Informatics and Mathematics, Keio University). All 
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the 
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even 
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['XPathEvaluator_evaluate_INVALID_EXPRESSION_ERR'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+//   This function is called by the testing framework before
+//      running the test suite.
+//
+//   If there are no configuration exceptions, asynchronous
+//        document loading is started.  Otherwise, the status
+//        is set to complete and the exception is immediately
+//        raised when entering the body of the test.
+//
+function setUpPage() {
+   setUpPageStatus = 'running';
+   try {
+     //
+     //   creates test document builder, may throw exception
+     //
+     builder = createConfiguredBuilder();
+
+      docsLoaded = 0;
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      docsLoaded += preload(docRef, "doc", "staffNS");
+        
+       if (docsLoaded == 1) {
+          setUpPage = 'complete';
+       }
+    } catch(ex) {
+       catchInitializationError(builder, ex);
+        setUpPage = 'complete';
+    }
+}
+
+
+
+//
+//   This method is called on the completion of 
+//      each asychronous load started in setUpTests.
+//
+//   When every synchronous loaded document has completed,
+//      the page status is changed which allows the
+//      body of the test to be executed.
+function loadComplete() {
+    if (++docsLoaded == 1) {
+        setUpPageStatus = 'complete';
+    }
+}
+
+
+/**
+*       
+    Test if XPathEvaluator.evaluate properly throws INVALID_EXPRESSION_ERROR
+    
+* @author Philippe Le Hégaret
+* @author Bob Clary
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#XPathEvaluator-evaluate
+*/
+function XPathEvaluator_evaluate_INVALID_EXPRESSION_ERR() {
+   var success;
+    if(checkInitialization(builder, "XPathEvaluator_evaluate_INVALID_EXPRESSION_ERR") != null) return;
+    var doc;
+      var xpEvaluator;
+      var root;
+      var result;
+      var nullNSResolver = null;
+
+      var nullResult = null;
+
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      doc = load(docRef, "doc", "staffNS");
+      xpEvaluator = createXPathEvaluator(doc);
+root = doc.documentElement;
+
+      
+       {
+               success = false;
+               try {
+            result = xpEvaluator.evaluate("12a",root,nullNSResolver,0,nullResult);
+        }
+               catch(ex) {            
+      success = (typeof(ex.code) != 'undefined' && ex.code == 51);
+               }
+               assertTrue("throw_INVALID_EXPRESSION_ERR",success);
+       }
+
+}
+
+
+
+
+function runTest() {
+   XPathEvaluator_evaluate_INVALID_EXPRESSION_ERR();
+}
diff --git a/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_INVALID_EXPRESSION_ERR.svg b/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_INVALID_EXPRESSION_ERR.svg
new file mode 100644 (file)
index 0000000..9974795
--- /dev/null
@@ -0,0 +1,74 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>\r
+<!DOCTYPE svg PUBLIC "STAFF" "staffNS.dtd" \r
+[\r
+   <!ENTITY ent1 "es">\r
+   <!ENTITY ent2 "1900 Dallas Road">\r
+   <!ENTITY ent3 "Texas">\r
+   <!ENTITY ent4 "<entElement1 xmlns:local1='www.xyz.com'>Element data</entElement1><?PItarget PIdata?>">\r
+   <!ENTITY ent5 PUBLIC "entityURI" "entityFile" NDATA notation1>\r
+   <!ENTITY ent6 PUBLIC "uri" "file" NDATA notation2>\r
+   <!ENTITY ent1 "This entity should be discarded">\r
+   <!NOTATION notation1 PUBLIC "notation1File">\r
+   <!NOTATION notation2 SYSTEM "notation2File">\r
+   <!ELEMENT svg (rect, script, employee+, emp:employee, employee*)>\r
+   <!ATTLIST svg \r
+      xmlns CDATA #FIXED "http://www.w3.org/2000/svg"\r
+      name CDATA #IMPLIED>\r
+   <!ELEMENT rect EMPTY>\r
+   <!ATTLIST rect \r
+      x CDATA #REQUIRED\r
+      y CDATA #REQUIRED\r
+      width CDATA #REQUIRED\r
+      height CDATA #REQUIRED>\r
+  <!ELEMENT script (#PCDATA)>\r
+  <!ATTLIST script type CDATA #IMPLIED>      \r
+]>\r
+<!-- This is comment number 1.-->\r
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:nist="http://www.nist.gov"><rect x="0" y="0" width="100" height="100"/>\r
+<script xmlns="http://www.w3.org/1999/xhtml" src="XPathEvaluator_evaluate_INVALID_EXPRESSION_ERR.js"/>\r
+<script xmlns="http://www.w3.org/1999/xhtml" src="svgunit.js"/>\r
+ <employee xmlns="http://www.nist.gov" xmlns:dmstc="http://www.usa.com">\r
+  <employeeId>EMP0001</employeeId>\r
+  <name>Margaret Martin</name>\r
+  <position>Accountant</position>           \r
+  <salary>56,000</salary>\r
+  <gender>Female</gender>\r
+  <address dmstc:domestic="Yes">1230 North Ave. Dallas, Texas 98551</address>\r
+ </employee>\r
+ <employee xmlns:dmstc="http://www.usa.com" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0002</employeeId>\r
+  <name>Martha Raynolds\r
+<![CDATA[This is a CDATASection with EntityReference number 2 &ent2;]]>\r
+<![CDATA[This is an adjacent CDATASection with a reference to a tab &tab;]]></name>\r
+  <position>Secretary</position>\r
+  <salary>35,000</salary>\r
+  <gender>Female</gender>\r
+  <address dmstc:domestic="Yes" street="Yes">&ent2; Dallas, &ent3;\r
+ 98554</address>\r
+ </employee>\r
+ <employee xmlns:dmstc="http://www.netzero.com" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0003</employeeId>\r
+  <name>Roger\r
+ Jones</name>\r
+  <position>Department Manager</position>\r
+  <salary>100,000</salary>\r
+  <gender>&ent4;</gender>\r
+  <address dmstc:domestic="Yes" street="No">PO Box 27 Irving, texas 98553</address>\r
+ </employee>\r
+ <emp:employee xmlns:emp="http://www.nist.gov" xmlns:nm="http://www.altavista.com" >    <emp:employeeId>EMP0004</emp:employeeId>\r
+  <nm:name>Jeny Oconnor</nm:name>\r
+  <emp:position>Personnel Director</emp:position>\r
+  <emp:salary>95,000</emp:salary>\r
+  <emp:gender>Female</emp:gender>\r
+  <emp:address emp:domestic="Yes" street="Y&ent1;" emp:zone="CANADA" emp:local1="TRUE">27 South Road. Dallas, texas 98556</emp:address>\r
+ </emp:employee>\r
+ <employee xmlns:emp2="http://www.nist.gov" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0005</employeeId>\r
+  <name>Robert Myers</name>\r
+  <position>Computer Specialist</position>\r
+  <salary>90,000</salary>\r
+  <gender>male</gender>\r
+  <address street="Yes" xmlns="http://www.nist.gov">1821 Nordic. Road, Irving Texas 98558</address>\r
+ </employee>\r
+ </svg>\r
\r
diff --git a/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_NAMESPACE_ERR-expected.txt b/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_NAMESPACE_ERR-expected.txt
new file mode 100644 (file)
index 0000000..a64d27f
--- /dev/null
@@ -0,0 +1,7 @@
+layer at (0,0) size 800x600
+  RenderCanvas at (0,0) size 800x600
+    KCanvasContainer {svg} at (0,0) size 100x100
+      KCanvasItem {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00L100.00,0.00L100.00,100.00L0.00,100.00"]
+      RenderSVGText {text} at (0,0) size 785x18
+        RenderText {#text} at (0,0) size 366x18
+          text run at (0,0) width 366: "XPathEvaluator_evaluate_NAMESPACE_ERR: Success"
diff --git a/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_NAMESPACE_ERR.js b/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_NAMESPACE_ERR.js
new file mode 100644 (file)
index 0000000..3477d65
--- /dev/null
@@ -0,0 +1,120 @@
+
+/*
+Copyright Â© 2001-2004 World Wide Web Consortium, 
+(Massachusetts Institute of Technology, European Research Consortium 
+for Informatics and Mathematics, Keio University). All 
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the 
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even 
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['XPathEvaluator_evaluate_NAMESPACE_ERR'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+//   This function is called by the testing framework before
+//      running the test suite.
+//
+//   If there are no configuration exceptions, asynchronous
+//        document loading is started.  Otherwise, the status
+//        is set to complete and the exception is immediately
+//        raised when entering the body of the test.
+//
+function setUpPage() {
+   setUpPageStatus = 'running';
+   try {
+     //
+     //   creates test document builder, may throw exception
+     //
+     builder = createConfiguredBuilder();
+
+      docsLoaded = 0;
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      docsLoaded += preload(docRef, "doc", "staffNS");
+        
+       if (docsLoaded == 1) {
+          setUpPage = 'complete';
+       }
+    } catch(ex) {
+       catchInitializationError(builder, ex);
+        setUpPage = 'complete';
+    }
+}
+
+
+
+//
+//   This method is called on the completion of 
+//      each asychronous load started in setUpTests.
+//
+//   When every synchronous loaded document has completed,
+//      the page status is changed which allows the
+//      body of the test to be executed.
+function loadComplete() {
+    if (++docsLoaded == 1) {
+        setUpPageStatus = 'complete';
+    }
+}
+
+
+/**
+*       
+    Test if XPathEvaluator.evaluate properly throws NAMESPACE_ERROR
+    
+* @author Philippe Le Hégaret
+* @author Bob Clary
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#XPathEvaluator-evaluate
+*/
+function XPathEvaluator_evaluate_NAMESPACE_ERR() {
+   var success;
+    if(checkInitialization(builder, "XPathEvaluator_evaluate_NAMESPACE_ERR") != null) return;
+    var doc;
+      var xpEvaluator;
+      var root;
+      var result;
+      var nullNSResolver = null;
+
+      var nullResult = null;
+
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      doc = load(docRef, "doc", "staffNS");
+      xpEvaluator = createXPathEvaluator(doc);
+root = doc.documentElement;
+
+      
+       {
+               success = false;
+               try {
+            result = xpEvaluator.evaluate("//foo:bar",root,nullNSResolver,0,nullResult);
+        }
+               catch(ex) {
+      success = (typeof(ex.code) != 'undefined' && ex.code == 14);
+               }
+               assertTrue("throw_NAMESPACE_ERR",success);
+       }
+
+}
+
+
+
+
+function runTest() {
+   XPathEvaluator_evaluate_NAMESPACE_ERR();
+}
diff --git a/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_NAMESPACE_ERR.svg b/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_NAMESPACE_ERR.svg
new file mode 100644 (file)
index 0000000..b2e7cf5
--- /dev/null
@@ -0,0 +1,74 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>\r
+<!DOCTYPE svg PUBLIC "STAFF" "staffNS.dtd" \r
+[\r
+   <!ENTITY ent1 "es">\r
+   <!ENTITY ent2 "1900 Dallas Road">\r
+   <!ENTITY ent3 "Texas">\r
+   <!ENTITY ent4 "<entElement1 xmlns:local1='www.xyz.com'>Element data</entElement1><?PItarget PIdata?>">\r
+   <!ENTITY ent5 PUBLIC "entityURI" "entityFile" NDATA notation1>\r
+   <!ENTITY ent6 PUBLIC "uri" "file" NDATA notation2>\r
+   <!ENTITY ent1 "This entity should be discarded">\r
+   <!NOTATION notation1 PUBLIC "notation1File">\r
+   <!NOTATION notation2 SYSTEM "notation2File">\r
+   <!ELEMENT svg (rect, script, employee+, emp:employee, employee*)>\r
+   <!ATTLIST svg \r
+      xmlns CDATA #FIXED "http://www.w3.org/2000/svg"\r
+      name CDATA #IMPLIED>\r
+   <!ELEMENT rect EMPTY>\r
+   <!ATTLIST rect \r
+      x CDATA #REQUIRED\r
+      y CDATA #REQUIRED\r
+      width CDATA #REQUIRED\r
+      height CDATA #REQUIRED>\r
+  <!ELEMENT script (#PCDATA)>\r
+  <!ATTLIST script type CDATA #IMPLIED>      \r
+]>\r
+<!-- This is comment number 1.-->\r
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:nist="http://www.nist.gov"><rect x="0" y="0" width="100" height="100"/>\r
+<script xmlns="http://www.w3.org/1999/xhtml" src="XPathEvaluator_evaluate_NAMESPACE_ERR.js"/>\r
+<script xmlns="http://www.w3.org/1999/xhtml" src="svgunit.js"/>\r
+ <employee xmlns="http://www.nist.gov" xmlns:dmstc="http://www.usa.com">\r
+  <employeeId>EMP0001</employeeId>\r
+  <name>Margaret Martin</name>\r
+  <position>Accountant</position>           \r
+  <salary>56,000</salary>\r
+  <gender>Female</gender>\r
+  <address dmstc:domestic="Yes">1230 North Ave. Dallas, Texas 98551</address>\r
+ </employee>\r
+ <employee xmlns:dmstc="http://www.usa.com" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0002</employeeId>\r
+  <name>Martha Raynolds\r
+<![CDATA[This is a CDATASection with EntityReference number 2 &ent2;]]>\r
+<![CDATA[This is an adjacent CDATASection with a reference to a tab &tab;]]></name>\r
+  <position>Secretary</position>\r
+  <salary>35,000</salary>\r
+  <gender>Female</gender>\r
+  <address dmstc:domestic="Yes" street="Yes">&ent2; Dallas, &ent3;\r
+ 98554</address>\r
+ </employee>\r
+ <employee xmlns:dmstc="http://www.netzero.com" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0003</employeeId>\r
+  <name>Roger\r
+ Jones</name>\r
+  <position>Department Manager</position>\r
+  <salary>100,000</salary>\r
+  <gender>&ent4;</gender>\r
+  <address dmstc:domestic="Yes" street="No">PO Box 27 Irving, texas 98553</address>\r
+ </employee>\r
+ <emp:employee xmlns:emp="http://www.nist.gov" xmlns:nm="http://www.altavista.com" >    <emp:employeeId>EMP0004</emp:employeeId>\r
+  <nm:name>Jeny Oconnor</nm:name>\r
+  <emp:position>Personnel Director</emp:position>\r
+  <emp:salary>95,000</emp:salary>\r
+  <emp:gender>Female</emp:gender>\r
+  <emp:address emp:domestic="Yes" street="Y&ent1;" emp:zone="CANADA" emp:local1="TRUE">27 South Road. Dallas, texas 98556</emp:address>\r
+ </emp:employee>\r
+ <employee xmlns:emp2="http://www.nist.gov" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0005</employeeId>\r
+  <name>Robert Myers</name>\r
+  <position>Computer Specialist</position>\r
+  <salary>90,000</salary>\r
+  <gender>male</gender>\r
+  <address street="Yes" xmlns="http://www.nist.gov">1821 Nordic. Road, Irving Texas 98558</address>\r
+ </employee>\r
+ </svg>\r
\r
diff --git a/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_NOT_SUPPORTED_ERR-expected.txt b/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_NOT_SUPPORTED_ERR-expected.txt
new file mode 100644 (file)
index 0000000..7719912
--- /dev/null
@@ -0,0 +1,7 @@
+layer at (0,0) size 800x600
+  RenderCanvas at (0,0) size 800x600
+    KCanvasContainer {svg} at (0,0) size 100x100
+      KCanvasItem {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00L100.00,0.00L100.00,100.00L0.00,100.00"]
+      RenderSVGText {text} at (0,0) size 785x18
+        RenderText {#text} at (0,0) size 403x18
+          text run at (0,0) width 403: "XPathEvaluator_evaluate_NOT_SUPPORTED_ERR: Success"
diff --git a/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_NOT_SUPPORTED_ERR.js b/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_NOT_SUPPORTED_ERR.js
new file mode 100644 (file)
index 0000000..c7e3ee9
--- /dev/null
@@ -0,0 +1,119 @@
+
+/*
+Copyright Â© 2001-2004 World Wide Web Consortium, 
+(Massachusetts Institute of Technology, European Research Consortium 
+for Informatics and Mathematics, Keio University). All 
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the 
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even 
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['XPathEvaluator_evaluate_NOT_SUPPORTED_ERR'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+//   This function is called by the testing framework before
+//      running the test suite.
+//
+//   If there are no configuration exceptions, asynchronous
+//        document loading is started.  Otherwise, the status
+//        is set to complete and the exception is immediately
+//        raised when entering the body of the test.
+//
+function setUpPage() {
+   setUpPageStatus = 'running';
+   try {
+     //
+     //   creates test document builder, may throw exception
+     //
+     builder = createConfiguredBuilder();
+
+      docsLoaded = 0;
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      docsLoaded += preload(docRef, "doc", "staffNS");
+        
+       if (docsLoaded == 1) {
+          setUpPage = 'complete';
+       }
+    } catch(ex) {
+       catchInitializationError(builder, ex);
+        setUpPage = 'complete';
+    }
+}
+
+
+
+//
+//   This method is called on the completion of 
+//      each asychronous load started in setUpTests.
+//
+//   When every synchronous loaded document has completed,
+//      the page status is changed which allows the
+//      body of the test to be executed.
+function loadComplete() {
+    if (++docsLoaded == 1) {
+        setUpPageStatus = 'complete';
+    }
+}
+
+
+/**
+*       
+      Test if XPathEvaluator.evaluate properly throws NOT_SUPPORTED_ERROR
+    
+* @author Philippe Le Hégaret
+* @author Bob Clary
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#XPathEvaluator-evaluate
+*/
+function XPathEvaluator_evaluate_NOT_SUPPORTED_ERR() {
+   var success;
+    if(checkInitialization(builder, "XPathEvaluator_evaluate_NOT_SUPPORTED_ERR") != null) return;
+    var doc;
+      var xpEvaluator;
+      var result;
+      var nullNSResolver = null;
+
+      var nullResult = null;
+
+      var contextNode;
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      doc = load(docRef, "doc", "staffNS");
+      xpEvaluator = createXPathEvaluator(doc);
+contextNode = doc.createEntityReference("entityname");
+      
+       {
+               success = false;
+               try {
+            result = xpEvaluator.evaluate("//foo:bar",contextNode,nullNSResolver,0,nullResult);
+        }
+               catch(ex) {
+      success = (typeof(ex.code) != 'undefined' && ex.code == 9);
+               }
+               assertTrue("throw_NOT_SUPPORTED_ERR",success);
+       }
+
+}
+
+
+
+
+function runTest() {
+   XPathEvaluator_evaluate_NOT_SUPPORTED_ERR();
+}
diff --git a/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_NOT_SUPPORTED_ERR.svg b/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_NOT_SUPPORTED_ERR.svg
new file mode 100644 (file)
index 0000000..9ead148
--- /dev/null
@@ -0,0 +1,74 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>\r
+<!DOCTYPE svg PUBLIC "STAFF" "staffNS.dtd" \r
+[\r
+   <!ENTITY ent1 "es">\r
+   <!ENTITY ent2 "1900 Dallas Road">\r
+   <!ENTITY ent3 "Texas">\r
+   <!ENTITY ent4 "<entElement1 xmlns:local1='www.xyz.com'>Element data</entElement1><?PItarget PIdata?>">\r
+   <!ENTITY ent5 PUBLIC "entityURI" "entityFile" NDATA notation1>\r
+   <!ENTITY ent6 PUBLIC "uri" "file" NDATA notation2>\r
+   <!ENTITY ent1 "This entity should be discarded">\r
+   <!NOTATION notation1 PUBLIC "notation1File">\r
+   <!NOTATION notation2 SYSTEM "notation2File">\r
+   <!ELEMENT svg (rect, script, employee+, emp:employee, employee*)>\r
+   <!ATTLIST svg \r
+      xmlns CDATA #FIXED "http://www.w3.org/2000/svg"\r
+      name CDATA #IMPLIED>\r
+   <!ELEMENT rect EMPTY>\r
+   <!ATTLIST rect \r
+      x CDATA #REQUIRED\r
+      y CDATA #REQUIRED\r
+      width CDATA #REQUIRED\r
+      height CDATA #REQUIRED>\r
+  <!ELEMENT script (#PCDATA)>\r
+  <!ATTLIST script type CDATA #IMPLIED>      \r
+]>\r
+<!-- This is comment number 1.-->\r
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:nist="http://www.nist.gov"><rect x="0" y="0" width="100" height="100"/>\r
+<script xmlns="http://www.w3.org/1999/xhtml" src="XPathEvaluator_evaluate_NOT_SUPPORTED_ERR.js"/>\r
+<script xmlns="http://www.w3.org/1999/xhtml" src="svgunit.js"/>\r
+ <employee xmlns="http://www.nist.gov" xmlns:dmstc="http://www.usa.com">\r
+  <employeeId>EMP0001</employeeId>\r
+  <name>Margaret Martin</name>\r
+  <position>Accountant</position>           \r
+  <salary>56,000</salary>\r
+  <gender>Female</gender>\r
+  <address dmstc:domestic="Yes">1230 North Ave. Dallas, Texas 98551</address>\r
+ </employee>\r
+ <employee xmlns:dmstc="http://www.usa.com" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0002</employeeId>\r
+  <name>Martha Raynolds\r
+<![CDATA[This is a CDATASection with EntityReference number 2 &ent2;]]>\r
+<![CDATA[This is an adjacent CDATASection with a reference to a tab &tab;]]></name>\r
+  <position>Secretary</position>\r
+  <salary>35,000</salary>\r
+  <gender>Female</gender>\r
+  <address dmstc:domestic="Yes" street="Yes">&ent2; Dallas, &ent3;\r
+ 98554</address>\r
+ </employee>\r
+ <employee xmlns:dmstc="http://www.netzero.com" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0003</employeeId>\r
+  <name>Roger\r
+ Jones</name>\r
+  <position>Department Manager</position>\r
+  <salary>100,000</salary>\r
+  <gender>&ent4;</gender>\r
+  <address dmstc:domestic="Yes" street="No">PO Box 27 Irving, texas 98553</address>\r
+ </employee>\r
+ <emp:employee xmlns:emp="http://www.nist.gov" xmlns:nm="http://www.altavista.com" >    <emp:employeeId>EMP0004</emp:employeeId>\r
+  <nm:name>Jeny Oconnor</nm:name>\r
+  <emp:position>Personnel Director</emp:position>\r
+  <emp:salary>95,000</emp:salary>\r
+  <emp:gender>Female</emp:gender>\r
+  <emp:address emp:domestic="Yes" street="Y&ent1;" emp:zone="CANADA" emp:local1="TRUE">27 South Road. Dallas, texas 98556</emp:address>\r
+ </emp:employee>\r
+ <employee xmlns:emp2="http://www.nist.gov" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0005</employeeId>\r
+  <name>Robert Myers</name>\r
+  <position>Computer Specialist</position>\r
+  <salary>90,000</salary>\r
+  <gender>male</gender>\r
+  <address street="Yes" xmlns="http://www.nist.gov">1821 Nordic. Road, Irving Texas 98558</address>\r
+ </employee>\r
+ </svg>\r
\r
diff --git a/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_TYPE_ERR-expected.txt b/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_TYPE_ERR-expected.txt
new file mode 100644 (file)
index 0000000..8b22414
--- /dev/null
@@ -0,0 +1,7 @@
+layer at (0,0) size 800x600
+  RenderCanvas at (0,0) size 800x600
+    KCanvasContainer {svg} at (0,0) size 100x100
+      KCanvasItem {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00L100.00,0.00L100.00,100.00L0.00,100.00"]
+      RenderSVGText {text} at (0,0) size 785x18
+        RenderText {#text} at (0,0) size 308x18
+          text run at (0,0) width 308: "XPathEvaluator_evaluate_TYPE_ERR: Success"
diff --git a/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_TYPE_ERR.js b/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_TYPE_ERR.js
new file mode 100644 (file)
index 0000000..4c3e497
--- /dev/null
@@ -0,0 +1,118 @@
+
+/*
+Copyright Â© 2001-2004 World Wide Web Consortium, 
+(Massachusetts Institute of Technology, European Research Consortium 
+for Informatics and Mathematics, Keio University). All 
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the 
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even 
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['XPathEvaluator_evaluate_TYPE_ERR'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+//   This function is called by the testing framework before
+//      running the test suite.
+//
+//   If there are no configuration exceptions, asynchronous
+//        document loading is started.  Otherwise, the status
+//        is set to complete and the exception is immediately
+//        raised when entering the body of the test.
+//
+function setUpPage() {
+   setUpPageStatus = 'running';
+   try {
+     //
+     //   creates test document builder, may throw exception
+     //
+     builder = createConfiguredBuilder();
+
+      docsLoaded = 0;
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      docsLoaded += preload(docRef, "doc", "staffNS");
+        
+       if (docsLoaded == 1) {
+          setUpPage = 'complete';
+       }
+    } catch(ex) {
+       catchInitializationError(builder, ex);
+        setUpPage = 'complete';
+    }
+}
+
+
+
+//
+//   This method is called on the completion of 
+//      each asychronous load started in setUpTests.
+//
+//   When every synchronous loaded document has completed,
+//      the page status is changed which allows the
+//      body of the test to be executed.
+function loadComplete() {
+    if (++docsLoaded == 1) {
+        setUpPageStatus = 'complete';
+    }
+}
+
+
+/**
+*       
+Evaluate "string(/)" and request that the result be a FIRST_ORDERED_NODE_TYPE, should
+result in a TYPE_ERR.
+    
+* @author Curt Arnold
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#XPathEvaluator-evaluate
+* @see http://www.w3.org/Bugs/Public/show_bug.cgi?id=508
+*/
+function XPathEvaluator_evaluate_TYPE_ERR() {
+   var success;
+    if(checkInitialization(builder, "XPathEvaluator_evaluate_TYPE_ERR") != null) return;
+    var doc;
+      var xpEvaluator;
+      var result;
+      var nullNSResolver = null;
+
+      var nullResult = null;
+
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      doc = load(docRef, "doc", "staffNS");
+      xpEvaluator = createXPathEvaluator(doc);
+
+       {
+               success = false;
+               try {
+            result = xpEvaluator.evaluate("string(/)",doc,nullNSResolver,9,nullResult);
+        }
+               catch(ex) {            
+      success = (typeof(ex.code) != 'undefined' && ex.code == 52);
+               }
+               assertTrue("throw_TYPE_ERR",success);
+       }
+
+}
+
+
+
+
+function runTest() {
+   XPathEvaluator_evaluate_TYPE_ERR();
+}
diff --git a/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_TYPE_ERR.svg b/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_TYPE_ERR.svg
new file mode 100644 (file)
index 0000000..7ab6ea6
--- /dev/null
@@ -0,0 +1,74 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>\r
+<!DOCTYPE svg PUBLIC "STAFF" "staffNS.dtd" \r
+[\r
+   <!ENTITY ent1 "es">\r
+   <!ENTITY ent2 "1900 Dallas Road">\r
+   <!ENTITY ent3 "Texas">\r
+   <!ENTITY ent4 "<entElement1 xmlns:local1='www.xyz.com'>Element data</entElement1><?PItarget PIdata?>">\r
+   <!ENTITY ent5 PUBLIC "entityURI" "entityFile" NDATA notation1>\r
+   <!ENTITY ent6 PUBLIC "uri" "file" NDATA notation2>\r
+   <!ENTITY ent1 "This entity should be discarded">\r
+   <!NOTATION notation1 PUBLIC "notation1File">\r
+   <!NOTATION notation2 SYSTEM "notation2File">\r
+   <!ELEMENT svg (rect, script, employee+, emp:employee, employee*)>\r
+   <!ATTLIST svg \r
+      xmlns CDATA #FIXED "http://www.w3.org/2000/svg"\r
+      name CDATA #IMPLIED>\r
+   <!ELEMENT rect EMPTY>\r
+   <!ATTLIST rect \r
+      x CDATA #REQUIRED\r
+      y CDATA #REQUIRED\r
+      width CDATA #REQUIRED\r
+      height CDATA #REQUIRED>\r
+  <!ELEMENT script (#PCDATA)>\r
+  <!ATTLIST script type CDATA #IMPLIED>      \r
+]>\r
+<!-- This is comment number 1.-->\r
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:nist="http://www.nist.gov"><rect x="0" y="0" width="100" height="100"/>\r
+<script xmlns="http://www.w3.org/1999/xhtml" src="XPathEvaluator_evaluate_TYPE_ERR.js"/>\r
+<script xmlns="http://www.w3.org/1999/xhtml" src="svgunit.js"/>\r
+ <employee xmlns="http://www.nist.gov" xmlns:dmstc="http://www.usa.com">\r
+  <employeeId>EMP0001</employeeId>\r
+  <name>Margaret Martin</name>\r
+  <position>Accountant</position>           \r
+  <salary>56,000</salary>\r
+  <gender>Female</gender>\r
+  <address dmstc:domestic="Yes">1230 North Ave. Dallas, Texas 98551</address>\r
+ </employee>\r
+ <employee xmlns:dmstc="http://www.usa.com" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0002</employeeId>\r
+  <name>Martha Raynolds\r
+<![CDATA[This is a CDATASection with EntityReference number 2 &ent2;]]>\r
+<![CDATA[This is an adjacent CDATASection with a reference to a tab &tab;]]></name>\r
+  <position>Secretary</position>\r
+  <salary>35,000</salary>\r
+  <gender>Female</gender>\r
+  <address dmstc:domestic="Yes" street="Yes">&ent2; Dallas, &ent3;\r
+ 98554</address>\r
+ </employee>\r
+ <employee xmlns:dmstc="http://www.netzero.com" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0003</employeeId>\r
+  <name>Roger\r
+ Jones</name>\r
+  <position>Department Manager</position>\r
+  <salary>100,000</salary>\r
+  <gender>&ent4;</gender>\r
+  <address dmstc:domestic="Yes" street="No">PO Box 27 Irving, texas 98553</address>\r
+ </employee>\r
+ <emp:employee xmlns:emp="http://www.nist.gov" xmlns:nm="http://www.altavista.com" >    <emp:employeeId>EMP0004</emp:employeeId>\r
+  <nm:name>Jeny Oconnor</nm:name>\r
+  <emp:position>Personnel Director</emp:position>\r
+  <emp:salary>95,000</emp:salary>\r
+  <emp:gender>Female</emp:gender>\r
+  <emp:address emp:domestic="Yes" street="Y&ent1;" emp:zone="CANADA" emp:local1="TRUE">27 South Road. Dallas, texas 98556</emp:address>\r
+ </emp:employee>\r
+ <employee xmlns:emp2="http://www.nist.gov" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0005</employeeId>\r
+  <name>Robert Myers</name>\r
+  <position>Computer Specialist</position>\r
+  <salary>90,000</salary>\r
+  <gender>male</gender>\r
+  <address street="Yes" xmlns="http://www.nist.gov">1821 Nordic. Road, Irving Texas 98558</address>\r
+ </employee>\r
+ </svg>\r
\r
diff --git a/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_WRONG_DOCUMENT_ERR-expected.txt b/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_WRONG_DOCUMENT_ERR-expected.txt
new file mode 100644 (file)
index 0000000..33c06f8
--- /dev/null
@@ -0,0 +1,10 @@
+layer at (0,0) size 800x600
+  RenderCanvas at (0,0) size 800x600
+    KCanvasContainer {svg} at (0,0) size 100x100
+      KCanvasItem {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#FFFF00]}] [data="M0.00,0.00L100.00,0.00L100.00,100.00L0.00,100.00"]
+      RenderSVGText {text} at (0,0) size 785x18
+        RenderText {#text} at (0,0) size 476x18
+          text run at (0,0) width 476: "Tests with multiple loads of different documents are not currently supported"
+      RenderSVGText {text} at (0,0) size 785x18
+        RenderText {#text} at (0,0) size 372x18
+          text run at (0,0) width 372: "XPathEvaluator_evaluate_WRONG_DOCUMENT_ERR"
diff --git a/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_WRONG_DOCUMENT_ERR.js b/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_WRONG_DOCUMENT_ERR.js
new file mode 100644 (file)
index 0000000..fa4afaf
--- /dev/null
@@ -0,0 +1,133 @@
+
+/*
+Copyright Â© 2001-2004 World Wide Web Consortium, 
+(Massachusetts Institute of Technology, European Research Consortium 
+for Informatics and Mathematics, Keio University). All 
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the 
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even 
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['XPathEvaluator_evaluate_WRONG_DOCUMENT_ERR'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+//   This function is called by the testing framework before
+//      running the test suite.
+//
+//   If there are no configuration exceptions, asynchronous
+//        document loading is started.  Otherwise, the status
+//        is set to complete and the exception is immediately
+//        raised when entering the body of the test.
+//
+function setUpPage() {
+   setUpPageStatus = 'running';
+   try {
+     //
+     //   creates test document builder, may throw exception
+     //
+     builder = createConfiguredBuilder();
+
+      docsLoaded = 0;
+      
+      var doc1Ref = null;
+      if (typeof(this.doc1) != 'undefined') {
+        doc1Ref = this.doc1;
+      }
+      docsLoaded += preload(doc1Ref, "doc1", "staffNS");
+        
+      var doc2Ref = null;
+      if (typeof(this.doc2) != 'undefined') {
+        doc2Ref = this.doc2;
+      }
+      docsLoaded += preload(doc2Ref, "doc2", "staff");
+        
+       if (docsLoaded == 2) {
+          setUpPage = 'complete';
+       }
+    } catch(ex) {
+       catchInitializationError(builder, ex);
+        setUpPage = 'complete';
+    }
+}
+
+
+
+//
+//   This method is called on the completion of 
+//      each asychronous load started in setUpTests.
+//
+//   When every synchronous loaded document has completed,
+//      the page status is changed which allows the
+//      body of the test to be executed.
+function loadComplete() {
+    if (++docsLoaded == 2) {
+        setUpPageStatus = 'complete';
+    }
+}
+
+
+/**
+*       
+      Test if XPathEvaluator.evaluate properly throws WRONG_DOCUMENT_ERROR
+    
+* @author Philippe Le Hégaret
+* @author Bob Clary
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#XPathEvaluator-evaluate
+*/
+function XPathEvaluator_evaluate_WRONG_DOCUMENT_ERR() {
+   var success;
+    if(checkInitialization(builder, "XPathEvaluator_evaluate_WRONG_DOCUMENT_ERR") != null) return;
+    var doc1;
+      var doc2;
+      var xpEvaluator;
+      var root;
+      var result;
+      var nullNSResolver = null;
+
+      var nullResult = null;
+
+      
+      var doc1Ref = null;
+      if (typeof(this.doc1) != 'undefined') {
+        doc1Ref = this.doc1;
+      }
+      doc1 = load(doc1Ref, "doc1", "staffNS");
+      
+      var doc2Ref = null;
+      if (typeof(this.doc2) != 'undefined') {
+        doc2Ref = this.doc2;
+      }
+      doc2 = load(doc2Ref, "doc2", "staff");
+      xpEvaluator = createXPathEvaluator(doc1);
+root = doc2.documentElement;
+
+      
+       {
+               success = false;
+               try {
+            result = xpEvaluator.evaluate("//foo:bar",root,nullNSResolver,0,nullResult);
+        }
+               catch(ex) {
+      success = (typeof(ex.code) != 'undefined' && ex.code == 4);
+               }
+               assertTrue("throw_WRONG_DOCUMENT_ERR",success);
+       }
+
+}
+
+
+
+
+function runTest() {
+   XPathEvaluator_evaluate_WRONG_DOCUMENT_ERR();
+}
diff --git a/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_WRONG_DOCUMENT_ERR.svg b/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_WRONG_DOCUMENT_ERR.svg
new file mode 100644 (file)
index 0000000..657179e
--- /dev/null
@@ -0,0 +1,74 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>\r
+<!DOCTYPE svg PUBLIC "STAFF" "staffNS.dtd" \r
+[\r
+   <!ENTITY ent1 "es">\r
+   <!ENTITY ent2 "1900 Dallas Road">\r
+   <!ENTITY ent3 "Texas">\r
+   <!ENTITY ent4 "<entElement1 xmlns:local1='www.xyz.com'>Element data</entElement1><?PItarget PIdata?>">\r
+   <!ENTITY ent5 PUBLIC "entityURI" "entityFile" NDATA notation1>\r
+   <!ENTITY ent6 PUBLIC "uri" "file" NDATA notation2>\r
+   <!ENTITY ent1 "This entity should be discarded">\r
+   <!NOTATION notation1 PUBLIC "notation1File">\r
+   <!NOTATION notation2 SYSTEM "notation2File">\r
+   <!ELEMENT svg (rect, script, employee+, emp:employee, employee*)>\r
+   <!ATTLIST svg \r
+      xmlns CDATA #FIXED "http://www.w3.org/2000/svg"\r
+      name CDATA #IMPLIED>\r
+   <!ELEMENT rect EMPTY>\r
+   <!ATTLIST rect \r
+      x CDATA #REQUIRED\r
+      y CDATA #REQUIRED\r
+      width CDATA #REQUIRED\r
+      height CDATA #REQUIRED>\r
+  <!ELEMENT script (#PCDATA)>\r
+  <!ATTLIST script type CDATA #IMPLIED>      \r
+]>\r
+<!-- This is comment number 1.-->\r
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:nist="http://www.nist.gov"><rect x="0" y="0" width="100" height="100"/>\r
+<script xmlns="http://www.w3.org/1999/xhtml" src="XPathEvaluator_evaluate_WRONG_DOCUMENT_ERR.js"/>\r
+<script xmlns="http://www.w3.org/1999/xhtml" src="svgunit.js"/>\r
+ <employee xmlns="http://www.nist.gov" xmlns:dmstc="http://www.usa.com">\r
+  <employeeId>EMP0001</employeeId>\r
+  <name>Margaret Martin</name>\r
+  <position>Accountant</position>           \r
+  <salary>56,000</salary>\r
+  <gender>Female</gender>\r
+  <address dmstc:domestic="Yes">1230 North Ave. Dallas, Texas 98551</address>\r
+ </employee>\r
+ <employee xmlns:dmstc="http://www.usa.com" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0002</employeeId>\r
+  <name>Martha Raynolds\r
+<![CDATA[This is a CDATASection with EntityReference number 2 &ent2;]]>\r
+<![CDATA[This is an adjacent CDATASection with a reference to a tab &tab;]]></name>\r
+  <position>Secretary</position>\r
+  <salary>35,000</salary>\r
+  <gender>Female</gender>\r
+  <address dmstc:domestic="Yes" street="Yes">&ent2; Dallas, &ent3;\r
+ 98554</address>\r
+ </employee>\r
+ <employee xmlns:dmstc="http://www.netzero.com" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0003</employeeId>\r
+  <name>Roger\r
+ Jones</name>\r
+  <position>Department Manager</position>\r
+  <salary>100,000</salary>\r
+  <gender>&ent4;</gender>\r
+  <address dmstc:domestic="Yes" street="No">PO Box 27 Irving, texas 98553</address>\r
+ </employee>\r
+ <emp:employee xmlns:emp="http://www.nist.gov" xmlns:nm="http://www.altavista.com" >    <emp:employeeId>EMP0004</emp:employeeId>\r
+  <nm:name>Jeny Oconnor</nm:name>\r
+  <emp:position>Personnel Director</emp:position>\r
+  <emp:salary>95,000</emp:salary>\r
+  <emp:gender>Female</emp:gender>\r
+  <emp:address emp:domestic="Yes" street="Y&ent1;" emp:zone="CANADA" emp:local1="TRUE">27 South Road. Dallas, texas 98556</emp:address>\r
+ </emp:employee>\r
+ <employee xmlns:emp2="http://www.nist.gov" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0005</employeeId>\r
+  <name>Robert Myers</name>\r
+  <position>Computer Specialist</position>\r
+  <salary>90,000</salary>\r
+  <gender>male</gender>\r
+  <address street="Yes" xmlns="http://www.nist.gov">1821 Nordic. Road, Irving Texas 98558</address>\r
+ </employee>\r
+ </svg>\r
\r
diff --git a/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_document-expected.txt b/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_document-expected.txt
new file mode 100644 (file)
index 0000000..a321008
--- /dev/null
@@ -0,0 +1,7 @@
+layer at (0,0) size 800x600
+  RenderCanvas at (0,0) size 800x600
+    KCanvasContainer {svg} at (0,0) size 100x100
+      KCanvasItem {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00L100.00,0.00L100.00,100.00L0.00,100.00"]
+      RenderSVGText {text} at (0,0) size 785x18
+        RenderText {#text} at (0,0) size 289x18
+          text run at (0,0) width 289: "XPathEvaluator_evaluate_document: Success"
diff --git a/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_document.js b/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_document.js
new file mode 100644 (file)
index 0000000..88aba26
--- /dev/null
@@ -0,0 +1,111 @@
+
+/*
+Copyright Â© 2001-2004 World Wide Web Consortium, 
+(Massachusetts Institute of Technology, European Research Consortium 
+for Informatics and Mathematics, Keio University). All 
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the 
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even 
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['XPathEvaluator_evaluate_document'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+//   This function is called by the testing framework before
+//      running the test suite.
+//
+//   If there are no configuration exceptions, asynchronous
+//        document loading is started.  Otherwise, the status
+//        is set to complete and the exception is immediately
+//        raised when entering the body of the test.
+//
+function setUpPage() {
+   setUpPageStatus = 'running';
+   try {
+     //
+     //   creates test document builder, may throw exception
+     //
+     builder = createConfiguredBuilder();
+
+      docsLoaded = 0;
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      docsLoaded += preload(docRef, "doc", "staffNS");
+        
+       if (docsLoaded == 1) {
+          setUpPage = 'complete';
+       }
+    } catch(ex) {
+       catchInitializationError(builder, ex);
+        setUpPage = 'complete';
+    }
+}
+
+
+
+//
+//   This method is called on the completion of 
+//      each asychronous load started in setUpTests.
+//
+//   When every synchronous loaded document has completed,
+//      the page status is changed which allows the
+//      body of the test to be executed.
+function loadComplete() {
+    if (++docsLoaded == 1) {
+        setUpPageStatus = 'complete';
+    }
+}
+
+
+/**
+*       
+      Retrieve the XPathEvaluator on which the
+      "evaluate("/", document, null, 0, null)" method is invoked with the document
+      element. The method should return an XPathResult.
+    
+* @author Philippe Le Hégaret
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#XPathEvaluator-evaluate
+*/
+function XPathEvaluator_evaluate_document() {
+   var success;
+    if(checkInitialization(builder, "XPathEvaluator_evaluate_document") != null) return;
+    var doc;
+      var xpEvaluator;
+      var root;
+      var result;
+      var nullNSResolver = null;
+
+      var nullResult = null;
+
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      doc = load(docRef, "doc", "staffNS");
+      xpEvaluator = createXPathEvaluator(doc);
+root =  doc;
+result = xpEvaluator.evaluate("/",root,nullNSResolver,0,nullResult);
+      assertNotNull("notnull",result);
+
+}
+
+
+
+
+function runTest() {
+   XPathEvaluator_evaluate_document();
+}
diff --git a/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_document.svg b/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_document.svg
new file mode 100644 (file)
index 0000000..b7f9fc6
--- /dev/null
@@ -0,0 +1,74 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>\r
+<!DOCTYPE svg PUBLIC "STAFF" "staffNS.dtd" \r
+[\r
+   <!ENTITY ent1 "es">\r
+   <!ENTITY ent2 "1900 Dallas Road">\r
+   <!ENTITY ent3 "Texas">\r
+   <!ENTITY ent4 "<entElement1 xmlns:local1='www.xyz.com'>Element data</entElement1><?PItarget PIdata?>">\r
+   <!ENTITY ent5 PUBLIC "entityURI" "entityFile" NDATA notation1>\r
+   <!ENTITY ent6 PUBLIC "uri" "file" NDATA notation2>\r
+   <!ENTITY ent1 "This entity should be discarded">\r
+   <!NOTATION notation1 PUBLIC "notation1File">\r
+   <!NOTATION notation2 SYSTEM "notation2File">\r
+   <!ELEMENT svg (rect, script, employee+, emp:employee, employee*)>\r
+   <!ATTLIST svg \r
+      xmlns CDATA #FIXED "http://www.w3.org/2000/svg"\r
+      name CDATA #IMPLIED>\r
+   <!ELEMENT rect EMPTY>\r
+   <!ATTLIST rect \r
+      x CDATA #REQUIRED\r
+      y CDATA #REQUIRED\r
+      width CDATA #REQUIRED\r
+      height CDATA #REQUIRED>\r
+  <!ELEMENT script (#PCDATA)>\r
+  <!ATTLIST script type CDATA #IMPLIED>      \r
+]>\r
+<!-- This is comment number 1.-->\r
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:nist="http://www.nist.gov"><rect x="0" y="0" width="100" height="100"/>\r
+<script xmlns="http://www.w3.org/1999/xhtml" src="XPathEvaluator_evaluate_document.js"/>\r
+<script xmlns="http://www.w3.org/1999/xhtml" src="svgunit.js"/>\r
+ <employee xmlns="http://www.nist.gov" xmlns:dmstc="http://www.usa.com">\r
+  <employeeId>EMP0001</employeeId>\r
+  <name>Margaret Martin</name>\r
+  <position>Accountant</position>           \r
+  <salary>56,000</salary>\r
+  <gender>Female</gender>\r
+  <address dmstc:domestic="Yes">1230 North Ave. Dallas, Texas 98551</address>\r
+ </employee>\r
+ <employee xmlns:dmstc="http://www.usa.com" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0002</employeeId>\r
+  <name>Martha Raynolds\r
+<![CDATA[This is a CDATASection with EntityReference number 2 &ent2;]]>\r
+<![CDATA[This is an adjacent CDATASection with a reference to a tab &tab;]]></name>\r
+  <position>Secretary</position>\r
+  <salary>35,000</salary>\r
+  <gender>Female</gender>\r
+  <address dmstc:domestic="Yes" street="Yes">&ent2; Dallas, &ent3;\r
+ 98554</address>\r
+ </employee>\r
+ <employee xmlns:dmstc="http://www.netzero.com" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0003</employeeId>\r
+  <name>Roger\r
+ Jones</name>\r
+  <position>Department Manager</position>\r
+  <salary>100,000</salary>\r
+  <gender>&ent4;</gender>\r
+  <address dmstc:domestic="Yes" street="No">PO Box 27 Irving, texas 98553</address>\r
+ </employee>\r
+ <emp:employee xmlns:emp="http://www.nist.gov" xmlns:nm="http://www.altavista.com" >    <emp:employeeId>EMP0004</emp:employeeId>\r
+  <nm:name>Jeny Oconnor</nm:name>\r
+  <emp:position>Personnel Director</emp:position>\r
+  <emp:salary>95,000</emp:salary>\r
+  <emp:gender>Female</emp:gender>\r
+  <emp:address emp:domestic="Yes" street="Y&ent1;" emp:zone="CANADA" emp:local1="TRUE">27 South Road. Dallas, texas 98556</emp:address>\r
+ </emp:employee>\r
+ <employee xmlns:emp2="http://www.nist.gov" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0005</employeeId>\r
+  <name>Robert Myers</name>\r
+  <position>Computer Specialist</position>\r
+  <salary>90,000</salary>\r
+  <gender>male</gender>\r
+  <address street="Yes" xmlns="http://www.nist.gov">1821 Nordic. Road, Irving Texas 98558</address>\r
+ </employee>\r
+ </svg>\r
\r
diff --git a/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_documentElement-expected.txt b/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_documentElement-expected.txt
new file mode 100644 (file)
index 0000000..4ce626e
--- /dev/null
@@ -0,0 +1,7 @@
+layer at (0,0) size 800x600
+  RenderCanvas at (0,0) size 800x600
+    KCanvasContainer {svg} at (0,0) size 100x100
+      KCanvasItem {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00L100.00,0.00L100.00,100.00L0.00,100.00"]
+      RenderSVGText {text} at (0,0) size 785x18
+        RenderText {#text} at (0,0) size 341x18
+          text run at (0,0) width 341: "XPathEvaluator_evaluate_documentElement: Success"
diff --git a/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_documentElement.js b/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_documentElement.js
new file mode 100644 (file)
index 0000000..2aea865
--- /dev/null
@@ -0,0 +1,112 @@
+
+/*
+Copyright Â© 2001-2004 World Wide Web Consortium, 
+(Massachusetts Institute of Technology, European Research Consortium 
+for Informatics and Mathematics, Keio University). All 
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the 
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even 
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['XPathEvaluator_evaluate_documentElement'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+//   This function is called by the testing framework before
+//      running the test suite.
+//
+//   If there are no configuration exceptions, asynchronous
+//        document loading is started.  Otherwise, the status
+//        is set to complete and the exception is immediately
+//        raised when entering the body of the test.
+//
+function setUpPage() {
+   setUpPageStatus = 'running';
+   try {
+     //
+     //   creates test document builder, may throw exception
+     //
+     builder = createConfiguredBuilder();
+
+      docsLoaded = 0;
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      docsLoaded += preload(docRef, "doc", "staffNS");
+        
+       if (docsLoaded == 1) {
+          setUpPage = 'complete';
+       }
+    } catch(ex) {
+       catchInitializationError(builder, ex);
+        setUpPage = 'complete';
+    }
+}
+
+
+
+//
+//   This method is called on the completion of 
+//      each asychronous load started in setUpTests.
+//
+//   When every synchronous loaded document has completed,
+//      the page status is changed which allows the
+//      body of the test to be executed.
+function loadComplete() {
+    if (++docsLoaded == 1) {
+        setUpPageStatus = 'complete';
+    }
+}
+
+
+/**
+*       
+      Retrieve the XPathEvaluator on which the
+      "evaluate("/", documentElement, null, 0, null)" method is invoked with the document
+      element. The method should return an XPathResult.
+    
+* @author Philippe Le Hégaret
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#XPathEvaluator-evaluate
+*/
+function XPathEvaluator_evaluate_documentElement() {
+   var success;
+    if(checkInitialization(builder, "XPathEvaluator_evaluate_documentElement") != null) return;
+    var doc;
+      var xpEvaluator;
+      var nullNSResolver = null;
+
+      var root;
+      var result;
+      var nullResult = null;
+
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      doc = load(docRef, "doc", "staffNS");
+      xpEvaluator = createXPathEvaluator(doc);
+root = doc.documentElement;
+
+      result = xpEvaluator.evaluate("/",root,nullNSResolver,0,nullResult);
+      assertNotNull("notnull",result);
+
+}
+
+
+
+
+function runTest() {
+   XPathEvaluator_evaluate_documentElement();
+}
diff --git a/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_documentElement.svg b/LayoutTests/dom/svg/level3/xpath/XPathEvaluator_evaluate_documentElement.svg
new file mode 100644 (file)
index 0000000..3b47143
--- /dev/null
@@ -0,0 +1,74 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>\r
+<!DOCTYPE svg PUBLIC "STAFF" "staffNS.dtd" \r
+[\r
+   <!ENTITY ent1 "es">\r
+   <!ENTITY ent2 "1900 Dallas Road">\r
+   <!ENTITY ent3 "Texas">\r
+   <!ENTITY ent4 "<entElement1 xmlns:local1='www.xyz.com'>Element data</entElement1><?PItarget PIdata?>">\r
+   <!ENTITY ent5 PUBLIC "entityURI" "entityFile" NDATA notation1>\r
+   <!ENTITY ent6 PUBLIC "uri" "file" NDATA notation2>\r
+   <!ENTITY ent1 "This entity should be discarded">\r
+   <!NOTATION notation1 PUBLIC "notation1File">\r
+   <!NOTATION notation2 SYSTEM "notation2File">\r
+   <!ELEMENT svg (rect, script, employee+, emp:employee, employee*)>\r
+   <!ATTLIST svg \r
+      xmlns CDATA #FIXED "http://www.w3.org/2000/svg"\r
+      name CDATA #IMPLIED>\r
+   <!ELEMENT rect EMPTY>\r
+   <!ATTLIST rect \r
+      x CDATA #REQUIRED\r
+      y CDATA #REQUIRED\r
+      width CDATA #REQUIRED\r
+      height CDATA #REQUIRED>\r
+  <!ELEMENT script (#PCDATA)>\r
+  <!ATTLIST script type CDATA #IMPLIED>      \r
+]>\r
+<!-- This is comment number 1.-->\r
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:nist="http://www.nist.gov"><rect x="0" y="0" width="100" height="100"/>\r
+<script xmlns="http://www.w3.org/1999/xhtml" src="XPathEvaluator_evaluate_documentElement.js"/>\r
+<script xmlns="http://www.w3.org/1999/xhtml" src="svgunit.js"/>\r
+ <employee xmlns="http://www.nist.gov" xmlns:dmstc="http://www.usa.com">\r
+  <employeeId>EMP0001</employeeId>\r
+  <name>Margaret Martin</name>\r
+  <position>Accountant</position>           \r
+  <salary>56,000</salary>\r
+  <gender>Female</gender>\r
+  <address dmstc:domestic="Yes">1230 North Ave. Dallas, Texas 98551</address>\r
+ </employee>\r
+ <employee xmlns:dmstc="http://www.usa.com" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0002</employeeId>\r
+  <name>Martha Raynolds\r
+<![CDATA[This is a CDATASection with EntityReference number 2 &ent2;]]>\r
+<![CDATA[This is an adjacent CDATASection with a reference to a tab &tab;]]></name>\r
+  <position>Secretary</position>\r
+  <salary>35,000</salary>\r
+  <gender>Female</gender>\r
+  <address dmstc:domestic="Yes" street="Yes">&ent2; Dallas, &ent3;\r
+ 98554</address>\r
+ </employee>\r
+ <employee xmlns:dmstc="http://www.netzero.com" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0003</employeeId>\r
+  <name>Roger\r
+ Jones</name>\r
+  <position>Department Manager</position>\r
+  <salary>100,000</salary>\r
+  <gender>&ent4;</gender>\r
+  <address dmstc:domestic="Yes" street="No">PO Box 27 Irving, texas 98553</address>\r
+ </employee>\r
+ <emp:employee xmlns:emp="http://www.nist.gov" xmlns:nm="http://www.altavista.com" >    <emp:employeeId>EMP0004</emp:employeeId>\r
+  <nm:name>Jeny Oconnor</nm:name>\r
+  <emp:position>Personnel Director</emp:position>\r
+  <emp:salary>95,000</emp:salary>\r
+  <emp:gender>Female</emp:gender>\r
+  <emp:address emp:domestic="Yes" street="Y&ent1;" emp:zone="CANADA" emp:local1="TRUE">27 South Road. Dallas, texas 98556</emp:address>\r
+ </emp:employee>\r
+ <employee xmlns:emp2="http://www.nist.gov" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0005</employeeId>\r
+  <name>Robert Myers</name>\r
+  <position>Computer Specialist</position>\r
+  <salary>90,000</salary>\r
+  <gender>male</gender>\r
+  <address street="Yes" xmlns="http://www.nist.gov">1821 Nordic. Road, Irving Texas 98558</address>\r
+ </employee>\r
+ </svg>\r
\r
diff --git a/LayoutTests/dom/svg/level3/xpath/XPathExpression_evaluate_NOT_SUPPORTED_ERR-expected.txt b/LayoutTests/dom/svg/level3/xpath/XPathExpression_evaluate_NOT_SUPPORTED_ERR-expected.txt
new file mode 100644 (file)
index 0000000..e224111
--- /dev/null
@@ -0,0 +1,7 @@
+layer at (0,0) size 800x600
+  RenderCanvas at (0,0) size 800x600
+    KCanvasContainer {svg} at (0,0) size 100x100
+      KCanvasItem {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#008000]}] [data="M0.00,0.00L100.00,0.00L100.00,100.00L0.00,100.00"]
+      RenderSVGText {text} at (0,0) size 785x18
+        RenderText {#text} at (0,0) size 412x18
+          text run at (0,0) width 412: "XPathExpression_evaluate_NOT_SUPPORTED_ERR: Success"
diff --git a/LayoutTests/dom/svg/level3/xpath/XPathExpression_evaluate_NOT_SUPPORTED_ERR.js b/LayoutTests/dom/svg/level3/xpath/XPathExpression_evaluate_NOT_SUPPORTED_ERR.js
new file mode 100644 (file)
index 0000000..5731c3c
--- /dev/null
@@ -0,0 +1,121 @@
+
+/*
+Copyright Â© 2001-2004 World Wide Web Consortium, 
+(Massachusetts Institute of Technology, European Research Consortium 
+for Informatics and Mathematics, Keio University). All 
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the 
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even 
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['XPathExpression_evaluate_NOT_SUPPORTED_ERR'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+//   This function is called by the testing framework before
+//      running the test suite.
+//
+//   If there are no configuration exceptions, asynchronous
+//        document loading is started.  Otherwise, the status
+//        is set to complete and the exception is immediately
+//        raised when entering the body of the test.
+//
+function setUpPage() {
+   setUpPageStatus = 'running';
+   try {
+     //
+     //   creates test document builder, may throw exception
+     //
+     builder = createConfiguredBuilder();
+
+      docsLoaded = 0;
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      docsLoaded += preload(docRef, "doc", "staffNS");
+        
+       if (docsLoaded == 1) {
+          setUpPage = 'complete';
+       }
+    } catch(ex) {
+       catchInitializationError(builder, ex);
+        setUpPage = 'complete';
+    }
+}
+
+
+
+//
+//   This method is called on the completion of 
+//      each asychronous load started in setUpTests.
+//
+//   When every synchronous loaded document has completed,
+//      the page status is changed which allows the
+//      body of the test to be executed.
+function loadComplete() {
+    if (++docsLoaded == 1) {
+        setUpPageStatus = 'complete';
+    }
+}
+
+
+/**
+*       
+      Test if XPathExpression.evaluate properly throws NOT_SUPPORTED_ERROR
+    
+* @author Philippe Le Hégaret
+* @author Bob Clary
+* @see http://www.w3.org/TR/2003/CR-DOM-Level-3-XPath-20030331/xpath#XPathExpression-evaluate
+*/
+function XPathExpression_evaluate_NOT_SUPPORTED_ERR() {
+   var success;
+    if(checkInitialization(builder, "XPathExpression_evaluate_NOT_SUPPORTED_ERR") != null) return;
+    var doc;
+      var xpEvaluator;
+      var result;
+      var nullNSResolver = null;
+
+      var nullResult = null;
+
+      var contextNode;
+      var xpathExpression;
+      
+      var docRef = null;
+      if (typeof(this.doc) != 'undefined') {
+        docRef = this.doc;
+      }
+      doc = load(docRef, "doc", "staffNS");
+      xpEvaluator = createXPathEvaluator(doc);
+xpathExpression = xpEvaluator.createExpression("//foo",nullNSResolver);
+      contextNode = doc.createEntityReference("entityname");
+      
+       {
+               success = false;
+               try {
+            result = xpathExpression.evaluate(contextNode,0,nullResult);
+        }
+               catch(ex) {
+      success = (typeof(ex.code) != 'undefined' && ex.code == 9);
+               }
+               assertTrue("throw_NOT_SUPPORTED_ERR",success);
+       }
+
+}
+
+
+
+
+function runTest() {
+   XPathExpression_evaluate_NOT_SUPPORTED_ERR();
+}
diff --git a/LayoutTests/dom/svg/level3/xpath/XPathExpression_evaluate_NOT_SUPPORTED_ERR.svg b/LayoutTests/dom/svg/level3/xpath/XPathExpression_evaluate_NOT_SUPPORTED_ERR.svg
new file mode 100644 (file)
index 0000000..c2fc5c4
--- /dev/null
@@ -0,0 +1,74 @@
+<?xml version="1.0"?><?TEST-STYLE PIDATA?>\r
+<!DOCTYPE svg PUBLIC "STAFF" "staffNS.dtd" \r
+[\r
+   <!ENTITY ent1 "es">\r
+   <!ENTITY ent2 "1900 Dallas Road">\r
+   <!ENTITY ent3 "Texas">\r
+   <!ENTITY ent4 "<entElement1 xmlns:local1='www.xyz.com'>Element data</entElement1><?PItarget PIdata?>">\r
+   <!ENTITY ent5 PUBLIC "entityURI" "entityFile" NDATA notation1>\r
+   <!ENTITY ent6 PUBLIC "uri" "file" NDATA notation2>\r
+   <!ENTITY ent1 "This entity should be discarded">\r
+   <!NOTATION notation1 PUBLIC "notation1File">\r
+   <!NOTATION notation2 SYSTEM "notation2File">\r
+   <!ELEMENT svg (rect, script, employee+, emp:employee, employee*)>\r
+   <!ATTLIST svg \r
+      xmlns CDATA #FIXED "http://www.w3.org/2000/svg"\r
+      name CDATA #IMPLIED>\r
+   <!ELEMENT rect EMPTY>\r
+   <!ATTLIST rect \r
+      x CDATA #REQUIRED\r
+      y CDATA #REQUIRED\r
+      width CDATA #REQUIRED\r
+      height CDATA #REQUIRED>\r
+  <!ELEMENT script (#PCDATA)>\r
+  <!ATTLIST script type CDATA #IMPLIED>      \r
+]>\r
+<!-- This is comment number 1.-->\r
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:nist="http://www.nist.gov"><rect x="0" y="0" width="100" height="100"/>\r
+<script xmlns="http://www.w3.org/1999/xhtml" src="XPathExpression_evaluate_NOT_SUPPORTED_ERR.js"/>\r
+<script xmlns="http://www.w3.org/1999/xhtml" src="svgunit.js"/>\r
+ <employee xmlns="http://www.nist.gov" xmlns:dmstc="http://www.usa.com">\r
+  <employeeId>EMP0001</employeeId>\r
+  <name>Margaret Martin</name>\r
+  <position>Accountant</position>           \r
+  <salary>56,000</salary>\r
+  <gender>Female</gender>\r
+  <address dmstc:domestic="Yes">1230 North Ave. Dallas, Texas 98551</address>\r
+ </employee>\r
+ <employee xmlns:dmstc="http://www.usa.com" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0002</employeeId>\r
+  <name>Martha Raynolds\r
+<![CDATA[This is a CDATASection with EntityReference number 2 &ent2;]]>\r
+<![CDATA[This is an adjacent CDATASection with a reference to a tab &tab;]]></name>\r
+  <position>Secretary</position>\r
+  <salary>35,000</salary>\r
+  <gender>Female</gender>\r
+  <address dmstc:domestic="Yes" street="Yes">&ent2; Dallas, &ent3;\r
+ 98554</address>\r
+ </employee>\r
+ <employee xmlns:dmstc="http://www.netzero.com" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0003</employeeId>\r
+  <name>Roger\r
+ Jones</name>\r
+  <position>Department Manager</position>\r
+  <salary>100,000</salary>\r
+  <gender>&ent4;</gender>\r
+  <address dmstc:domestic="Yes" street="No">PO Box 27 Irving, texas 98553</address>\r
+ </employee>\r
+ <emp:employee xmlns:emp="http://www.nist.gov" xmlns:nm="http://www.altavista.com" >    <emp:employeeId>EMP0004</emp:employeeId>\r
+  <nm:name>Jeny Oconnor</nm:name>\r
+  <emp:position>Personnel Director</emp:position>\r
+  <emp:salary>95,000</emp:salary>\r
+  <emp:gender>Female</emp:gender>\r
+  <emp:address emp:domestic="Yes" street="Y&ent1;" emp:zone="CANADA" emp:local1="TRUE">27 South Road. Dallas, texas 98556</emp:address>\r
+ </emp:employee>\r
+ <employee xmlns:emp2="http://www.nist.gov" xmlns="http://www.w3.org/2001/DOM-Test-Suite/Level-2/Files">\r
+  <employeeId>EMP0005</employeeId>\r
+  <name>Robert Myers</name>\r
+  <position>Computer Specialist</position>\r
+  <salary>90,000</salary>\r
+  <gender>male</gender>\r
+  <address street="Yes" xmlns="http://www.nist.gov">1821 Nordic. Road, Irving Texas 98558</address>\r
+ </employee>\r
+ </svg>\r
\r
diff --git a/LayoutTests/dom/svg/level3/xpath/XPathExpression_evaluate_WRONG_DOCUMENT_ERR-expected.txt b/LayoutTests/dom/svg/level3/xpath/XPathExpression_evaluate_WRONG_DOCUMENT_ERR-expected.txt
new file mode 100644 (file)
index 0000000..6bbd65f
--- /dev/null
@@ -0,0 +1,10 @@
+layer at (0,0) size 800x600
+  RenderCanvas at (0,0) size 800x600
+    KCanvasContainer {svg} at (0,0) size 100x100
+      KCanvasItem {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#FFFF00]}] [data="M0.00,0.00L100.00,0.00L100.00,100.00L0.00,100.00"]
+      RenderSVGText {text} at (0,0) size 785x18
+        RenderText {#text} at (0,0) size 476x18
+          text run at (0,0) width 476: "Tests with multiple loads of different documents are not currently supported"
+      RenderSVGText {text} at (0,0) size 785x18
+        RenderText {#text} at (0,0) size 381x18
+          text run at (0,0) width 381: "XPathExpression_evaluate_WRONG_DOCUMENT_ERR"
diff --git a/LayoutTests/dom/svg/level3/xpath/XPathExpression_evaluate_WRONG_DOCUMENT_ERR.js b/LayoutTests/dom/svg/level3/xpath/XPathExpression_evaluate_WRONG_DOCUMENT_ERR.js
new file mode 100644 (file)
index 0000000..0379ea2
--- /dev/null
@@ -0,0 +1,135 @@
+
+/*
+Copyright Â© 2001-2004 World Wide Web Consortium, 
+(Massachusetts Institute of Technology, European Research Consortium 
+for Informatics and Mathematics, Keio University). All 
+Rights Reserved. This work is distributed under the W3C® Software License [1] in the 
+hope that it will be useful, but WITHOUT ANY WARRANTY; without even 
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+*/
+
+
+// expose test function names
+function exposeTestFunctionNames()
+{
+return ['XPathExpression_evaluate_WRONG_DOCUMENT_ERR'];
+}
+
+var docsLoaded = -1000000;
+var builder = null;
+
+//
+//   This function is called by the testing framework before