Test http://www.w3.org/2001/DOM-Test-Suite/level3/ls/DOMBuilderFilterTest0

<test name='DOMBuilderFilterTest0' schemaLocation='http://www.w3.org/2001/DOM-Test-Suite/Level-3 dom3.xsd'>
     <metadata>
          <title>DOMBuilderFilterTest0</title>
          <creator>Jeroen van Rotterdam</creator>
          <description>Parses a document twice, once using a filter to reject all elt1 elements.</description>
          <contributor>X-Hive Corporation</contributor>
          <date qualifier='created'>2002-03-23</date>
          <subject resource='http://www.w3.org/TR/2003/CR-DOM-Level-3-LS-20031107/load-save#LS-LSParser-filter'/>
          <subject resource='http://www.w3.org/TR/2003/CR-DOM-Level-3-LS-20031107/load-save#LS-LSParserFilter-startElement'/>
          <subject resource='http://www.w3.org/TR/2003/CR-DOM-Level-3-LS-20031107/load-save#LS-LSParserFilter-whatToShow'/>
</metadata>
     <var name='myfilter' type='LSParserFilter'>
          <var name='name' type='DOMString'/>
          <startElement>
               <nodeName var='name' obj='elementArg'/>
               <if>
                    <equals actual='name' expected='"elt1"' ignoreCase='false'/>
                    <return value='2'/>
                    <else>
                         <return value='1'/>
                    </else>
               </if>
          </startElement>
          <acceptNode>
               <return value='1'/>
          </acceptNode>
          <whatToShow>
               <get>
                    <return value='1'/>
               </get>
          </whatToShow>
     </var>
     <var name='list' type='NodeList'/>
     <var name='count' type='int'/>
     <var name='resourceURI' type='DOMString'/>
     <var name='implementation' type='DOMImplementation'/>
     <var name='lsImplementation' type='DOMImplementationLS'/>
     <var name='inputSource' type='LSInput'/>
     <var name='document' type='Document'/>
     <var name='writer' type='LSSerializer'/>
     <var name='builder' type='LSParser'/>
     <!-- constants -->
     <var name='MODE_SYNCHRONOUS' type='short' value='1'/>
     <var name='MODE_ASYNCHRONOUS' type='short' value='2'/>
     <var name='DTD_SCHEMATYPE' type='DOMString' value='"http://www.w3.org/TR/REC-xml"'/>
     <var name='SCHEMA_SCHEMATYPE' type='DOMString' value='"http://www.w3.org/2001/XMLSchema"'/>
     <var name='NULL_SCHEMATYPE' type='DOMString' isNull='true'/>
     <!-- action types DOMParser.parseWithContext -->
     <var name='ACTION_REPLACE_CHILDREN' type='short' value='2'/>
     <var name='ACTION_APPEND_AS_CHILDREN' type='short' value='1'/>
     <var name='ACTION_INSERT_AFTER' type='short' value='4'/>
     <var name='ACTION_INSERT_BEFORE' type='short' value='3'/>
     <var name='ACTION_REPLACE' type='short' value='5'/>
     <!-- testfiles -->
     <var name='TEST0' type='DOMString' value='"test0"'/>
     <var name='TEST1' type='DOMString' value='"test1"'/>
     <var name='TEST2' type='DOMString' value='"test2"'/>
     <var name='TEST3' type='DOMString' value='"test3"'/>
     <var name='TEST4' type='DOMString' value='"test4"'/>
     <var name='TEST5' type='DOMString' value='"test5"'/>
     <var name='TEST6' type='DOMString' value='"test6"'/>
     <var name='TEST7' type='DOMString' value='"test7"'/>
     <var name='TESTPDF' type='DOMString' value='"testpdf"'/>
     <implementation var='implementation'/>
     <assign var='lsImplementation' value='implementation'/>
     <createLSParser var='builder' obj='lsImplementation' mode='MODE_SYNCHRONOUS' schemaType='NULL_SCHEMATYPE'/>
     <createLSSerializer var='writer' obj='lsImplementation'/>
     <createLSInput var='inputSource' obj='lsImplementation'/>
     <getResourceURI var='resourceURI' href='TEST1'/>
     <parseURI var='document' obj='builder' uri='resourceURI'/>
     <getElementsByTagName var='list' obj='document' tagname='"elt1"' interface='Document'/>
     <length var='count' obj='list' interface='NodeList'/>
     <assertEquals actual='count' expected='1' ignoreCase='false' id='filter_count_1'/>
     <filter obj='builder' value='myfilter' interface='LSParser'/>
     <parseURI var='document' obj='builder' uri='resourceURI'/>
     <assertNotNull actual='document' id='secondParseDocumentNotNull'/>
     <getElementsByTagName var='list' obj='document' tagname='"elt1"' interface='Document'/>
     <length var='count' obj='list' interface='NodeList'/>
     <assertEquals actual='count' expected='0' ignoreCase='false' id='filter_count_2'/>
</test>

Copyright (c) 2001-2004 World Wide Web Consortium, (Massachusetts Institute of Technology, Institut National de Recherche en Informatique et en Automatique, Keio University). All Rights Reserved. This program is distributed under the W3C's Software Intellectual Property License. This program is distributed 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.

See W3C License http://www.w3.org/Consortium/Legal/ for more details.