You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xmlbeans.apache.org by kk...@apache.org on 2005/01/24 23:30:03 UTC
svn commit: r126322 - /xmlbeans/trunk/src/newstore2/org/apache/xmlbeans/impl/newstore2/Cur.java /xmlbeans/trunk/src/newstore2/org/apache/xmlbeans/impl/newstore2/Locale.java
Author: kkrouse
Date: Mon Jan 24 14:30:00 2005
New Revision: 126322
URL: http://svn.apache.org/viewcvs?view=rev&rev=126322
Log:
set document properties on load
Modified:
xmlbeans/trunk/src/newstore2/org/apache/xmlbeans/impl/newstore2/Cur.java
xmlbeans/trunk/src/newstore2/org/apache/xmlbeans/impl/newstore2/Locale.java
Modified: xmlbeans/trunk/src/newstore2/org/apache/xmlbeans/impl/newstore2/Cur.java
Url: http://svn.apache.org/viewcvs/xmlbeans/trunk/src/newstore2/org/apache/xmlbeans/impl/newstore2/Cur.java?view=diff&rev=126322&p1=xmlbeans/trunk/src/newstore2/org/apache/xmlbeans/impl/newstore2/Cur.java&r1=126321&p2=xmlbeans/trunk/src/newstore2/org/apache/xmlbeans/impl/newstore2/Cur.java&r2=126322
==============================================================================
--- xmlbeans/trunk/src/newstore2/org/apache/xmlbeans/impl/newstore2/Cur.java (original)
+++ xmlbeans/trunk/src/newstore2/org/apache/xmlbeans/impl/newstore2/Cur.java Mon Jan 24 14:30:00 2005
@@ -84,6 +84,7 @@
import org.apache.xmlbeans.XmlOptions;
import org.apache.xmlbeans.XmlException;
import org.apache.xmlbeans.QNameSet;
+import org.apache.xmlbeans.XmlDocumentProperties;
import org.apache.xmlbeans.XmlCursor.XmlBookmark;
import org.apache.xmlbeans.impl.values.TypeStore;
@@ -2914,6 +2915,17 @@
//
//
+ protected void startDTD (String name, String publicId, String systemId )
+ {
+ _doctypeName = name;
+ _doctypePublicId = publicId;
+ _doctypeSystemId = systemId;
+ }
+
+ protected void endDTD ( )
+ {
+ }
+
protected void startElement ( QName name )
{
start( createElementXobj( _locale, checkName( name, false ), parent()._name ) );
@@ -3176,6 +3188,16 @@
Locale.applyNamespaces( c, _additionalNamespaces );
}
+ if (_doctypeName != null && (_doctypePublicId != null || _doctypeSystemId != null))
+ {
+ XmlDocumentProperties props = Locale.getDocProps(c, true);
+ props.setDoctypeName(_doctypeName);
+ if (_doctypePublicId != null)
+ props.setDoctypePublicId(_doctypePublicId);
+ if (_doctypeSystemId != null)
+ props.setDoctypeSystemId(_doctypeSystemId);
+ }
+
c.moveTo( _frontier );
assert c.isRoot();
@@ -3204,6 +3226,10 @@
private boolean _stripProcinsts;
private Map _substituteNamespaces;
private Map _additionalNamespaces;
+
+ private String _doctypeName;
+ private String _doctypePublicId;
+ private String _doctypeSystemId;
}
//
Modified: xmlbeans/trunk/src/newstore2/org/apache/xmlbeans/impl/newstore2/Locale.java
Url: http://svn.apache.org/viewcvs/xmlbeans/trunk/src/newstore2/org/apache/xmlbeans/impl/newstore2/Locale.java?view=diff&rev=126322&p1=xmlbeans/trunk/src/newstore2/org/apache/xmlbeans/impl/newstore2/Locale.java&r1=126321&p2=xmlbeans/trunk/src/newstore2/org/apache/xmlbeans/impl/newstore2/Locale.java&r2=126322
==============================================================================
--- xmlbeans/trunk/src/newstore2/org/apache/xmlbeans/impl/newstore2/Locale.java (original)
+++ xmlbeans/trunk/src/newstore2/org/apache/xmlbeans/impl/newstore2/Locale.java Mon Jan 24 14:30:00 2005
@@ -2391,6 +2391,9 @@
static abstract class LoadContext
{
+ protected abstract void startDTD ( String name, String publicId, String systemId );
+ protected abstract void endDTD ( );
+
protected abstract void startElement ( QName name );
protected abstract void endElement ( );
@@ -2646,10 +2649,12 @@
public void startDTD ( String name, String publicId, String systemId ) throws SAXException
{
+ _context.startDTD( name, publicId, systemId );
}
public void endDTD ( ) throws SAXException
{
+ _context.endDTD();
}
public void startPrefixMapping ( String prefix, String uri ) throws SAXException
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: commits-help@xmlbeans.apache.org