You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by mr...@apache.org on 2008/12/14 06:49:25 UTC
svn commit: r726376 -
/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XSImplementationImpl.java
Author: mrglavas
Date: Sat Dec 13 21:49:25 2008
New Revision: 726376
URL: http://svn.apache.org/viewvc?rev=726376&view=rev
Log:
Added utility methods for creating StringLists and LSInputLists. Hope we
can add these to the XSImplementation interface to make it easier for users
to create instances of these lists.
Modified:
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XSImplementationImpl.java
Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XSImplementationImpl.java
URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XSImplementationImpl.java?rev=726376&r1=726375&r2=726376&view=diff
==============================================================================
--- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XSImplementationImpl.java (original)
+++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/xs/XSImplementationImpl.java Sat Dec 13 21:49:25 2008
@@ -19,12 +19,15 @@
import org.apache.xerces.dom.DOMMessageFormatter;
import org.apache.xerces.dom.PSVIDOMImplementationImpl;
+import org.apache.xerces.impl.xs.util.LSInputListImpl;
import org.apache.xerces.impl.xs.util.StringListImpl;
+import org.apache.xerces.xs.LSInputList;
import org.apache.xerces.xs.StringList;
import org.apache.xerces.xs.XSException;
import org.apache.xerces.xs.XSImplementation;
import org.apache.xerces.xs.XSLoader;
import org.w3c.dom.DOMImplementation;
+import org.w3c.dom.ls.LSInput;
/**
* Implements XSImplementation interface that allows one to retrieve an instance of <code>XSLoader</code>.
@@ -82,8 +85,6 @@
super.hasFeature(feature, version));
} // hasFeature(String,String):boolean
-
-
/* (non-Javadoc)
* @see org.apache.xerces.xs.XSImplementation#createXSLoader(org.apache.xerces.xs.StringList)
*/
@@ -104,6 +105,16 @@
}
return loader;
}
+
+ public StringList createStringList(String[] values) {
+ int length = (values != null) ? values.length : 0;
+ return (length != 0) ? new StringListImpl((String[]) values.clone(), length) : StringListImpl.EMPTY_LIST;
+ }
+
+ public LSInputList createLSInputList(LSInput[] values) {
+ int length = (values != null) ? values.length : 0;
+ return (length != 0) ? new LSInputListImpl((LSInput[]) values.clone(), length) : LSInputListImpl.EMPTY_LIST;
+ }
/* (non-Javadoc)
* @see org.apache.xerces.xs.XSImplementation#getRecognizedVersions()
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org