You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by bu...@apache.org on 2004/02/26 02:52:34 UTC
DO NOT REPLY [Bug 27238] New: -
Attributes with default values do not show up in XPath result
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=27238>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=27238
Attributes with default values do not show up in XPath result
Summary: Attributes with default values do not show up in XPath
result
Product: XalanJ2
Version: 2.5Dx
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: Other
Component: org.apache.xpath
AssignedTo: xalan-dev@xml.apache.org
ReportedBy: kent@cpttm.org.mo
Please consult the attached files to demo the problem:
1. book.xml refers to a schema in book.xsd.
2. The first <b:chapter> element in book.xml doesn't specify the "difficulty"
attribute. According to the schema in book.xsd, it should get the default
value of "easy".
3. Run the ApplyXPath sample "java ApplyXPath book.xml //b:chapter" to list
the chapters. The first <b:chapter> element do NOT have the "difficulty"
attribute.
4. Run "java ApplyXPath book.xml //b:chapter[@difficulty="easy"]" does NOT
include the first <b:chapter>.
However, this problem does not occur if book.xml uses a DTD (book.dtd). It
works perfectly with a DTD.
Maybe it is not looking at the schema at all?