ok, sounds like that should be enough info to track this down. I am really interested 
in getting all parts of the equation matched up, preferrably without hacks. The caucho 
folks are usually very receptive, too.

>Something is up with the XML parser.  The specification for the page is not
>being read correctly.
>
>What's happening is that the Border component for the page is coming up with
>allow-body set to false instead of true.
>
>>From the DTD:
>
><!ELEMENT specification (description*, parameter*, reserved-parameter*,
>property*, bean*,
>component*, (external-asset | context-asset | private-asset)*)>
><!ATTLIST specification
>class CDATA #REQUIRED
>allow-body %attribute-flag; "yes"
>allow-informal-parameters %attribute-flag; "yes"
>>
>
>The Border component does not specifiy a value for allow-body:
>
><specification
>class="tutorial.workbench.components.Border"
>allow-informal-parameters="no">
>
>
>The code that reads the XML:
>
>private ComponentSpecification convertComponentSpecification_2(Document
>document)
>throws DocumentParseException
>{
>ComponentSpecification specification =
>factory.createComponentSpecification();
>Element root = document.getDocumentElement();
>specification.setAllowBody(getBooleanAttribute(root, "allow-body"));
>
>And
>
>private boolean getBooleanAttribute(Node node, String attributeName)
>{
>String attributeValue = getAttribute(node, attributeName);
>return attributeValue != null && attributeValue.equals("yes");
>}
>
>And
>
>protected String getAttribute(Node node, String attributeName)
>{
>NamedNodeMap map = node.getAttributes();
>if (map == null)
>return null;
>Node attributeNode = map.getNamedItem(attributeName);
>if (attributeNode == null)
>return null;
>return attributeNode.getNodeValue();
>}
>
>
>All I can surmise is the Caucho XML parser is not handling default values
>for XML attributes correctly.  The attribute should appear in the attribute
>map with the DTD-specified default value when the XML document does not
>specify the attribute.  It is not.  I can attempt to patch Tapestry around
>this, but I'd appreciate it if you would take this up with the Caucho folks
>first.
>
>Also, note the line:
>return attributeValue != null && attributeValue.equals("yes");
>
>This null check, which should not be necessary, was added recently just to
>keep the specification parser from crashing with Caucho's XML parser.  Same
>thing ... null should not be returned, but it is.  This is a bug, or
>unwanted optimization, in thier XML parser.
>


_______________________________________________________________

Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
_______________________________________________
Tapestry-developer mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/tapestry-developer

Reply via email to