jkesselm 2002/08/16 14:11:18
Modified: java/src/org/apache/xml/dtm/ref/xni2dtm Tag: xslt20
XPath2Type.java
Log:
Minor efficiency improvement
Revision Changes Path
No revision
No revision
1.1.2.1.2.3 +14 -9
xml-xalan/java/src/org/apache/xml/dtm/ref/xni2dtm/Attic/XPath2Type.java
Index: XPath2Type.java
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/org/apache/xml/dtm/ref/xni2dtm/Attic/XPath2Type.java,v
retrieving revision 1.1.2.1.2.2
retrieving revision 1.1.2.1.2.3
diff -u -r1.1.2.1.2.2 -r1.1.2.1.2.3
--- XPath2Type.java 16 Aug 2002 20:23:02 -0000 1.1.2.1.2.2
+++ XPath2Type.java 16 Aug 2002 21:11:18 -0000 1.1.2.1.2.3
@@ -219,14 +219,8 @@
{
Object value;
DTM_XSequence seq=null;
-
- // %REVIEW% This is a SLOPPY way of handling the "any" types. Better
must exist!
- if(m_xniType==null
- ||
- (("anyType".equals(m_xniType.getName()) ||
"anySimpleType".equals(m_xniType.getName()))
- &&
"http://www.w3.org/2001/XMLSchema".equals(m_xniType.getNamespace())
- )
- )
+
+ if(m_xniType==null)
{
seq=new DTM_XSequence(textvalue,this);
}
@@ -282,7 +276,18 @@
seq=new DTM_XSequence(value,this);
}
-
+
+ // Sloppy recognition of anyType -- but it appears to be correct
+ // (if not valid/recognizable, the typed value appears to be
+ // the string value).
+ else if("anyType".equals(m_xniType.getName())
+ &&
"http://www.w3.org/2001/XMLSchema".equals(m_xniType.getNamespace())
+ )
+ {
+ seq=new DTM_XSequence(textvalue,this);
+ }
+
+ // Should the failure be empty, or error?
return seq==null ? DTMSequence.EMPTY : seq;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]