https://issues.shibboleth.net/jira/browse/SSPCPP-498
[shibboleth/cpp-xmltooling.git] / xmltooling / util / ParserPool.cpp
1 /**
2  * Licensed to the University Corporation for Advanced Internet
3  * Development, Inc. (UCAID) under one or more contributor license
4  * agreements. See the NOTICE file distributed with this work for
5  * additional information regarding copyright ownership.
6  *
7  * UCAID licenses this file to you under the Apache License,
8  * Version 2.0 (the "License"); you may not use this file except
9  * in compliance with the License. You may obtain a copy of the
10  * License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing,
15  * software distributed under the License is distributed on an
16  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
17  * either express or implied. See the License for the specific
18  * language governing permissions and limitations under the License.
19  */
20
21 /**
22  * ParserPool.cpp
23  *
24  * A thread-safe pool of parsers that share characteristics.
25  */
26
27 #include "internal.h"
28 #include "exceptions.h"
29 #include "logging.h"
30 #include "util/CurlURLInputStream.h"
31 #include "util/NDC.h"
32 #include "util/PathResolver.h"
33 #include "util/ParserPool.h"
34 #include "util/Threads.h"
35 #include "util/XMLHelper.h"
36
37 #include <sys/types.h>
38 #include <sys/stat.h>
39 #include <algorithm>
40 #include <functional>
41 #include <boost/algorithm/string.hpp>
42 #include <boost/bind.hpp>
43 #include <xercesc/util/PlatformUtils.hpp>
44 #include <xercesc/util/XMLUniDefs.hpp>
45 #include <xercesc/sax/SAXException.hpp>
46 #include <xercesc/framework/MemBufInputSource.hpp>
47 #include <xercesc/framework/LocalFileInputSource.hpp>
48 #include <xercesc/framework/Wrapper4InputSource.hpp>
49
50 using namespace xmltooling::logging;
51 using namespace xmltooling;
52 using namespace xercesc;
53 using namespace boost;
54 using namespace std;
55
56
57 namespace {
58     class MyErrorHandler : public DOMErrorHandler {
59     public:
60         unsigned int errors;
61
62         MyErrorHandler() : errors(0) {}
63
64         bool handleError(const DOMError& e)
65         {
66 #ifdef _DEBUG
67             xmltooling::NDC ndc("handleError");
68 #endif
69             Category& log=Category::getInstance(XMLTOOLING_LOGCAT".ParserPool");
70
71             DOMLocator* locator=e.getLocation();
72             auto_ptr_char temp(e.getMessage());
73
74             switch (e.getSeverity()) {
75                 case DOMError::DOM_SEVERITY_WARNING:
76                     log.warnStream() << "warning on line " << locator->getLineNumber()
77                         << ", column " << locator->getColumnNumber()
78                         << ", message: " << temp.get() << logging::eol;
79                     return true;
80
81                 case DOMError::DOM_SEVERITY_ERROR:
82                     ++errors;
83                     log.errorStream() << "error on line " << locator->getLineNumber()
84                         << ", column " << locator->getColumnNumber()
85                         << ", message: " << temp.get() << logging::eol;
86                     return true;
87
88                 case DOMError::DOM_SEVERITY_FATAL_ERROR:
89                     ++errors;
90                     log.errorStream() << "fatal error on line " << locator->getLineNumber()
91                         << ", column " << locator->getColumnNumber()
92                         << ", message: " << temp.get() << logging::eol;
93                     return true;
94             }
95
96             ++errors;
97             log.errorStream() << "undefined error type on line " << locator->getLineNumber()
98                 << ", column " << locator->getColumnNumber()
99                 << ", message: " << temp.get() << logging::eol;
100             return false;
101         }
102     };
103 }
104
105
106 ParserPool::ParserPool(bool namespaceAware, bool schemaAware)
107     : m_namespaceAware(namespaceAware), m_schemaAware(schemaAware), m_lock(Mutex::create()), m_security(new SecurityManager()) {}
108
109 ParserPool::~ParserPool()
110 {
111     while(!m_pool.empty()) {
112         m_pool.top()->release();
113         m_pool.pop();
114     }
115 }
116
117 DOMDocument* ParserPool::newDocument()
118 {
119     return DOMImplementationRegistry::getDOMImplementation(nullptr)->createDocument();
120 }
121
122 #ifdef XMLTOOLING_XERCESC_COMPLIANT_DOMLS
123
124 DOMDocument* ParserPool::parse(DOMLSInput& domsrc)
125 {
126     DOMLSParser* parser=checkoutBuilder();
127     XercesJanitor<DOMLSParser> janitor(parser);
128     try {
129         MyErrorHandler deh;
130         parser->getDomConfig()->setParameter(XMLUni::fgDOMErrorHandler, dynamic_cast<DOMErrorHandler*>(&deh));
131         DOMDocument* doc=parser->parse(&domsrc);
132         if (deh.errors) {
133             if (doc)
134                 doc->release();
135             throw XMLParserException("XML error(s) during parsing, check log for specifics");
136         }
137         parser->getDomConfig()->setParameter(XMLUni::fgDOMErrorHandler, (void*)nullptr);
138         parser->getDomConfig()->setParameter(XMLUni::fgXercesUserAdoptsDOMDocument, true);
139         checkinBuilder(janitor.release());
140         return doc;
141     }
142     catch (XMLException& ex) {
143         parser->getDomConfig()->setParameter(XMLUni::fgDOMErrorHandler, (void*)nullptr);
144         parser->getDomConfig()->setParameter(XMLUni::fgXercesUserAdoptsDOMDocument, true);
145         checkinBuilder(janitor.release());
146         auto_ptr_char temp(ex.getMessage());
147         throw XMLParserException(string("Xerces error during parsing: ") + (temp.get() ? temp.get() : "no message"));
148     }
149     catch (XMLToolingException&) {
150         parser->getDomConfig()->setParameter(XMLUni::fgDOMErrorHandler, (void*)nullptr);
151         parser->getDomConfig()->setParameter(XMLUni::fgXercesUserAdoptsDOMDocument, true);
152         checkinBuilder(janitor.release());
153         throw;
154     }
155 }
156
157 #else
158
159 DOMDocument* ParserPool::parse(DOMInputSource& domsrc)
160 {
161     DOMBuilder* parser=checkoutBuilder();
162     XercesJanitor<DOMBuilder> janitor(parser);
163     try {
164         MyErrorHandler deh;
165         parser->setErrorHandler(&deh);
166         DOMDocument* doc=parser->parse(domsrc);
167         if (deh.errors) {
168             if (doc)
169                 doc->release();
170             throw XMLParserException("XML error(s) during parsing, check log for specifics");
171         }
172         parser->setErrorHandler(nullptr);
173         parser->setFeature(XMLUni::fgXercesUserAdoptsDOMDocument, true);
174         checkinBuilder(janitor.release());
175         return doc;
176     }
177     catch (XMLException& ex) {
178         parser->setErrorHandler(nullptr);
179         parser->setFeature(XMLUni::fgXercesUserAdoptsDOMDocument, true);
180         checkinBuilder(janitor.release());
181         auto_ptr_char temp(ex.getMessage());
182         throw XMLParserException(string("Xerces error during parsing: ") + (temp.get() ? temp.get() : "no message"));
183     }
184     catch (XMLToolingException&) {
185         parser->setErrorHandler(nullptr);
186         parser->setFeature(XMLUni::fgXercesUserAdoptsDOMDocument, true);
187         checkinBuilder(janitor.release());
188         throw;
189     }
190 }
191
192 #endif
193
194 DOMDocument* ParserPool::parse(istream& is)
195 {
196     StreamInputSource src(is);
197     Wrapper4InputSource domsrc(&src,false);
198     return parse(domsrc);
199 }
200
201 // Functor to double its argument separated by a character and append to a buffer
202 template <class T> class doubleit {
203 public:
204     doubleit(T& t, const typename T::value_type& s) : temp(t), sep(s) {}
205     void operator() (const pair<const T,T>& s) { temp += s.first + sep + s.first + sep; }
206     T& temp;
207     const typename T::value_type& sep;
208 };
209
210 bool ParserPool::loadSchema(const XMLCh* nsURI, const XMLCh* pathname)
211 {
212     // Just check the pathname and then directly register the pair into the map.
213
214     auto_ptr_char p(pathname);
215 #ifdef WIN32
216     struct _stat stat_buf;
217     if (_stat(p.get(), &stat_buf) != 0)
218 #else
219     struct stat stat_buf;
220     if (stat(p.get(), &stat_buf) != 0)
221 #endif
222     {
223 #if _DEBUG
224         xmltooling::NDC ndc("loadSchema");
225 #endif
226         Category& log=Category::getInstance(XMLTOOLING_LOGCAT".ParserPool");
227         auto_ptr_char n(nsURI);
228         log.error("failed to load schema for (%s), file not found (%s)",n.get(),p.get());
229         return false;
230     }
231
232     // Roundtrip to local code page and back to translate path as needed.
233     string topath(p.get());
234     XMLToolingConfig::getConfig().getPathResolver()->resolve(topath, PathResolver::XMLTOOLING_XML_FILE);
235     auto_ptr_XMLCh temp(topath.c_str());
236
237     Lock lock(m_lock);
238     m_schemaLocMap[nsURI] = temp.get();
239     m_schemaLocations.erase();
240     for_each(m_schemaLocMap.begin(), m_schemaLocMap.end(), doubleit<xstring>(m_schemaLocations,chSpace));
241
242     return true;
243 }
244
245 bool ParserPool::loadCatalogs(const char* pathnames)
246 {
247     string temp(pathnames);
248     vector<string> catpaths;
249     split(catpaths, temp, is_any_of(PATH_SEPARATOR_STR), algorithm::token_compress_on);
250     for (vector<string>::iterator i = catpaths.begin(); i != catpaths.end(); ++i) {
251         XMLToolingConfig::getConfig().getPathResolver()->resolve(*i, PathResolver::XMLTOOLING_XML_FILE);
252         loadCatalog(i->c_str());
253     }
254     return !catpaths.empty();
255 }
256
257 bool ParserPool::loadCatalog(const char* pathname)
258 {
259     string p(pathname);
260     XMLToolingConfig::getConfig().getPathResolver()->resolve(p, PathResolver::XMLTOOLING_XML_FILE);
261     auto_ptr_XMLCh temp(p.c_str());
262     return loadCatalog(temp.get());
263 }
264
265 bool ParserPool::loadCatalog(const XMLCh* pathname)
266 {
267 #if _DEBUG
268     xmltooling::NDC ndc("loadCatalog");
269 #endif
270     Category& log=Category::getInstance(XMLTOOLING_LOGCAT".ParserPool");
271
272     // XML constants
273     static const XMLCh catalog[] =  UNICODE_LITERAL_7(c,a,t,a,l,o,g);
274     static const XMLCh system[] =   UNICODE_LITERAL_6(s,y,s,t,e,m);
275     static const XMLCh systemId[] = UNICODE_LITERAL_8(s,y,s,t,e,m,I,d);
276     static const XMLCh uri[] =      UNICODE_LITERAL_3(u,r,i);
277     static const XMLCh CATALOG_NS[] = {
278         chLatin_u, chLatin_r, chLatin_n, chColon,
279         chLatin_o, chLatin_a, chLatin_s, chLatin_i, chLatin_s, chColon,
280         chLatin_n, chLatin_a, chLatin_m, chLatin_e, chLatin_s, chColon,
281         chLatin_t, chLatin_c, chColon,
282         chLatin_e, chLatin_n, chLatin_t, chLatin_i, chLatin_t, chLatin_y, chColon,
283         chLatin_x, chLatin_m, chLatin_l, chLatin_n, chLatin_s, chColon,
284         chLatin_x, chLatin_m, chLatin_l, chColon,
285         chLatin_c, chLatin_a, chLatin_t, chLatin_a, chLatin_l, chLatin_o, chLatin_g, chNull
286     };
287
288     // Parse the catalog with the internal parser pool.
289
290     if (log.isDebugEnabled()) {
291         auto_ptr_char temp(pathname);
292         log.debug("loading XML catalog from %s", temp.get());
293     }
294
295     LocalFileInputSource fsrc(nullptr,pathname);
296     Wrapper4InputSource domsrc(&fsrc,false);
297     try {
298         DOMDocument* doc=XMLToolingConfig::getConfig().getParser().parse(domsrc);
299         XercesJanitor<DOMDocument> janitor(doc);
300
301         // Check root element.
302         const DOMElement* root=doc->getDocumentElement();
303         if (!XMLHelper::isNodeNamed(root,CATALOG_NS,catalog)) {
304             auto_ptr_char temp(pathname);
305             log.error("unknown root element, failed to load XML catalog from %s", temp.get());
306             return false;
307         }
308
309         // Fetch all the <system> elements.
310         DOMNodeList* mappings = root->getElementsByTagNameNS(CATALOG_NS,system);
311         Lock lock(m_lock);
312         for (XMLSize_t i = 0; i < mappings->getLength(); i++) {
313             root = static_cast<DOMElement*>(mappings->item(i));
314             const XMLCh* from = root->getAttributeNS(nullptr,systemId);
315             const XMLCh* to = root->getAttributeNS(nullptr,uri);
316
317             // Roundtrip to local code page and back to translate path as needed.
318             auto_ptr_char temp(to);
319             string topath(temp.get());
320             XMLToolingConfig::getConfig().getPathResolver()->resolve(topath, PathResolver::XMLTOOLING_XML_FILE);
321             auto_ptr_XMLCh temp2(topath.c_str());
322
323             m_schemaLocMap[from] = temp2.get();
324         }
325         m_schemaLocations.erase();
326         for_each(m_schemaLocMap.begin(), m_schemaLocMap.end(), doubleit<xstring>(m_schemaLocations,chSpace));
327     }
328     catch (std::exception& e) {
329         log.error("catalog loader caught exception: %s", e.what());
330         return false;
331     }
332
333     return true;
334 }
335
336 #ifdef XMLTOOLING_XERCESC_COMPLIANT_DOMLS
337 DOMLSInput* ParserPool::resolveResource(
338             const XMLCh *const resourceType,
339             const XMLCh *const namespaceUri,
340             const XMLCh *const publicId,
341             const XMLCh *const systemId,
342             const XMLCh *const baseURI
343             )
344 #else
345 DOMInputSource* ParserPool::resolveEntity(
346     const XMLCh* const publicId, const XMLCh* const systemId, const XMLCh* const baseURI
347     )
348 #endif
349 {
350 #if _DEBUG
351     xmltooling::NDC ndc("resolveEntity");
352 #endif
353     if (!systemId)
354         return nullptr;
355     xstring sysId(systemId);
356
357     Category& log=Category::getInstance(XMLTOOLING_LOGCAT".ParserPool");
358     if (log.isDebugEnabled()) {
359         auto_ptr_char sysId(systemId);
360         auto_ptr_char base(baseURI);
361         log.debug("asked to resolve %s with baseURI %s",sysId.get(),base.get() ? base.get() : "(null)");
362     }
363
364     // Find well-known schemas in the specified location.
365     map<xstring,xstring>::const_iterator i = m_schemaLocMap.find(sysId);
366     if (i != m_schemaLocMap.end())
367         return new Wrapper4InputSource(new LocalFileInputSource(baseURI, i->second.c_str()));
368
369     // Check for entity as a suffix of a value in the map.
370     bool (*p_ends_with)(const xstring&, const xstring&) = ends_with;
371     i = find_if(
372         m_schemaLocMap.begin(), m_schemaLocMap.end(),
373         boost::bind(p_ends_with, boost::bind(&map<xstring,xstring>::value_type::second, _1), boost::ref(sysId))
374         );
375     if (i != m_schemaLocMap.end())
376         return new Wrapper4InputSource(new LocalFileInputSource(baseURI, i->second.c_str()));
377
378     // We'll allow anything without embedded slashes.
379     if (XMLString::indexOf(systemId, chForwardSlash) == -1 && XMLString::indexOf(systemId, chBackSlash) == -1)
380         return new Wrapper4InputSource(new LocalFileInputSource(baseURI, systemId));
381
382     // Shortcircuit the request.
383     auto_ptr_char temp(systemId);
384     log.debug("unauthorized entity request (%s), blocking it", temp.get());
385     static const XMLByte nullbuf[] = {0};
386     return new Wrapper4InputSource(new MemBufInputSource(nullbuf, 0, systemId));
387 }
388
389 #ifdef XMLTOOLING_XERCESC_COMPLIANT_DOMLS
390
391 DOMLSParser* ParserPool::createBuilder()
392 {
393     static const XMLCh impltype[] = { chLatin_L, chLatin_S, chNull };
394     DOMImplementation* impl=DOMImplementationRegistry::getDOMImplementation(impltype);
395     DOMLSParser* parser=static_cast<DOMImplementationLS*>(impl)->createLSParser(DOMImplementationLS::MODE_SYNCHRONOUS,nullptr);
396     parser->getDomConfig()->setParameter(XMLUni::fgDOMNamespaces, m_namespaceAware);
397     if (m_schemaAware) {
398         parser->getDomConfig()->setParameter(XMLUni::fgDOMNamespaces, true);
399         parser->getDomConfig()->setParameter(XMLUni::fgXercesSchema, true);
400         parser->getDomConfig()->setParameter(XMLUni::fgDOMValidate, true);
401         parser->getDomConfig()->setParameter(XMLUni::fgXercesCacheGrammarFromParse, true);
402
403         // We build a "fake" schema location hint that binds each namespace to itself.
404         // This ensures the entity resolver will be given the namespace as a systemId it can check.
405         parser->getDomConfig()->setParameter(XMLUni::fgXercesSchemaExternalSchemaLocation, const_cast<XMLCh*>(m_schemaLocations.c_str()));
406     }
407     parser->getDomConfig()->setParameter(XMLUni::fgXercesUserAdoptsDOMDocument, true);
408     parser->getDomConfig()->setParameter(XMLUni::fgXercesDisableDefaultEntityResolution, true);
409     parser->getDomConfig()->setParameter(XMLUni::fgDOMResourceResolver, dynamic_cast<DOMLSResourceResolver*>(this));
410     parser->getDomConfig()->setParameter(XMLUni::fgXercesSecurityManager, m_security.get());
411     return parser;
412 }
413
414 DOMLSParser* ParserPool::checkoutBuilder()
415 {
416     Lock lock(m_lock);
417     if (m_pool.empty()) {
418         DOMLSParser* builder=createBuilder();
419         return builder;
420     }
421     DOMLSParser* p=m_pool.top();
422     m_pool.pop();
423     if (m_schemaAware)
424         p->getDomConfig()->setParameter(XMLUni::fgXercesSchemaExternalSchemaLocation, const_cast<XMLCh*>(m_schemaLocations.c_str()));
425     return p;
426 }
427
428 void ParserPool::checkinBuilder(DOMLSParser* builder)
429 {
430     if (builder) {
431         Lock lock(m_lock);
432         m_pool.push(builder);
433     }
434 }
435
436 #else
437
438 DOMBuilder* ParserPool::createBuilder()
439 {
440     static const XMLCh impltype[] = { chLatin_L, chLatin_S, chNull };
441     DOMImplementation* impl=DOMImplementationRegistry::getDOMImplementation(impltype);
442     DOMBuilder* parser=static_cast<DOMImplementationLS*>(impl)->createDOMBuilder(DOMImplementationLS::MODE_SYNCHRONOUS,0);
443     parser->setFeature(XMLUni::fgDOMNamespaces, m_namespaceAware);
444     if (m_schemaAware) {
445         parser->setFeature(XMLUni::fgDOMNamespaces, true);
446         parser->setFeature(XMLUni::fgXercesSchema, true);
447         parser->setFeature(XMLUni::fgDOMValidation, true);
448         parser->setFeature(XMLUni::fgXercesCacheGrammarFromParse, true);
449
450         // We build a "fake" schema location hint that binds each namespace to itself.
451         // This ensures the entity resolver will be given the namespace as a systemId it can check.
452         parser->setProperty(XMLUni::fgXercesSchemaExternalSchemaLocation,const_cast<XMLCh*>(m_schemaLocations.c_str()));
453     }
454     parser->setProperty(XMLUni::fgXercesSecurityManager, m_security.get());
455     parser->setFeature(XMLUni::fgXercesUserAdoptsDOMDocument, true);
456     parser->setFeature(XMLUni::fgXercesDisableDefaultEntityResolution, true);
457     parser->setEntityResolver(this);
458     return parser;
459 }
460
461 DOMBuilder* ParserPool::checkoutBuilder()
462 {
463     Lock lock(m_lock);
464     if (m_pool.empty()) {
465         DOMBuilder* builder=createBuilder();
466         return builder;
467     }
468     DOMBuilder* p=m_pool.top();
469     m_pool.pop();
470     if (m_schemaAware)
471         p->setProperty(XMLUni::fgXercesSchemaExternalSchemaLocation,const_cast<XMLCh*>(m_schemaLocations.c_str()));
472     return p;
473 }
474
475 void ParserPool::checkinBuilder(DOMBuilder* builder)
476 {
477     if (builder) {
478         Lock lock(m_lock);
479         m_pool.push(builder);
480     }
481 }
482
483 #endif
484
485 StreamInputSource::StreamInputSource(istream& is, const char* systemId) : InputSource(systemId), m_is(is)
486 {
487 }
488
489 BinInputStream* StreamInputSource::makeStream() const
490 {
491     return new StreamBinInputStream(m_is);
492 }
493
494 StreamInputSource::StreamBinInputStream::StreamBinInputStream(istream& is) : m_is(is), m_pos(0)
495 {
496 }
497
498 #ifdef XMLTOOLING_XERCESC_64BITSAFE
499 XMLFilePos
500 #else
501 unsigned int
502 #endif
503 StreamInputSource::StreamBinInputStream::curPos() const
504 {
505     return m_pos;
506 }
507
508 #ifdef XMLTOOLING_XERCESC_64BITSAFE
509 const XMLCh* StreamInputSource::StreamBinInputStream::getContentType() const
510 {
511     return nullptr;
512 }
513 #endif
514
515 xsecsize_t StreamInputSource::StreamBinInputStream::readBytes(XMLByte* const toFill, const xsecsize_t maxToRead)
516 {
517     XMLByte* target=toFill;
518     xsecsize_t bytes_read=0,request=maxToRead;
519
520     // Fulfill the rest by reading from the stream.
521     if (request && !m_is.eof() && !m_is.fail()) {
522         try {
523             m_is.read(reinterpret_cast<char* const>(target),request);
524             m_pos+=m_is.gcount();
525             bytes_read+=m_is.gcount();
526         }
527         catch(ios_base::failure& e) {
528             Category::getInstance(XMLTOOLING_LOGCAT".StreamInputSource").critStream()
529                 << "XML::StreamInputSource::StreamBinInputStream::readBytes caught an exception: " << e.what()
530                 << logging::eol;
531             *toFill=0;
532             return 0;
533         }
534     }
535     return bytes_read;
536 }
537
538 #ifdef XMLTOOLING_LITE
539
540 URLInputSource::URLInputSource(const XMLCh* url, const char* systemId, string* cacheTag) : InputSource(systemId), m_url(url)
541 {
542 }
543
544 URLInputSource::URLInputSource(const DOMElement* e, const char* systemId, string* cacheTag) : InputSource(systemId)
545 {
546     static const XMLCh uri[] = UNICODE_LITERAL_3(u,r,i);
547     static const XMLCh url[] = UNICODE_LITERAL_3(u,r,l);
548
549     const XMLCh* attr = e->getAttributeNS(nullptr, url);
550     if (!attr || !*attr) {
551         attr = e->getAttributeNS(nullptr, uri);
552         if (!attr || !*attr)
553             throw IOException("No URL supplied via DOM to URLInputSource constructor.");
554     }
555
556     m_url.setURL(attr);
557 }
558
559 BinInputStream* URLInputSource::makeStream() const
560 {
561     // Ask the URL to create us an appropriate input stream
562     return m_url.makeNewStream();
563 }
564
565 #else
566
567 URLInputSource::URLInputSource(const XMLCh* url, const char* systemId, string* cacheTag)
568     : InputSource(systemId), m_cacheTag(cacheTag), m_url(url), m_root(nullptr)
569 {
570 }
571
572 URLInputSource::URLInputSource(const DOMElement* e, const char* systemId, string* cacheTag)
573     : InputSource(systemId), m_cacheTag(cacheTag), m_root(e)
574 {
575 }
576
577 BinInputStream* URLInputSource::makeStream() const
578 {
579     return m_root ? new CurlURLInputStream(m_root, m_cacheTag) : new CurlURLInputStream(m_url.get(), m_cacheTag);
580 }
581
582 #endif
583
584 const char URLInputSource::asciiStatusCodeElementName[] = "URLInputSourceStatus";
585
586 const XMLCh URLInputSource::utf16StatusCodeElementName[] = UNICODE_LITERAL_20(U,R,L,I,n,p,u,t,S,o,u,r,c,e,S,t,a,t,u,s);