jasons      2003/11/11 05:43:36

  Added:       targets/xerces-p enumval.html senumval.html
               targets/xerces-p/graphics dom2hash-header.jpg
                        download-label-2.jpg enumval-header.jpg
                        sax2count-header.jpg saxcount-header.jpg
                        senumval-header.jpg
  Log:
  new
  
  Revision  Changes    Path
  1.1                  xml-site/targets/xerces-p/enumval.html
  
  Index: enumval.html
  ===================================================================
  <HTML><HEAD><SCRIPT language="JavaScript" src="resources/script.js" 
type="text/javascript"></SCRIPT><TITLE>EnumVal.pl</TITLE></HEAD><BODY 
alink="#ff0000" bgcolor="#ffffff" leftmargin="4" link="#0000ff" 
marginheight="4" marginwidth="4" text="#000000" topmargin="4" 
vlink="#0000aa"><TABLE border="0" cellpadding="0" cellspacing="0" 
width="620"><TR><TD align="left" height="60" rowspan="3" valign="top" 
width="135"><IMG border="0" height="60" hspace="0" src="resources/logo.gif" 
vspace="0" width="135"></TD><TD align="left" colspan="4" height="5" 
valign="top" width="456"><IMG border="0" height="5" hspace="0" 
src="resources/line.gif" vspace="0" width="456"></TD><TD align="left" 
height="60" rowspan="3" valign="top" width="29"><IMG border="0" height="60" 
hspace="0" src="resources/right.gif" vspace="0" width="29"></TD></TR><TR><TD 
align="left" bgcolor="#0086b2" colspan="4" height="35" valign="top" 
width="456"><IMG alt="" border="0" height="35" hspace="0" 
src="graphics/enumval-header.jpg" vspace="0" width="456"></TD></TR><TR><TD 
align="left" height="20" valign="top" width="168"><IMG border="0" height="20" 
hspace="0" src="resources/bottom.gif" vspace="0" width="168"></TD><TD 
align="left" height="20" valign="top" width="96"><A 
href="http://xml.apache.org/"; onMouseOut="rolloverOff('xml');" 
onMouseOver="rolloverOn('xml');" target="new"><IMG alt="http://xml.apache.org/"; 
border="0" height="20" hspace="0" name="xml" 
onLoad="rolloverLoad('xml','resources/button-xml-hi.gif','resources/button-xml-lo.gif');"
 src="resources/button-xml-lo.gif" vspace="0" width="96"></A></TD><TD 
align="left" height="20" valign="top" width="96"><A 
href="http://www.apache.org/"; onMouseOut="rolloverOff('asf');" 
onMouseOver="rolloverOn('asf');" target="new"><IMG alt="http://www.apache.org/"; 
border="0" height="20" hspace="0" name="asf" 
onLoad="rolloverLoad('asf','resources/button-asf-hi.gif','resources/button-asf-lo.gif');"
 src="resources/button-asf-lo.gif" vspace="0" width="96"></A></TD><TD 
align="left" height="20" valign="top" width="96"><A href="http://www.w3.org/"; 
onMouseOut="rolloverOff('w3c');" onMouseOver="rolloverOn('w3c');" 
target="new"><IMG alt="http://www.w3.org/"; border="0" height="20" hspace="0" 
name="w3c" 
onLoad="rolloverLoad('w3c','resources/button-w3c-hi.gif','resources/button-w3c-lo.gif');"
 src="resources/button-w3c-lo.gif" vspace="0" 
width="96"></A></TD></TR></TABLE><TABLE border="0" cellpadding="0" 
cellspacing="0" width="620"><TR><TD align="left" valign="top" width="120"><IMG 
border="0" height="14" hspace="0" src="resources/join.gif" vspace="0" 
width="120"><BR>
    <A href="../index.html" onMouseOut="rolloverOff('side-ext-2');" 
onMouseOver="rolloverOn('side-ext-2');"><IMG alt="Home" border="0" height="12" 
hspace="0" name="side-ext-2" 
onLoad="rolloverLoad('side-ext-2','graphics/ext-2-label-2.jpg','graphics/ext-2-label-3.jpg');"
 src="graphics/ext-2-label-3.jpg" vspace="0" width="120"></A><BR>
    <IMG border="0" height="6" hspace="0" src="resources/separator.gif" 
vspace="0" width="120"><BR>
    <A href="index.html" onMouseOut="rolloverOff('side-index');" 
onMouseOver="rolloverOn('side-index');"><IMG alt="Readme" border="0" 
height="12" hspace="0" name="side-index" 
onLoad="rolloverLoad('side-index','graphics/index-label-2.jpg','graphics/index-label-3.jpg');"
 src="graphics/index-label-3.jpg" vspace="0" width="120"></A><BR>
    <A href="samples.html" onMouseOut="rolloverOff('side-samples');" 
onMouseOver="rolloverOn('side-samples');"><IMG alt="Samples" border="0" 
height="12" hspace="0" name="side-samples" 
onLoad="rolloverLoad('side-samples','graphics/samples-label-2.jpg','graphics/samples-label-3.jpg');"
 src="graphics/samples-label-3.jpg" vspace="0" width="120"></A><BR>
    <A href="download.html" onMouseOut="rolloverOff('side-download');" 
onMouseOver="rolloverOn('side-download');"><IMG alt="Download" border="0" 
height="12" hspace="0" name="side-download" 
onLoad="rolloverLoad('side-download','graphics/download-label-2.jpg','graphics/download-label-3.jpg');"
 src="graphics/download-label-3.jpg" vspace="0" width="120"></A><BR>
    
    
    
    
    
    
    
    
    <IMG border="0" height="6" hspace="0" src="resources/separator.gif" 
vspace="0" width="120"><BR>
    <A href="releases.html" onMouseOut="rolloverOff('side-releases');" 
onMouseOver="rolloverOn('side-releases');"><IMG alt="Releases" border="0" 
height="12" hspace="0" name="side-releases" 
onLoad="rolloverLoad('side-releases','graphics/releases-label-2.jpg','graphics/releases-label-3.jpg');"
 src="graphics/releases-label-3.jpg" vspace="0" width="120"></A><BR>
  <IMG border="0" height="14" hspace="0" src="resources/close.gif" vspace="0" 
width="120"><BR></TD><TD align="left" valign="top" width="500"><TABLE 
border="0" cellpadding="3" cellspacing="0"><TR><TD>
        <DIV align="right"><TABLE border="0" cellpadding="0" cellspacing="4" 
width="464"><TR><TD bgcolor="#0086b2" height="1" width="1"><IMG border="0" 
height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD 
bgcolor="#0086b2" height="1" width="462"><IMG border="0" height="1" hspace="0" 
src="resources/void.gif" vspace="0" width="462"></TD><TD bgcolor="#0086b2" 
height="1" width="1"><IMG border="0" height="1" hspace="0" 
src="resources/void.gif" vspace="0" width="1"></TD></TR><TR><TD 
bgcolor="#0086b2" width="1"><IMG border="0" height="1" hspace="0" 
src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#ffffff" 
width="462"><FONT size="-1"><PRE>
  use strict;
  use XML::Xerces qw(error);
  use Getopt::Long;
  use Benchmark;
  use vars qw(%OPTIONS);
  
  #
  # Read and validate command line args
  #
  
  my $USAGE = &lt;&lt;EOU;
  USAGE: $0 file
  EOU
  my $VERSION = q[$Id: enumval.html,v 1.1 2003/11/11 13:43:36 jasons Exp $ ];
  
  my $rc = GetOptions(\%OPTIONS,
                    'help');
  
  die $USAGE if exists $OPTIONS{help};
  die $USAGE unless scalar @ARGV;
  
  my $file = $ARGV[0];
  -f $file or die &quot;File '$file' does not exist!\n&quot;;
  
  my $val_to_use = XML::Xerces::DTDValidator-&gt;new();
  my $parser = XML::Xerces::SAXParser-&gt;new($val_to_use);
  $parser-&gt;setValidationScheme ($XML::Xerces::AbstractDOMParser::Val_Auto);
  $parser-&gt;setErrorHandler(XML::Xerces::PerlErrorHandler-&gt;new());
  
  my $t0 = new Benchmark;
  eval {$parser-&gt;parse ($file)};
  error($@) if $@;
  
  my $count = $parser-&gt;getErrorCount();
  if ($count == 0) {
    my $grammar = $val_to_use-&gt;getGrammar();
    my $iterator = $grammar-&gt;getElemEnumerator();
    if ($iterator-&gt;hasMoreElements()) {
      while ($iterator-&gt;hasMoreElements()) {
        my $elem = $iterator-&gt;nextElement();
        printf STDOUT &quot;Element Name: %s, Content Model: %s\n&quot;,
        $elem-&gt;getFullName(),
        $elem-&gt;getFormattedContentModel();
        if ($elem-&gt;hasAttDefs()) {
        my $attr_list = $elem-&gt;getAttDefList();
        while ($attr_list-&gt;hasMoreElements()) {
          my $attr = $attr_list-&gt;nextElement();
          my $type = $attr-&gt;getType();
          my $type_name;
          if ($type == $XML::Xerces::XMLAttDef::CData) {
            $type_name = 'CDATA';
          } elsif ($type == $XML::Xerces::XMLAttDef::ID) {
            $type_name = 'ID';
          } elsif ($type == $XML::Xerces::XMLAttDef::Notation) {
            $type_name = 'NOTATION';
          } elsif ($type == $XML::Xerces::XMLAttDef::Enumeration) {
            $type_name = 'ENUMERATION';
          } elsif ($type == $XML::Xerces::XMLAttDef::Nmtoken
                   or $type == $XML::Xerces::XMLAttDef::Nmtokens
                  ) {
            $type_name = 'NMTOKEN(S)';
          } elsif ($type == $XML::Xerces::XMLAttDef::IDRef
                   or $type == $XML::Xerces::XMLAttDef::IDRefs
                  ) {
            $type_name = 'IDREF(S)';
          } elsif ($type == $XML::Xerces::XMLAttDef::Entity
                   or $type == $XML::Xerces::XMLAttDef::Entities
                  ) {
            $type_name = 'ENTITY(IES)';
          } elsif ($type == $XML::Xerces::XMLAttDef::NmToken
                   or $type == $XML::Xerces::XMLAttDef::NmTokens
                  ) {
            $type_name = 'NMTOKEN(S)';
          }
          printf STDOUT &quot;\tattribute Name: %s, Type: %s\n&quot;,
            $attr-&gt;getFullName(),
              $type_name;
        }
        }
      }
    }
  } else {
    print STDERR &quot;Errors occurred, no output available\n&quot;;
  }
  my $t1 = new Benchmark;
  my $td = timediff($t1, $t0);
  
  print STDOUT &quot;$file: duration: &quot;, timestr($td), &quot;\n&quot;;
  exit(0);
  </PRE></FONT></TD><TD bgcolor="#0086b2" width="1"><IMG border="0" height="1" 
hspace="0" src="resources/void.gif" vspace="0" width="1"></TD></TR><TR><TD 
bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" 
src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#0086b2" 
height="1" width="462"><IMG border="0" height="1" hspace="0" 
src="resources/void.gif" vspace="0" width="462"></TD><TD bgcolor="#0086b2" 
height="1" width="1"><IMG border="0" height="1" hspace="0" 
src="resources/void.gif" vspace="0" width="1"></TD></TR></TABLE></DIV>
  </TD></TR></TABLE></TD></TR></TABLE><BR><TABLE border="0" cellpadding="0" 
cellspacing="0" width="620"><TR><TD bgcolor="#0086b2"><IMG height="1" 
src="images/dot.gif" width="1"></TD></TR><TR><TD align="center"><FONT 
color="#0086b2" size="-1"><I>
                Copyright &copy; 2001 The Apache Software Foundation.
                All Rights Reserved.
              </I></FONT></TD></TR></TABLE></BODY></HTML>
  
  
  1.1                  xml-site/targets/xerces-p/senumval.html
  
  Index: senumval.html
  ===================================================================
  <HTML><HEAD><SCRIPT language="JavaScript" src="resources/script.js" 
type="text/javascript"></SCRIPT><TITLE>SEnumVal.pl</TITLE></HEAD><BODY 
alink="#ff0000" bgcolor="#ffffff" leftmargin="4" link="#0000ff" 
marginheight="4" marginwidth="4" text="#000000" topmargin="4" 
vlink="#0000aa"><TABLE border="0" cellpadding="0" cellspacing="0" 
width="620"><TR><TD align="left" height="60" rowspan="3" valign="top" 
width="135"><IMG border="0" height="60" hspace="0" src="resources/logo.gif" 
vspace="0" width="135"></TD><TD align="left" colspan="4" height="5" 
valign="top" width="456"><IMG border="0" height="5" hspace="0" 
src="resources/line.gif" vspace="0" width="456"></TD><TD align="left" 
height="60" rowspan="3" valign="top" width="29"><IMG border="0" height="60" 
hspace="0" src="resources/right.gif" vspace="0" width="29"></TD></TR><TR><TD 
align="left" bgcolor="#0086b2" colspan="4" height="35" valign="top" 
width="456"><IMG alt="" border="0" height="35" hspace="0" 
src="graphics/senumval-header.jpg" vspace="0" width="456"></TD></TR><TR><TD 
align="left" height="20" valign="top" width="168"><IMG border="0" height="20" 
hspace="0" src="resources/bottom.gif" vspace="0" width="168"></TD><TD 
align="left" height="20" valign="top" width="96"><A 
href="http://xml.apache.org/"; onMouseOut="rolloverOff('xml');" 
onMouseOver="rolloverOn('xml');" target="new"><IMG alt="http://xml.apache.org/"; 
border="0" height="20" hspace="0" name="xml" 
onLoad="rolloverLoad('xml','resources/button-xml-hi.gif','resources/button-xml-lo.gif');"
 src="resources/button-xml-lo.gif" vspace="0" width="96"></A></TD><TD 
align="left" height="20" valign="top" width="96"><A 
href="http://www.apache.org/"; onMouseOut="rolloverOff('asf');" 
onMouseOver="rolloverOn('asf');" target="new"><IMG alt="http://www.apache.org/"; 
border="0" height="20" hspace="0" name="asf" 
onLoad="rolloverLoad('asf','resources/button-asf-hi.gif','resources/button-asf-lo.gif');"
 src="resources/button-asf-lo.gif" vspace="0" width="96"></A></TD><TD 
align="left" height="20" valign="top" width="96"><A href="http://www.w3.org/"; 
onMouseOut="rolloverOff('w3c');" onMouseOver="rolloverOn('w3c');" 
target="new"><IMG alt="http://www.w3.org/"; border="0" height="20" hspace="0" 
name="w3c" 
onLoad="rolloverLoad('w3c','resources/button-w3c-hi.gif','resources/button-w3c-lo.gif');"
 src="resources/button-w3c-lo.gif" vspace="0" 
width="96"></A></TD></TR></TABLE><TABLE border="0" cellpadding="0" 
cellspacing="0" width="620"><TR><TD align="left" valign="top" width="120"><IMG 
border="0" height="14" hspace="0" src="resources/join.gif" vspace="0" 
width="120"><BR>
    <A href="../index.html" onMouseOut="rolloverOff('side-ext-2');" 
onMouseOver="rolloverOn('side-ext-2');"><IMG alt="Home" border="0" height="12" 
hspace="0" name="side-ext-2" 
onLoad="rolloverLoad('side-ext-2','graphics/ext-2-label-2.jpg','graphics/ext-2-label-3.jpg');"
 src="graphics/ext-2-label-3.jpg" vspace="0" width="120"></A><BR>
    <IMG border="0" height="6" hspace="0" src="resources/separator.gif" 
vspace="0" width="120"><BR>
    <A href="index.html" onMouseOut="rolloverOff('side-index');" 
onMouseOver="rolloverOn('side-index');"><IMG alt="Readme" border="0" 
height="12" hspace="0" name="side-index" 
onLoad="rolloverLoad('side-index','graphics/index-label-2.jpg','graphics/index-label-3.jpg');"
 src="graphics/index-label-3.jpg" vspace="0" width="120"></A><BR>
    <A href="samples.html" onMouseOut="rolloverOff('side-samples');" 
onMouseOver="rolloverOn('side-samples');"><IMG alt="Samples" border="0" 
height="12" hspace="0" name="side-samples" 
onLoad="rolloverLoad('side-samples','graphics/samples-label-2.jpg','graphics/samples-label-3.jpg');"
 src="graphics/samples-label-3.jpg" vspace="0" width="120"></A><BR>
    <A href="download.html" onMouseOut="rolloverOff('side-download');" 
onMouseOver="rolloverOn('side-download');"><IMG alt="Download" border="0" 
height="12" hspace="0" name="side-download" 
onLoad="rolloverLoad('side-download','graphics/download-label-2.jpg','graphics/download-label-3.jpg');"
 src="graphics/download-label-3.jpg" vspace="0" width="120"></A><BR>
    
    
    
    
    
    
    
    
    <IMG border="0" height="6" hspace="0" src="resources/separator.gif" 
vspace="0" width="120"><BR>
    <A href="releases.html" onMouseOut="rolloverOff('side-releases');" 
onMouseOver="rolloverOn('side-releases');"><IMG alt="Releases" border="0" 
height="12" hspace="0" name="side-releases" 
onLoad="rolloverLoad('side-releases','graphics/releases-label-2.jpg','graphics/releases-label-3.jpg');"
 src="graphics/releases-label-3.jpg" vspace="0" width="120"></A><BR>
  <IMG border="0" height="14" hspace="0" src="resources/close.gif" vspace="0" 
width="120"><BR></TD><TD align="left" valign="top" width="500"><TABLE 
border="0" cellpadding="3" cellspacing="0"><TR><TD>
        <DIV align="right"><TABLE border="0" cellpadding="0" cellspacing="4" 
width="464"><TR><TD bgcolor="#0086b2" height="1" width="1"><IMG border="0" 
height="1" hspace="0" src="resources/void.gif" vspace="0" width="1"></TD><TD 
bgcolor="#0086b2" height="1" width="462"><IMG border="0" height="1" hspace="0" 
src="resources/void.gif" vspace="0" width="462"></TD><TD bgcolor="#0086b2" 
height="1" width="1"><IMG border="0" height="1" hspace="0" 
src="resources/void.gif" vspace="0" width="1"></TD></TR><TR><TD 
bgcolor="#0086b2" width="1"><IMG border="0" height="1" hspace="0" 
src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#ffffff" 
width="462"><FONT size="-1"><PRE>
  use strict;
  use XML::Xerces qw(error);
  use Getopt::Long;
  use Benchmark;
  use vars qw(%OPTIONS);
  
  #
  # Read and validate command line args
  #
  
  my $USAGE = &lt;&lt;EOU;
  USAGE: $0 file
  EOU
  my $VERSION = q[$Id: senumval.html,v 1.1 2003/11/11 13:43:36 jasons Exp $ ];
  
  my $rc = GetOptions(\%OPTIONS,
                    'help');
  
  die $USAGE if exists $OPTIONS{help};
  die $USAGE unless scalar @ARGV;
  
  my $file = $ARGV[0];
  -f $file or die &quot;File '$file' does not exist!\n&quot;;
  
  my $val_to_use = XML::Xerces::SchemaValidator-&gt;new();
  my $parser = XML::Xerces::SAXParser-&gt;new($val_to_use);
  $parser-&gt;setValidationScheme ($XML::Xerces::AbstractDOMParser::Val_Auto);
  $parser-&gt;setErrorHandler(XML::Xerces::PerlErrorHandler-&gt;new());
  $parser-&gt;setDoNamespaces(1);
  $parser-&gt;setDoSchema(1);
  
  my $t0 = new Benchmark;
  eval {$parser-&gt;parse ($file)};
  error($@) if $@;
  
  my $count = $parser-&gt;getErrorCount();
  if ($count == 0) {
    my $grammar = $val_to_use-&gt;getGrammar();
    printf STDOUT &quot;Found Grammar: %s\n&quot;, $grammar;
    my $iterator = $grammar-&gt;getElemEnumerator();
    if ($iterator-&gt;hasMoreElements()) {
      printf STDOUT &quot;Found Elements\n&quot;;
      while ($iterator-&gt;hasMoreElements()) {
        my $elem = $iterator-&gt;nextElement();
        printf STDOUT &quot;Element Name: %s, Content Model: %s\n&quot;,
        $elem-&gt;getFullName(),
        $elem-&gt;getFormattedContentModel();
        if ($elem-&gt;hasAttDefs()) {
        my $attr_list = $elem-&gt;getAttDefList();
        while ($attr_list-&gt;hasMoreElements()) {
          my $attr = $attr_list-&gt;nextElement();
          my $type = $attr-&gt;getType();
          my $type_name;
          if ($type == $XML::Xerces::XMLAttDef::CData) {
            $type_name = 'CDATA';
          } elsif ($type == $XML::Xerces::XMLAttDef::ID) {
            $type_name = 'ID';
          } elsif ($type == $XML::Xerces::XMLAttDef::Notation) {
            $type_name = 'NOTATION';
          } elsif ($type == $XML::Xerces::XMLAttDef::Enumeration) {
            $type_name = 'ENUMERATION';
          } elsif ($type == $XML::Xerces::XMLAttDef::Nmtoken
                   or $type == $XML::Xerces::XMLAttDef::Nmtokens
                  ) {
            $type_name = 'NMTOKEN(S)';
          } elsif ($type == $XML::Xerces::XMLAttDef::IDRef
                   or $type == $XML::Xerces::XMLAttDef::IDRefs
                  ) {
            $type_name = 'IDREF(S)';
          } elsif ($type == $XML::Xerces::XMLAttDef::Entity
                   or $type == $XML::Xerces::XMLAttDef::Entities
                  ) {
            $type_name = 'ENTITY(IES)';
          } elsif ($type == $XML::Xerces::XMLAttDef::NmToken
                   or $type == $XML::Xerces::XMLAttDef::NmTokens
                  ) {
            $type_name = 'NMTOKEN(S)';
          }
          printf STDOUT &quot;\tattribute Name: %s, Type: %s\n&quot;,
            $attr-&gt;getFullName(),
              $type_name;
        }
        }
      }
    }
  } else {
    print STDERR &quot;Errors occurred, no output available\n&quot;;
  }
  my $t1 = new Benchmark;
  my $td = timediff($t1, $t0);
  
  print STDOUT &quot;$file: duration: &quot;, timestr($td), &quot;\n&quot;;
  exit(0);
  </PRE></FONT></TD><TD bgcolor="#0086b2" width="1"><IMG border="0" height="1" 
hspace="0" src="resources/void.gif" vspace="0" width="1"></TD></TR><TR><TD 
bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" 
src="resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#0086b2" 
height="1" width="462"><IMG border="0" height="1" hspace="0" 
src="resources/void.gif" vspace="0" width="462"></TD><TD bgcolor="#0086b2" 
height="1" width="1"><IMG border="0" height="1" hspace="0" 
src="resources/void.gif" vspace="0" width="1"></TD></TR></TABLE></DIV>
  </TD></TR></TABLE></TD></TR></TABLE><BR><TABLE border="0" cellpadding="0" 
cellspacing="0" width="620"><TR><TD bgcolor="#0086b2"><IMG height="1" 
src="images/dot.gif" width="1"></TD></TR><TR><TD align="center"><FONT 
color="#0086b2" size="-1"><I>
                Copyright &copy; 2001 The Apache Software Foundation.
                All Rights Reserved.
              </I></FONT></TD></TR></TABLE></BODY></HTML>
  
  
  1.1                  xml-site/targets/xerces-p/graphics/dom2hash-header.jpg
  
        <<Binary file>>
  
  
  1.1                  xml-site/targets/xerces-p/graphics/download-label-2.jpg
  
        <<Binary file>>
  
  
  1.1                  xml-site/targets/xerces-p/graphics/enumval-header.jpg
  
        <<Binary file>>
  
  
  1.1                  xml-site/targets/xerces-p/graphics/sax2count-header.jpg
  
        <<Binary file>>
  
  
  1.1                  xml-site/targets/xerces-p/graphics/saxcount-header.jpg
  
        <<Binary file>>
  
  
  1.1                  xml-site/targets/xerces-p/graphics/senumval-header.jpg
  
        <<Binary file>>
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to