<html>
<head>
<style><!--
body {background-color:#ffffff;}
.file {border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;}
.pathname {font-family:monospace; float:right;}
.fileheader {margin-bottom:.5em;}
.diff {margin:0;}
.tasklist {padding:4px;border:1px dashed #000000;margin-top:1em;}
.tasklist ul {margin-top:0;margin-bottom:0;}
tr.alt {background-color:#eeeeee}
#added {background-color:#ddffdd;}
#addedchars {background-color:#99ff99;font-weight:bolder;}
tr.alt #added {background-color:#ccf7cc;}
#removed {background-color:#ffdddd;}
#removedchars {background-color:#ff9999;font-weight:bolder;}
tr.alt #removed {background-color:#f7cccc;}
#copied {background-color:#ccccff;}
tr.alt #copied {background-color:#bbbbf7;}
#info {color:#888888;}
#context {background-color:#eeeeee;}
td {padding-left:.3em;padding-right:.3em;}
tr.head {border-bottom-width:1px;border-bottom-style:solid;}
tr.head td {padding:0;padding-top:.2em;}
.task {background-color:#ffff00;}
.comment {white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;white-space:pre-wrap;word-wrap:break-word;padding:4px;border:1px dashed #000000;background-color:#ffffdd}
.error {color:red;}
hr {border-width:0px;height:2px;background:black;}
--></style>
</head>
<body>
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head"><td colspan="5">Commit in <b><tt>asxsd/trunk/src</tt></b></td></tr>
<tr><td><tt>main/java/uk/co/badgersinfoil/asxsd/components/<a href="#file1">AttributeDeclarationComponent.java</a></tt> </td><td></td><td align="right" id="added">+2</td><td align="right" id="removed">-2</td><td nowrap="nowrap" align="center">152 -> 153</td></tr>
<tr class="alt"><td><tt>test/java/uk/co/badgersinfoil/asxsd/schemas/<a href="#file2"><span id="added">AttributeTest.java</span></a></tt> </td><td></td><td align="right" id="added">+18</td><td></td><td nowrap="nowrap" align="right">added 153</td></tr>
<tr><td><tt>test/resources/xsd/<a href="#file3"><span id="added">AttributeTest.xsd</span></a></tt> </td><td></td><td align="right" id="added">+8</td><td></td><td nowrap="nowrap" align="right">added 153</td></tr>
<tr><td></td><td></td><td align="right" id="added">+28</td><td align="right" id="removed">-2</td><td></td></tr>
</table>
<small id="info">2 added + 1 modified, total 3 files</small><br />
<pre class="comment">
fix failure in attribute processing
</pre>
<hr /><a name="file1" /><div class="file">
<span class="pathname">asxsd/trunk/src/main/java/uk/co/badgersinfoil/asxsd/components</span><br />
<div class="fileheader"><big><b>AttributeDeclarationComponent.java</b></big> <small id="info">152 -> 153</small></div>
<pre class="diff"><small id="info">--- trunk/src/main/java/uk/co/badgersinfoil/asxsd/components/AttributeDeclarationComponent.java        2007-09-10 22:43:20 UTC (rev 152)
+++ trunk/src/main/java/uk/co/badgersinfoil/asxsd/components/AttributeDeclarationComponent.java        2007-09-10 23:18:36 UTC (rev 153)
@@ -23,13 +23,13 @@
</small></pre><pre class="diff" id="context">                 if (role == CodegenRole.UNMARSHAL) {
                        StatementContainer code = context.getCurrentMethodCode();
                        String attrAccessExpr = "thisElement."+StringUtils.attrAccess(attrDecl);
</pre><pre class="diff" id="removed">-                        MappingFunction function = context.functionFor(attrDecl);
</pre><pre class="diff" id="added">+                        MappingFunction function = context.functionFor(attrDecl<span id="addedchars">.getType()</span>);
</pre><pre class="diff" id="context">                         String converted = function.appliedTo(attrAccessExpr);
                        code.addStmt("_result."+context.variableNameFor(attrDecl)+" = "+converted);
                } else if (role == CodegenRole.MARSHAL) {
                        StatementContainer code = context.getCurrentMethodCode();
                        String propertyNameExpr = "thisObject."+context.variableNameFor(attrDecl);
</pre><pre class="diff" id="removed">-                        MappingFunction function = context.functionFor(attrDecl);
</pre><pre class="diff" id="added">+                        MappingFunction function = context.functionFor(attrDecl<span id="addedchars">.getType()</span>);
</pre><pre class="diff" id="context">                         String converted = function.appliedTo(propertyNameExpr);
                        code.addStmt("_result."+StringUtils.attrAccess(attrDecl)+" = "+converted);
                } else {
</pre></div>
<hr /><a name="file2" /><div class="file">
<span class="pathname" id="added">asxsd/trunk/src/test/java/uk/co/badgersinfoil/asxsd/schemas</span><br />
<div class="fileheader" id="added"><big><b>AttributeTest.java</b></big> <small id="info">added at 153</small></div>
<pre class="diff"><small id="info">--- trunk/src/test/java/uk/co/badgersinfoil/asxsd/schemas/AttributeTest.java         (rev 0)
+++ trunk/src/test/java/uk/co/badgersinfoil/asxsd/schemas/AttributeTest.java        2007-09-10 23:18:36 UTC (rev 153)
@@ -0,0 +1,18 @@
</small></pre><pre class="diff" id="added">+package uk.co.badgersinfoil.asxsd.schemas;
+
+import uk.co.badgersinfoil.metaas.dom.ASClassType;
+import uk.co.badgersinfoil.metaas.dom.ASCompilationUnit;
+import uk.co.badgersinfoil.metaas.dom.ASField;
+
+public class AttributeTest extends SchemaTestCase {
+        public void testClassName() {
+                ASCompilationUnit unit = (ASCompilationUnit)project.getCompilationUnits().get(0);
+                ASClassType clazz = (ASClassType)unit.getType();
+                assertEquals("Test", clazz.getName());
+
+                ASField a = clazz.getField("a");
+                assertEquals("String", a.getType());
+                ASField b = clazz.getField("b");
+                assertEquals("String", b.getType());
+        }
+}
</pre></div>
<hr /><a name="file3" /><div class="file">
<span class="pathname" id="added">asxsd/trunk/src/test/resources/xsd</span><br />
<div class="fileheader" id="added"><big><b>AttributeTest.xsd</b></big> <small id="info">added at 153</small></div>
<pre class="diff"><small id="info">--- trunk/src/test/resources/xsd/AttributeTest.xsd         (rev 0)
+++ trunk/src/test/resources/xsd/AttributeTest.xsd        2007-09-10 23:18:36 UTC (rev 153)
@@ -0,0 +1,8 @@
</small></pre><pre class="diff" id="added">+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ elementFormDefault="qualified"
+ targetNamespace="http://example.org/test">
+ <complexType name="Test">
+ <attribute name="a" use="required" type="string"/>
+ <attribute name="b" use="optional" type="string"/>
+ </complexType>
+</schema>
</pre></div>
<center><small><a href="http://www.badgers-in-foil.co.uk/projects/cvsspam/" title="commit -> email">CVSspam</a> 0.2.12</small></center>
</body></html>