summaryrefslogtreecommitdiff
path: root/cpp/src/IceXML/StreamI.cpp
diff options
context:
space:
mode:
authorMatthew Newhook <matthew@zeroc.com>2002-01-30 18:11:47 +0000
committerMatthew Newhook <matthew@zeroc.com>2002-01-30 18:11:47 +0000
commit086bbeca3f329d739b491a6a16fd7c179e0febd9 (patch)
treea66858a42f43e4cb6fbd9166e5fbcd01e26f663e /cpp/src/IceXML/StreamI.cpp
parentWIN32 updates. (diff)
downloadice-086bbeca3f329d739b491a6a16fd7c179e0febd9.tar.bz2
ice-086bbeca3f329d739b491a6a16fd7c179e0febd9.tar.xz
ice-086bbeca3f329d739b491a6a16fd7c179e0febd9.zip
Freeze updates.
Diffstat (limited to 'cpp/src/IceXML/StreamI.cpp')
-rw-r--r--cpp/src/IceXML/StreamI.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/cpp/src/IceXML/StreamI.cpp b/cpp/src/IceXML/StreamI.cpp
index e9c2cc0ab22..d136532a977 100644
--- a/cpp/src/IceXML/StreamI.cpp
+++ b/cpp/src/IceXML/StreamI.cpp
@@ -192,7 +192,7 @@ IceXML::StreamI::StreamI(const ::Ice::CommunicatorPtr& communicator, std::ostrea
}
-IceXML::StreamI::StreamI(const ::Ice::CommunicatorPtr& communicator, std::istream& is) :
+IceXML::StreamI::StreamI(const ::Ice::CommunicatorPtr& communicator, std::istream& is, bool schema) :
_communicator(communicator),
_nextId(0)
{
@@ -235,8 +235,11 @@ IceXML::StreamI::StreamI(const ::Ice::CommunicatorPtr& communicator, std::istrea
//
_input->parser = new DOMParser;
_input->parser->setValidationScheme(DOMParser::Val_Auto);
- _input->parser->setDoNamespaces(true);
- _input->parser->setDoSchema(true);
+ if (schema)
+ {
+ _input->parser->setDoNamespaces(true);
+ _input->parser->setDoSchema(true);
+ }
//_input->parser->setValidationSchemaFullChecking(true);
_input->errReporter = new DOMTreeErrorReporter(logger);
@@ -1248,7 +1251,12 @@ IceXML::StreamI::startRead(const ::std::string& element)
}
string nodeName = toString(_input->current.getNodeName());
- if (element != nodeName)
+ //
+ // TODO: Work around for bug in xerces
+ //
+ static const string facets = "facets";
+ static const string facetsNS = "ice:facets";
+ if ((element != facetsNS || nodeName != facets) && element != nodeName)
{
throw ::Ice::UnmarshalException(__FILE__, __LINE__);
}