File: apa.html

package info (click to toggle)
xmlunit 1.6-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 2,456 kB
  • sloc: java: 11,316; xml: 4,515; makefile: 8; php: 1
file content (171 lines) | stat: -rw-r--r-- 13,116 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>A.Changes</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="XMLUnit Java User's Guide"><link rel="up" href="index.html" title="XMLUnit Java User's Guide"><link rel="prev" href="ar01s06.html" title="6.DOM Tree Walking"><link rel="next" href="apas02.html" title="A.2.Changes from XMLUnit 1.1 to 1.2"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">A.Changes</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ar01s06.html">Prev</a></td><th width="60%" align="center"></th><td width="20%" align="right"><a accesskey="n" href="apas02.html">Next</a></td></tr></table><hr></div><div class="appendix"><div class="titlepage"><div><div><h2 class="title"><a name="changes"></a>A.Changes</h2></div></div></div>
    

    <div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="Changes%201.1"></a>A.1.Changes from XMLUnit 1.0 to 1.1</h3></div></div></div>
      

      <p>XMLUnit 1.1's main focus was to add two features that have
        been asked for repeatedly:</p>

      <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">Support for XML Namespaces in XPath
          processing</li><li class="listitem">Support for XML Schema validation.</li></ul></div>

      <p>In addition some JAXP features that have been added after
      the release of XMLUnit 1.0 are now supported - most notably
      XPath support - and all reported bugs and feature requests have
      been addressed.</p>

      <div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="Breaking%20Changes%201.1"></a>A.1.1.Breaking Changes</h4></div></div></div>
        

        <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
            <code class="literal">XMLTestCase</code> is now abstract.  You
            probably have never created instances of this class
            without subclassing it, but if you did, your code will now
            break.  You will most likely want to look at the
            <code class="literal">XMLAssert</code> class.
          </li><li class="listitem">
            <p>All methods that have been deprecated in XMLUnit 1.0
            have been removed.</p>
          </li><li class="listitem">
            <p>All methods that had been declared to throw
            <code class="literal">TransformerConfigurationException</code> or
            <code class="literal">ParserConfigurationException</code> now no
            longer declare it.  Exceptions of these types cannot be
            recovered from anyway, so XMLUnit will now wrap them in a
            <code class="literal">org.custommonkey.xmlunit.exceptions.ConfigurationException</code>
            which is an unchecked exception.</p>

            <p>This change doesn't have a big impact on your tests,
            but if you tried to catch these exceptions they will now
            bypass your catch blocks.</p>
          </li><li class="listitem">
            <p>A new type of <code class="literal">Difference</code>
            (<code class="literal">CHILD_NODE_NOT_FOUND_ID</code>) has been
            added.  It will be raised for the excess children if the
            control element has more child nodes than the test element
            - or vice versa.</p>

            <p>Prior to XMLUnit 1.1 a <code class="literal">Difference</code>
            of either <code class="literal">ELEMENT_TAG_NAME_ID</code> or
            <code class="literal">NODE_TYPE_ID</code> would have been raised if
            the control element had more children.  The excess
            children were compared to the very first child node of the
            test element.  Excess children of the test element were
            not reported at all.</p>
          </li><li class="listitem">
            <p>The <code class="literal">schemaLocation</code> and
            <code class="literal">noNamespaceSchemaLocation</code> attributes of
            the XMLSchema-Instance Namespace are now treated in a
            different way from "normal" attributes.  They will be
            flagged as new kinds of <code class="literal">Difference</code> that
            is recoverable.</p>

            <p>This means that two pieces of XML that were
            different in XMLUnit 1.0 because they differed in one of
            the two attributes will be similar in XMLUnit 1.1.</p>
          </li><li class="listitem">
            <p>When comparing two elements that differ on
            attributes the comparison is now symmetric.</p>

            <p>In XMLUnit 1.0 if an attribute was present on the
            test but not the control element this wasn't flagged as a
            <code class="literal">Difference</code>; in XMLUnit 1.1 it
            is.</p>

            <p>In most practical cases this doesn't cause any
            problems since the two elements either have a different
            number of attributes or there are attributes in the
            control element that are missing in the test element - so
            the pieces of XML have been flagged as different before as
            well.  If you are using <code class="literal">DetailedDiff</code>
            this change may lead to more detected
            <code class="literal">Difference</code>s, though.</p>
          </li></ul></div>
      </div>

      <div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="New%20Features%201.1"></a>A.1.2.New Features</h4></div></div></div>
        

        <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">XMLUnit 1.0 shipped with rudimentary support for
          XML Schema validation (it worked with Apache Xerces-J but no
          other parsers).  XMLUnit 1.1 supports Schema validation for
          any JAXP compliant XML parser (that supports Schema itself).
          You can also tell XMLUnit where to look for the XML Schema
          definitions.  See <a class="xref" href="ar01s04.html#XML%20Schema%20Validation" title="4.1.2.XML Schema Validation">Section4.1.2, &#8220;XML Schema Validation&#8221;</a> for
          details.</li><li class="listitem">XPath support has undergone significant changes,
          see <a class="xref" href="ar01s05.html" title="5.XPath Tests">Section5, &#8220;XPath Tests&#8221;</a> for more details.  In particular
          XMLUnit will now use <code class="literal">javax.xml.xpath</code> if
          it is available (which also helps to avoid the buggy XSLTC
          version that is the default transformer engine in Java 5)
          and supports XML namespaces.</li><li class="listitem">Several new configuration options have been added,
            see <a class="xref" href="ar01s03.html#Comparing:%20Configuration" title="3.8.Configuration Options">Section3.8, &#8220;Configuration Options&#8221;</a>.
            <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem">Treat CDATA sections and Texts alike.  <a class="ulink" href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1262148&amp;group_id=23187&amp;atid=377768" target="_top">Issue
              1262148</a>.</li><li class="listitem">Ignore differences in Text whitespace.  <a class="ulink" href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=754812&amp;group_id=23187&amp;atid=377771" target="_top">Issue
              754812</a>.</li><li class="listitem">Ignore comments completely.  <a class="ulink" href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=707255&amp;group_id=23187&amp;atid=377770" target="_top">Issue
              707255</a>.</li><li class="listitem">Ignore the order of attributes.</li></ul></div>
          </li><li class="listitem">It is now possible to provide a custom
          <code class="literal">org.xml.sax.EntityResolver</code> for control
          and test parsers.</li><li class="listitem">It is now possible to provide a custom
          <code class="literal">javax.xml.transform.URIResolver</code> for
          transformations.</li><li class="listitem">New overloads have been added that allow
          <code class="literal">org.xml.sax.InputSource</code> to be used as a
          "piece of XML" in many classes.</li><li class="listitem"><code class="literal">Validator</code> will now use the
          custom <code class="literal">EntityResolver</code>  <a class="link" href="ar01s02.html#EntityResolver" title="2.4.2.EntityResolver">configured</a> for the "control"
          parser as a fallback.</li><li class="listitem">
            <p>A new package
              <code class="literal">org.custommonkey.xmlunit.examples</code> has
              been added that showcases some of XMLUnit's abilities.
              It currently contains two classes:</p>

            <div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem">
                <code class="literal">MultiLevelElementNameAndTextQualifier</code>
                see <a class="xref" href="ar01s03.html#MultiLevelElementNameAndTextQualifier" title="3.4.5.org.custommonkey.xmlunit.examples.MultiLevelElementNameAndTextQualifier">Section3.4.5, &#8220;<code class="literal">org.custommonkey.xmlunit.examples.MultiLevelElementNameAndTextQualifier</code>&#8221;</a> for
                a description.</li><li class="listitem"><code class="literal">XPathRegexAssert</code> that
              provides a JUnit 3.x like
              <code class="literal">assertXPathMatches</code> method to verify
              that the string-ified value of an XPath match matches a
              given regular expression (requires JDK 1.4 or
              above).</li></ol></div>
          </li></ul></div>
      </div>

      <div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="Bugfixes%201.1"></a>A.1.3.Important Bug Fixes</h4></div></div></div>
        

        <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><code class="literal">ElementNameAndAttributeQualifier</code>
          would throw an <code class="literal">NullPointerException</code> if
          the control piece of XML contained attributes that were
          missing in the test piece of XML.  <a class="ulink" href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=952920&amp;group_id=23187&amp;atid=377768" target="_top">Issue
          952920</a>.</li><li class="listitem">
            <code class="literal">XMLTestCase.assertXMLNotEqual(String, Reader,
            Reader)</code> delegated to
            <code class="literal">assertXMLEqual</code> instead of
            <code class="literal">assertXMLNotEqual</code> internally, negating
            the assertion's logic.  <a class="ulink" href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=956372&amp;group_id=23187&amp;atid=377768" target="_top">Issue
            956372</a>.</li><li class="listitem"><code class="literal">XMLTestCase.assertXMLIdentical(Diff,
          boolean)</code> delegated to
          <code class="literal">assertXMLEqual</code>, weakening the
          assertion.</li><li class="listitem">Under certain circumstances the reported XPath
          expressions for nodes that showed differences were wrong.
          XMLUnit could lose the root element or erroneously append an
          extra attribute name.  Issues <a class="ulink" href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1047364&amp;group_id=23187&amp;atid=377768" target="_top">1047364</a>
          and <a class="ulink" href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1027863&amp;group_id=23187&amp;atid=377770" target="_top">1027863</a>.</li><li class="listitem">
            <code class="literal">TolerantSaxParser</code>'s logic in
            <code class="literal">characters</code> was broken and could cause
            <code class="literal">StringIndexOutOfBoundsException</code>s.
            <a class="ulink" href="http://sourceforge.net/tracker/index.php?func=detail&amp;aid=1150234&amp;group_id=23187&amp;atid=377768" target="_top">Issue 1150234</a>.</li></ul></div>
      </div>
    </div>

    

    

    

    

    

  </div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ar01s06.html">Prev</a></td><td width="20%" align="center"></td><td width="40%" align="right"><a accesskey="n" href="apas02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">6.DOM Tree Walking</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">A.2.Changes from XMLUnit 1.1 to 1.2</td></tr></table></div></body></html>