You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by kn...@apache.org on 2002/02/13 17:23:07 UTC
cvs commit: xml-xerces/c/doc migration.xml program-sax2.xml schema.xml
knoaman 02/02/13 08:23:07
Modified: c/doc migration.xml program-sax2.xml schema.xml
Log:
Documentation update.
Revision Changes Path
1.17 +17 -3 xml-xerces/c/doc/migration.xml
Index: migration.xml
===================================================================
RCS file: /home/cvs/xml-xerces/c/doc/migration.xml,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- migration.xml 7 Feb 2002 16:34:17 -0000 1.16
+++ migration.xml 13 Feb 2002 16:23:07 -0000 1.17
@@ -22,7 +22,7 @@
<anchor name="NewFeatures"/>
<s2 title="New features in &XercesCName; latest code base">
<ul>
- <li></li>
+ <li>SAX2-ext's DeclHandler.</li>
</ul>
</s2>
@@ -36,14 +36,28 @@
<anchor name="NewAPI"/>
<s3 title="New Public API">
<ul>
- <li></li>
+ <li>SAX2-ext's DeclHandler class.
+ See <jump href="api.html">the API documentation page</jump> for details.</li>
+ <li>To support SAX2-ext's DeclHandler, the following new methods are added:</li>
+ <ul>
+ <li>void DefaultHandler::elementDecl(const XMLCh* const name, const XMLCh* const model)</li>
+ <li>void DefaultHandler::attributeDecl(const XMLCh* const eName, const XMLCh* const aName,
+ const XMLCh* const type, const XMLCh* const mode, const XMLCh* const value)</li>
+ <li>void DefaultHandler::internalEntityDecl(const XMLCh* const name, const XMLCh* const value)</li>
+ <li>void DefaultHandler::externalEntityDecl(const XMLCh* const name, const XMLCh* const publicId,
+ const XMLCh* const systemId)</li>
+ <li>DeclHandler* SAX2XMLReader::getDeclarationHandler() const</li>
+ <li>void SAX2XMLReader::setDeclarationHandler(DeclHandler* const handler)</li>
+ <li>DeclHandler* SAX2XMLReaderImpl::getDeclarationHandler() const</li>
+ <li>void SAX2XMLReaderImpl::setDeclarationHandler(DeclHandler* const handler)</li>
+ </ul>
</ul>
</s3>
<anchor name="ModifiedAPI"/>
<s3 title="Modified Public API">
<ul>
- <li></li>
+ <li>The namespace-prefixes feature in SAX2 is set to off as default.</li>
</ul>
</s3>
1.3 +5 -6 xml-xerces/c/doc/program-sax2.xml
Index: program-sax2.xml
===================================================================
RCS file: /home/cvs/xml-xerces/c/doc/program-sax2.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- program-sax2.xml 28 Jan 2002 18:45:40 -0000 1.2
+++ program-sax2.xml 13 Feb 2002 16:23:07 -0000 1.3
@@ -26,13 +26,12 @@
char* xmlFile = "x1.xml";
SAX2XMLReader* parser = XMLReaderFactory::createXMLReader();
- parser->setFeature(XMLString::transcode("http://xml.org/sax/features/validation", true) // optional
- parser->setFeature(XMLString::transcode("http://xml.org/sax/features/namespaces", true) // optional
+ parser->setFeature(XMLUni::fgSAX2CoreValidation, true) // optional
+ parser->setFeature(XMLUni::fgSAX2CoreNameSpaces, true) // optional
- ContentHandler* contentHandler = new DefaultHandler();
- ErrorHandler* errHandler = (ErrorHandler*) contentHandler;
- parser->setContentHandler(contentHandler);
- parser->setErrorHandler(errHandler);
+ DefaultHandler* defaultHandler = new DefaultHandler();
+ parser->setContentHandler(defaultHandler);
+ parser->setErrorHandler(defaultHandler);
try {
parser->parse(xmlFile);
1.14 +12 -6 xml-xerces/c/doc/schema.xml
Index: schema.xml
===================================================================
RCS file: /home/cvs/xml-xerces/c/doc/schema.xml,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- schema.xml 2 Jan 2002 15:26:31 -0000 1.13
+++ schema.xml 13 Feb 2002 16:23:07 -0000 1.14
@@ -75,8 +75,8 @@
(default is on). Note that namespace must be on (default is on) as well.
</p>
<source>SAX2XMLReader* parser = XMLReaderFactory::createXMLReader();
-parser->setFeature(XMLString::transcode("http://xml.org/sax/features/namespaces"), true);
-parser->setFeature(XMLString::transcode("http://apache.org/xml/features/validation/schema"), true);
+parser->setFeature(XMLUni::fgSAX2CoreNameSpaces, true);
+parser->setFeature(XMLUni::fgSAX2XercesSchema, true);
parser->parse(xmlFile);
</source>
<p>Review the sample file, 'samples/data/personal-schema.xml' and
@@ -109,9 +109,12 @@
// Instantiate the SAX2 XMLReader.
SAX2XMLReader* parser = XMLReaderFactory::createXMLReader();
+XMLCh* propertyValue = XMLString::transcode("personal.xsd");
+ArrayJanitor<XMLCh> janValue(propertyValue);
+
parser->setProperty(
- XMLString::transcode("http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation"),
- XMLString transcode("personal.xsd"));
+ XMLUni::fgSAX2XercesSchemaExternalNoNameSpaceSchemaLocation,
+ propertyValue);
parser.parse("test.xml");
</source>
@@ -129,9 +132,12 @@
// Instantiate the SAX2 XMLReader.
SAX2XMLReader* parser = XMLReaderFactory::createXMLReader();
+XMLCh* propertyValue = XMLString::transcode("http://my.com personal.xsd http://my2.com test2.xsd");
+ArrayJanitor<XMLCh> janValue(propertyValue);
+
parser->setProperty(
- XMLString::transcode("http://apache.org/xml/properties/schema/external-SchemaLocation"),
- XMLString transcode("http://my.com personal.xsd http://my2.com test2.xsd"));
+ XMLCh XMLUni::fgSAX2XercesSchemaExternalSchemaLocation,
+ propertyValue);
parser.parse("test.xml");
</source>
</s3>
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org