<?xml version="1.0" standalone="no"?>
<?xml-stylesheet href="test-to-html.xsl" type="text/xml"?>
<!--
 Copyright (c) 2003 X-Hive Corporation

 All Rights Reserved. This work is distributed under the W3C(r)
 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
-->


<!DOCTYPE test SYSTEM "dom3.dtd" [
  <!ENTITY % entities SYSTEM "dom3tests.ent">
  %entities;
]>


<test xmlns="&level3;" name="DOMBuilderFilterTest2">
  <metadata>
    <title>DOMBuilderFilterTest2</title>
    &creator;
    <description>Checks that attributes are visible when elements are passed to LSParserFilter.startElement.</description>
    &contributor; &date;
    <subject resource="&spec;#LS-Interfaces-LSParserFilter"/>
    <subject resource="http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save#LS-LSParserFilter-startElement"/>
  </metadata>
  <var name="resourceURI" type="DOMString"/>

  <var name="myfilter" type="LSParserFilter">
     &filterVars;
     <var name="name"         type="DOMString"/>
     <var name="hasattribute" type="boolean"/>

     <startElement>

       <nodeName var="name" obj="elementArg"/>
        <if>
            <equals actual="name" expected='"elt1"' ignoreCase="false"/>
            <hasAttribute var="hasattribute" obj="elementArg" name='"attr1"'/>
            <assertTrue actual="hasattribute" id="default_content_check"/>
        </if>

        <return value="&FILTER_ACCEPT;"/>
     </startElement>

     <acceptNode>
        <return value="&FILTER_ACCEPT;"/>
     </acceptNode>

     <whatToShow>
       <get>
        <return value="&SHOW_ALL;"/>
       </get>
     </whatToShow>

  </var>

  &vars;
  &init;

  &parser.setFilter_myfilter;

  <getResourceURI var="resourceURI" href="TEST3"/>
  <parseURI  var="document" obj="parser" uri="resourceURI"/>

</test>





