jkesselm 01/11/20 05:46:51
Modified: java/src/org/apache/xml/dtm/ref/dom2dtm DOM2DTM.java
Log:
"Tupograflica eror". Sorry 'bout that!
Revision Changes Path
1.21 +9 -18
xml-xalan/java/src/org/apache/xml/dtm/ref/dom2dtm/DOM2DTM.java
Index: DOM2DTM.java
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/org/apache/xml/dtm/ref/dom2dtm/DOM2DTM.java,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- DOM2DTM.java 2001/11/15 20:51:37 1.20
+++ DOM2DTM.java 2001/11/20 13:46:51 1.21
@@ -99,10 +99,9 @@
{
static final boolean JJK_DEBUG=false;
- /** Manefest constants
+ /** Manefest constant
*/
- static final String
NAMESPACE_FOR_XML="http://www.w3.org/XML/1998/namespace";
- static final String NAMESPACE_FOR_XMLNS="http://www.w3.org/2000/xmlns/";
+ static final String
NAMESPACE_DECL_NS="http://www.w3.org/XML/1998/namespace";
/** The current position in the DOM tree. Last node examined for
* possible copying to DTM. */
@@ -561,17 +560,9 @@
// If the xml: prefix is explicitly declared
// we don't need to synthesize one.
- //
- // %REVIEW% NOTE THAT we must currently test for
- // xmlns:xml, _not_ for localname xml in the
- // NAMESPACE_FOR_XMLNS namespace, since recognition of
- // namespace declarations is itself not
- // namespace-aware in the original Recommendation.
- // W3C has recognized that this is an "oops", but
- // has not yet declared it an erratum or released
- // an updated spec.
if(!m_processedFirstElement
- && "xmlns:xml".equals(attrs.item(i).getNodeName()))
+ &&
NAMESPACE_DECL_NS.equals(attrs.item(i).getNamespaceURI())
+ && "xml".equals(attrs.item(i).getLocalName()))
m_processedFirstElement=true;
}
// Terminate list of attrs, and make sure they aren't
@@ -579,13 +570,13 @@
} // if attrs exist
if(!m_processedFirstElement)
{
- // The DOM did not have an explicit declartion for the
+ // The DOM may not have an explicit declartion for the
// implicit "xml:" prefix, but the XPath data model
- // requires that this appear as a Namespace Node... so
- // we have to synthesize one. You can think of this as
+ // requires that this appear as a Namespace Node so we
+ // have to synthesize one. You can think of this as
// being a default attribute defined by the XML
// Namespaces spec rather than by the DTD.
- attrIndex=addNode(new
defaultNamespaceDeclarationNode((Element)next,"xml",NAMESPACE_FOR_XMLNS),
+ attrIndex=addNode(new
defaultNamespaceDeclarationNode((Element)next,"xml",NAMESPACE_DECL_NS),
nextindex,attrIndex,NULL);
m_firstch.setElementAt(DTM.NULL,attrIndex);
m_processedFirstElement=true;
@@ -1719,7 +1710,7 @@
Element pseudoparent;
String prefix,uri;
- defaultNamespaceDeclarationNode(Element peseudoparent,String
prefix,String uri)
+ defaultNamespaceDeclarationNode(Element pseudoparent,String
prefix,String uri)
{
this.pseudoparent=pseudoparent;
this.prefix=prefix;
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]