Added Xerces-C++ 3.1.2

This commit is contained in:
sippeangelo
2015-12-01 10:23:50 +01:00
parent 65d3f3bc31
commit 1b478d3159
815 changed files with 262638 additions and 0 deletions
@@ -0,0 +1,104 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* $Id: BinFileOutputStream.cpp 1662880 2015-02-28 01:55:31Z scantor $
*/
// ---------------------------------------------------------------------------
// Includes
// ---------------------------------------------------------------------------
#include <xercesc/internal/BinFileOutputStream.hpp>
#include <xercesc/util/Janitor.hpp>
#include <xercesc/util/PlatformUtils.hpp>
#include <xercesc/util/XMLExceptMsgs.hpp>
#include <xercesc/util/XMLString.hpp>
XERCES_CPP_NAMESPACE_BEGIN
// ---------------------------------------------------------------------------
// BinFileOutputStream: Constructors and Destructor
// ---------------------------------------------------------------------------
BinFileOutputStream::BinFileOutputStream(const XMLCh* const fileName
, MemoryManager* const manager)
:fSource(XMLPlatformUtils::openFileToWrite(fileName, manager))
,fMemoryManager(manager)
{
}
BinFileOutputStream::BinFileOutputStream(const char* const fileName
, MemoryManager* const manager)
:fSource(XMLPlatformUtils::openFileToWrite(fileName, manager))
,fMemoryManager(manager)
{
}
BinFileOutputStream::~BinFileOutputStream()
{
if (getIsOpen())
{
try
{
XMLPlatformUtils::closeFile(fSource, fMemoryManager);
}
catch (...)
{
// There is nothing we can do about it here.
}
}
}
// ---------------------------------------------------------------------------
// BinFileOutputStream: Getter methods
// ---------------------------------------------------------------------------
XMLFilePos BinFileOutputStream::getSize() const
{
return XMLPlatformUtils::fileSize(fSource, fMemoryManager);
}
// ---------------------------------------------------------------------------
// BinFileOutputStream: Stream management methods
// ---------------------------------------------------------------------------
void BinFileOutputStream::reset()
{
XMLPlatformUtils::resetFile(fSource, fMemoryManager);
}
// ---------------------------------------------------------------------------
// BinFileOutputStream: Implementation of the input stream interface
// ---------------------------------------------------------------------------
XMLFilePos BinFileOutputStream::curPos() const
{
return XMLPlatformUtils::curFilePos(fSource, fMemoryManager);
}
void BinFileOutputStream::writeBytes( const XMLByte* const toGo
, const XMLSize_t maxToWrite)
{
//
// Write up to the maximum bytes requested.
//
XMLPlatformUtils::writeBufferToFile(fSource, maxToWrite, toGo, fMemoryManager);
}
XERCES_CPP_NAMESPACE_END
@@ -0,0 +1,100 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* $Id: BinFileOutputStream.hpp 553915 2007-07-06 14:57:08Z amassari $
*/
#if !defined(XERCESC_INCLUDE_GUARD_BINFILEOUTPUTSTREAM_HPP)
#define XERCESC_INCLUDE_GUARD_BINFILEOUTPUTSTREAM_HPP
#include <xercesc/framework/BinOutputStream.hpp>
#include <xercesc/util/PlatformUtils.hpp>
XERCES_CPP_NAMESPACE_BEGIN
class XMLUTIL_EXPORT BinFileOutputStream : public BinOutputStream
{
public :
// -----------------------------------------------------------------------
// Constructors and Destructor
// -----------------------------------------------------------------------
~BinFileOutputStream();
BinFileOutputStream
(
const XMLCh* const fileName
, MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
);
BinFileOutputStream
(
const char* const fileName
, MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
);
// -----------------------------------------------------------------------
// Getter methods
// -----------------------------------------------------------------------
bool getIsOpen() const;
XMLFilePos getSize() const;
void reset();
// -----------------------------------------------------------------------
// Implementation of the input stream interface
// -----------------------------------------------------------------------
virtual XMLFilePos curPos() const;
virtual void writeBytes
(
const XMLByte* const toGo
, const XMLSize_t maxToWrite
);
private :
// -----------------------------------------------------------------------
// Unimplemented constructors and operators
// -----------------------------------------------------------------------
BinFileOutputStream(const BinFileOutputStream&);
BinFileOutputStream& operator=(const BinFileOutputStream&);
// -----------------------------------------------------------------------
// Private data members
//
// fSource
// The source file that we represent. The FileHandle type is defined
// per platform.
// -----------------------------------------------------------------------
FileHandle fSource;
MemoryManager* const fMemoryManager;
};
// ---------------------------------------------------------------------------
// BinFileOutputStream: Getter methods
// ---------------------------------------------------------------------------
inline bool BinFileOutputStream::getIsOpen() const
{
return (fSource != (FileHandle) XERCES_Invalid_File_Handle);
}
XERCES_CPP_NAMESPACE_END
#endif
@@ -0,0 +1,120 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* $Id: BinMemOutputStream.cpp 932887 2010-04-11 13:04:59Z borisk $
*/
#include <xercesc/internal/BinMemOutputStream.hpp>
#include <xercesc/util/XMLString.hpp>
#include <string.h>
XERCES_CPP_NAMESPACE_BEGIN
BinMemOutputStream::BinMemOutputStream( XMLSize_t initCapacity
, MemoryManager* const manager)
: fMemoryManager(manager)
, fDataBuf(0)
, fIndex(0)
, fCapacity(initCapacity)
{
// Buffer is one larger than capacity, to allow for zero term
fDataBuf = (XMLByte*) fMemoryManager->allocate
(
(fCapacity + 4) * sizeof(XMLByte)
);
// Keep it null terminated
fDataBuf[0] = XMLByte(0);
}
BinMemOutputStream::~BinMemOutputStream()
{
fMemoryManager->deallocate(fDataBuf);
}
void BinMemOutputStream::writeBytes( const XMLByte* const toGo
, const XMLSize_t maxToWrite)
{
if (maxToWrite)
{
ensureCapacity(maxToWrite);
memcpy(&fDataBuf[fIndex], toGo, maxToWrite * sizeof(XMLByte));
fIndex += maxToWrite;
}
}
const XMLByte* BinMemOutputStream::getRawBuffer() const
{
fDataBuf[fIndex] = 0;
fDataBuf[fIndex + 1] = 0;
fDataBuf[fIndex + 2] = 0;
fDataBuf[fIndex + 3] = 0;
return fDataBuf;
}
void BinMemOutputStream::reset()
{
fIndex = 0;
for (int i = 0; i < 4; i++)
{
fDataBuf[fIndex + i] = 0;
}
}
XMLFilePos BinMemOutputStream::curPos() const
{
return fIndex;
}
XMLFilePos BinMemOutputStream::getSize() const
{
return fCapacity;
}
// ---------------------------------------------------------------------------
// BinMemOutputStream: Private helper methods
// ---------------------------------------------------------------------------
void BinMemOutputStream::ensureCapacity(const XMLSize_t extraNeeded)
{
// If we can handle it, do nothing yet
if (fIndex + extraNeeded < fCapacity)
return;
// Oops, not enough room. Calc new capacity and allocate new buffer
const XMLSize_t newCap = ((fIndex + extraNeeded) * 2);
XMLByte* newBuf = (XMLByte*) fMemoryManager->allocate
(
(newCap+4) * sizeof(XMLByte)
);
memset(newBuf, 0, (newCap+4) * sizeof(XMLByte));
// Copy over the old stuff
memcpy(newBuf, fDataBuf, fCapacity * sizeof(XMLByte) + 4);
// Clean up old buffer and store new stuff
fMemoryManager->deallocate(fDataBuf);
fDataBuf = newBuf;
fCapacity = newCap;
}
XERCES_CPP_NAMESPACE_END
@@ -0,0 +1,103 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* $Id: BinMemOutputStream.hpp 932887 2010-04-11 13:04:59Z borisk $
*/
#if !defined(XERCESC_INCLUDE_GUARD_BINMEMOUTPUTSTREAM_HPP)
#define XERCESC_INCLUDE_GUARD_BINMEMOUTPUTSTREAM_HPP
#include <xercesc/framework/BinOutputStream.hpp>
#include <xercesc/util/PlatformUtils.hpp>
XERCES_CPP_NAMESPACE_BEGIN
class XMLUTIL_EXPORT BinMemOutputStream : public BinOutputStream
{
public :
// -----------------------------------------------------------------------
// Constructors and Destructor
// -----------------------------------------------------------------------
~BinMemOutputStream();
BinMemOutputStream
(
XMLSize_t initCapacity = 1023
, MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
);
// -----------------------------------------------------------------------
// Implementation of the output stream interface
// -----------------------------------------------------------------------
virtual XMLFilePos curPos() const;
virtual void writeBytes
(
const XMLByte* const toGo
, const XMLSize_t maxToWrite
) ;
// -----------------------------------------------------------------------
// Getter methods
// -----------------------------------------------------------------------
const XMLByte* getRawBuffer() const;
XMLFilePos getSize() const;
void reset();
private :
// -----------------------------------------------------------------------
// Unimplemented methods.
// -----------------------------------------------------------------------
BinMemOutputStream(const BinMemOutputStream&);
BinMemOutputStream& operator=(const BinMemOutputStream&);
// -----------------------------------------------------------------------
// Private helpers
// -----------------------------------------------------------------------
void ensureCapacity(const XMLSize_t extraNeeded);
// -----------------------------------------------------------------------
// Private data members
//
// fDataBuf
// The pointer to the buffer data. Its grown as needed. Its always
// one larger than fCapacity, to leave room for the null terminator.
//
// fIndex
// The current index into the buffer, as characters are appended
// to it. If its zero, then the buffer is empty.
//
// fCapacity
// The current capacity of the buffer. Its actually always one
// larger, to leave room for the null terminator.
//
// -----------------------------------------------------------------------
MemoryManager* fMemoryManager;
XMLByte* fDataBuf;
XMLSize_t fIndex;
XMLSize_t fCapacity;
};
XERCES_CPP_NAMESPACE_END
#endif
+255
View File
@@ -0,0 +1,255 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* $Id: CharTypeTables.hpp 527149 2007-04-10 14:56:39Z amassari $
*/
#if !defined(XERCESC_INCLUDE_GUARD_CHARTYPETABLES_HPP)
#define XERCESC_INCLUDE_GUARD_CHARTYPETABLES_HPP
#include <xercesc/util/XercesDefs.hpp>
XERCES_CPP_NAMESPACE_BEGIN
// ---------------------------------------------------------------------------
// These are character type lookup tables. They are included into XMLReader
// but are in their own private header in order to keep from making that
// file unreadable.
//
// THE RANGES and SINGLES MUST BE IN NUMERICAL ORDER, because the lookup
// method will use this info to short circuit the search!
// ---------------------------------------------------------------------------
static const XMLCh gBaseChars[] =
{
// Ranges
0x0041, 0x005A, 0x0061, 0x007A, 0x00C0, 0x00D6, 0x00D8, 0x00F6
, 0x00F8, 0x00FF
, 0x0100, 0x0131, 0x0134, 0x013E, 0x0141, 0x0148, 0x014A, 0x017E
, 0x0180, 0x01C3, 0x01CD, 0x01F0, 0x01F4, 0x01F5, 0x01FA, 0x0217
, 0x0250, 0x02A8, 0x02BB, 0x02C1, 0x0388, 0x038A, 0x038E, 0x03A1
, 0x03A3, 0x03CE, 0x03D0, 0x03D6, 0x03E2, 0x03F3, 0x0401, 0x040C
, 0x040E, 0x044F, 0x0451, 0x045C, 0x045E, 0x0481, 0x0490, 0x04C4
, 0x04C7, 0x04C8, 0x04CB, 0x04CC, 0x04D0, 0x04EB, 0x04EE, 0x04F5
, 0x04F8, 0x04F9, 0x0531, 0x0556, 0x0561, 0x0586, 0x05D0, 0x05EA
, 0x05F0, 0x05F2, 0x0621, 0x063A, 0x0641, 0x064A, 0x0671, 0x06B7
, 0x06BA, 0x06BE, 0x06C0, 0x06CE, 0x06D0, 0x06D3, 0x06E5, 0x06E6
, 0x0905, 0x0939, 0x0958, 0x0961, 0x0985, 0x098C, 0x098F, 0x0990
, 0x0993, 0x09A8, 0x09AA, 0x09B0, 0x09B6, 0x09B9, 0x09DC, 0x09DD
, 0x09DF, 0x09E1, 0x09F0, 0x09F1, 0x0A05, 0x0A0A, 0x0A0F, 0x0A10
, 0x0A13, 0x0A28, 0x0A2A, 0x0A30, 0x0A32, 0x0A33, 0x0A35, 0x0A36
, 0x0A38, 0x0A39, 0x0A59, 0x0A5C, 0x0A72, 0x0A74, 0x0A85, 0x0A8B
, 0x0A8F, 0x0A91, 0x0A93, 0x0AA8, 0x0AAA, 0x0AB0, 0x0AB2, 0x0AB3
, 0x0AB5, 0x0AB9, 0x0B05, 0x0B0C, 0x0B0F, 0x0B10, 0x0B13, 0x0B28
, 0x0B2A, 0x0B30, 0x0B32, 0x0B33, 0x0B36, 0x0B39, 0x0B5C, 0x0B5D
, 0x0B5F, 0x0B61, 0x0B85, 0x0B8A, 0x0B8E, 0x0B90, 0x0B92, 0x0B95
, 0x0B99, 0x0B9A, 0x0B9E, 0x0B9F, 0x0BA3, 0x0BA4, 0x0BA8, 0x0BAA
, 0x0BAE, 0x0BB5, 0x0BB7, 0x0BB9, 0x0C05, 0x0C0C, 0x0C0E, 0x0C10
, 0x0C12, 0x0C28, 0x0C2A, 0x0C33, 0x0C35, 0x0C39, 0x0C60, 0x0C61
, 0x0C85, 0x0C8C, 0x0C8E, 0x0C90, 0x0C92, 0x0CA8, 0x0CAA, 0x0CB3
, 0x0CB5, 0x0CB9, 0x0CE0, 0x0CE1, 0x0D05, 0x0D0C, 0x0D0E, 0x0D10
, 0x0D12, 0x0D28, 0x0D2A, 0x0D39, 0x0D60, 0x0D61, 0x0E01, 0x0E2E
, 0x0E32, 0x0E33, 0x0E40, 0x0E45, 0x0E81, 0x0E82, 0x0E87, 0x0E88
, 0x0E94, 0x0E97, 0x0E99, 0x0E9F, 0x0EA1, 0x0EA3, 0x0EAA, 0x0EAB
, 0x0EAD, 0x0EAE, 0x0EB2, 0x0EB3, 0x0EC0, 0x0EC4, 0x0F40, 0x0F47
, 0x0F49, 0x0F69, 0x10A0, 0x10C5, 0x10D0, 0x10F6, 0x1102, 0x1103
, 0x1105, 0x1107, 0x110B, 0x110C, 0x110E, 0x1112, 0x1154, 0x1155
, 0x115F, 0x1161, 0x116D, 0x116E, 0x1172, 0x1173, 0x11AE, 0x11AF
, 0x11B7, 0x11B8, 0x11BC, 0x11C2, 0x1E00, 0x1E9B, 0x1EA0, 0x1EF9
, 0x1F00, 0x1F15, 0x1F18, 0x1F1D, 0x1F20, 0x1F45, 0x1F48, 0x1F4D
, 0x1F50, 0x1F57, 0x1F5F, 0x1F7D, 0x1F80, 0x1FB4, 0x1FB6, 0x1FBC
, 0x1FC2, 0x1FC4, 0x1FC6, 0x1FCC, 0x1FD0, 0x1FD3, 0x1FD6, 0x1FDB
, 0x1FE0, 0x1FEC, 0x1FF2, 0x1FF4, 0x1FF6, 0x1FFC, 0x212A, 0x212B
, 0x2180, 0x2182, 0x3041, 0x3094, 0x30A1, 0x30FA, 0x3105, 0x312C
, 0xAC00, 0xD7A3
, 0x00
// Singles
, 0x0386, 0x038C, 0x03DA, 0x03DC, 0x03DE, 0x03E0, 0x0559, 0x06D5
, 0x093D, 0x09B2, 0x0A5E, 0x0A8D, 0x0ABD, 0x0AE0, 0x0B3D, 0x0B9C
, 0x0CDE, 0x0E30, 0x0E84, 0x0E8A, 0x0E8D, 0x0EA5, 0x0EA7, 0x0EB0
, 0x0EBD, 0x1100, 0x1109, 0x113C, 0x113E, 0x1140, 0x114C, 0x114E
, 0x1150, 0x1159, 0x1163, 0x1165, 0x1167, 0x1169, 0x1175, 0x119E
, 0x11A8, 0x11AB, 0x11BA, 0x11EB, 0x11F0, 0x11F9, 0x1F59, 0x1F5B
, 0x1F5D, 0x1FBE, 0x2126, 0x212E
, 0x00
};
static const XMLCh gCombiningChars[] =
{
// Ranges
0x0300, 0x0345, 0x0360, 0x0361, 0x0483, 0x0486, 0x0591, 0x05A1
, 0x05A3, 0x05B9, 0x05BB, 0x05BD, 0x05C1, 0x05C2, 0x064B, 0x0652
, 0x06D6, 0x06DC, 0x06DD, 0x06DF, 0x06E0, 0x06E4
, 0x06E7, 0x06E8, 0x06EA, 0x06ED, 0x0901, 0x0903, 0x093E, 0x094C
, 0x0951, 0x0954, 0x0962, 0x0963, 0x0981, 0x0983, 0x09C0, 0x09C4
, 0x09C7, 0x09C8, 0x09CB, 0x09CD, 0x09E2, 0x09E3, 0x0A40, 0x0A42
, 0x0A47, 0x0A48, 0x0A4B, 0x0A4D, 0x0A70, 0x0A71, 0x0A81, 0x0A83
, 0x0ABE, 0x0AC5, 0x0AC7, 0x0AC9, 0x0ACB, 0x0ACD, 0x0B01, 0x0B03
, 0x0B3E, 0x0B43, 0x0B47, 0x0B48, 0x0B4B, 0x0B4D, 0x0B56, 0x0B57
, 0x0B82, 0x0B83, 0x0BBE, 0x0BC2, 0x0BC6, 0x0BC8, 0x0BCA, 0x0BCD
, 0x0C01, 0x0C03, 0x0C3E, 0x0C44, 0x0C46, 0x0C48, 0x0C4A, 0x0C4D
, 0x0C55, 0x0C56, 0x0C82, 0x0C83, 0x0CBE, 0x0CC4, 0x0CC6, 0x0CC8
, 0x0CCA, 0x0CCD, 0x0CD5, 0x0CD6, 0x0D02, 0x0D03, 0x0D3E, 0x0D43
, 0x0D46, 0x0D48, 0x0D4A, 0x0D4D, 0x0E34, 0x0E3A, 0x0E47, 0x0E4E
, 0x0EB4, 0x0EB9, 0x0EBB, 0x0EBC, 0x0EC8, 0x0ECD, 0x0F18, 0x0F19
, 0x0F71, 0x0F84, 0x0F86, 0x0F8B, 0x0F90, 0x0F95, 0x0F99, 0x0FAD
, 0x0FB1, 0x0FB7, 0x20D0, 0x20DC, 0x302A, 0x302F
, 0x00
// Singles
, 0x05BF, 0x05C4, 0x0670
, 0x093C, 0x094D, 0x09BC, 0x09BE, 0x09BF, 0x09D7, 0x0A02
, 0x0A3C, 0x0A3E, 0x0A3F, 0x0ABC, 0x0B3C, 0x0BD7, 0x0D57, 0x0E31
, 0x0EB1, 0x0F35, 0x0F37, 0x0F39, 0x0F3E, 0x0F3F, 0x0F97, 0x0FB9
, 0x20E1, 0x3099, 0x309A
, 0x00
};
static const XMLCh gDigitChars[] =
{
// Ranges
0x0030, 0x0039, 0x0660, 0x0669, 0x06F0, 0x06F9, 0x0966, 0x096F
, 0x09E6, 0x09EF, 0x0A66, 0x0A6F, 0x0AE6, 0x0AEF, 0x0B66, 0x0B6F
, 0x0BE7, 0x0BEF, 0x0C66, 0x0C6F, 0x0CE6, 0x0CEF, 0x0D66, 0x0D6F
, 0x0E50, 0x0E59, 0x0ED0, 0x0ED9, 0x0F20, 0x0F29
, 0x00
// Singles
, 0x00
};
static const XMLCh gIdeographicChars[] =
{
// Ranges
0x3021, 0x3029, 0x4E00, 0x9FA5
, 0x00
// Singles
, 0x3007
, 0x00
};
static const XMLCh gExtenderChars[] =
{
// Ranges
0x3031, 0x3035, 0x309D, 0x309E, 0x30FC, 0x30FE
, 0x00
// Singles
, 0x00B7, 0x02D0, 0x02D1, 0x0387, 0x0640, 0x0E46, 0x0EC6, 0x3005
, 0x00
};
static const XMLCh gPublicIdChars[] =
{
// Ranges
0x0023, 0x0025, 0x0027, 0x003B, 0x003F, 0x005A, 0x0061, 0x007A
, 0x00
// Singles
, 0x000A, 0x000D, 0x0020, 0x0021, 0x003D, 0x005F
, 0x00
};
static const XMLCh gWhitespaceChars[] =
{
// Ranges
0x00
, 0x0020, 0x0009, 0x000D, 0x000A
, 0x00
};
static const XMLCh gXMLChars[] =
{
// Ranges
0x0020, 0xD7FF, 0xE000, 0xFFFD
, 0x00
, 0x0009, 0x000D, 0x000A
, 0x00
};
// The following are for XML 1.1
static const XMLCh gWhitespaceChars1_1[] =
{
// Ranges
0x00
, 0x0020, 0x0009, 0x000D, 0x000A, 0x0085, 0x2028
, 0x00
};
static const XMLCh gFirstNameChars1_1[] =
{
// Ranges
// Note: 0x10000 to 0xEFFFF are also allowed, need to separately check
0x0041, 0x005A, 0x0061, 0x007A, 0x00C0, 0x00D6, 0x00D8, 0x00F6
, 0x00F8, 0x02FF, 0x0370, 0x037D, 0x037F, 0x1FFF, 0x200C, 0x200D
, 0x2070, 0x218F, 0x2C00, 0x2FEF, 0x3001, 0xD7FF, 0xF900, 0xFDCF
, 0xFDF0, 0xFFFD
, 0x00
, 0x003A, 0x005F
, 0x00
};
static const XMLCh gNameChars1_1[] =
{
// Ranges
// Note: 0x10000 to 0xEFFFF are also allowed, need to separately check
0x0030, 0x0039, 0x0041, 0x005A, 0x0061, 0x007A, 0x00C0, 0x00D6
, 0x00D8, 0x00F6, 0x00F8, 0x037D, 0x037F, 0x1FFF, 0x200C, 0x200D
, 0x203F, 0x2040, 0x2070, 0x218F, 0x2C00, 0x2FEF, 0x3001, 0xD7FF
, 0xF900, 0xFDCF, 0xFDF0, 0xFFFD
, 0x00
, 0x002D, 0x002E, 0x003A, 0x005F, 0x00B7
, 0x00
};
static const XMLCh gXMLChars1_1[] =
{
// Ranges
0x0020, 0x007E, 0x00A0, 0xD7FF, 0xE000, 0xFFFD
, 0x00
, 0x0009, 0x000D, 0x000A, 0x0085
, 0x00
};
static const XMLCh gControl_Chars1_1[] =
{
// Ranges
0x0001, 0x001F, 0x007F, 0x009F
, 0x00
, 0x00
};
XERCES_CPP_NAMESPACE_END
#endif
File diff suppressed because it is too large Load Diff
+192
View File
@@ -0,0 +1,192 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* $Id: DGXMLScanner.hpp 810580 2009-09-02 15:52:22Z amassari $
*/
#if !defined(XERCESC_INCLUDE_GUARD_DGXMLSCANNER_HPP)
#define XERCESC_INCLUDE_GUARD_DGXMLSCANNER_HPP
#include <xercesc/internal/XMLScanner.hpp>
#include <xercesc/util/ValueVectorOf.hpp>
#include <xercesc/util/NameIdPool.hpp>
#include <xercesc/util/Hash2KeysSetOf.hpp>
#include <xercesc/validators/common/Grammar.hpp>
XERCES_CPP_NAMESPACE_BEGIN
class DTDElementDecl;
class DTDGrammar;
class DTDValidator;
// This is an integrated scanner class, which does DTD/XML Schema grammar
// processing.
class XMLPARSER_EXPORT DGXMLScanner : public XMLScanner
{
public :
// -----------------------------------------------------------------------
// Constructors and Destructor
// -----------------------------------------------------------------------
DGXMLScanner
(
XMLValidator* const valToAdopt
, GrammarResolver* const grammarResolver
, MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
);
DGXMLScanner
(
XMLDocumentHandler* const docHandler
, DocTypeHandler* const docTypeHandler
, XMLEntityHandler* const entityHandler
, XMLErrorReporter* const errReporter
, XMLValidator* const valToAdopt
, GrammarResolver* const grammarResolver
, MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
);
virtual ~DGXMLScanner();
// -----------------------------------------------------------------------
// XMLScanner public virtual methods
// -----------------------------------------------------------------------
virtual const XMLCh* getName() const;
virtual NameIdPool<DTDEntityDecl>* getEntityDeclPool();
virtual const NameIdPool<DTDEntityDecl>* getEntityDeclPool() const;
virtual void scanDocument
(
const InputSource& src
);
virtual bool scanNext(XMLPScanToken& toFill);
virtual Grammar* loadGrammar
(
const InputSource& src
, const short grammarType
, const bool toCache = false
);
virtual Grammar::GrammarType getCurrentGrammarType() const;
private :
// -----------------------------------------------------------------------
// Unimplemented constructors and operators
// -----------------------------------------------------------------------
DGXMLScanner();
DGXMLScanner(const DGXMLScanner&);
DGXMLScanner& operator=(const DGXMLScanner&);
// -----------------------------------------------------------------------
// XMLScanner virtual methods
// -----------------------------------------------------------------------
virtual void scanCDSection();
virtual void scanCharData(XMLBuffer& toToUse);
virtual EntityExpRes scanEntityRef
(
const bool inAttVal
, XMLCh& firstCh
, XMLCh& secondCh
, bool& escaped
);
virtual void scanDocTypeDecl();
virtual void scanReset(const InputSource& src);
virtual void sendCharData(XMLBuffer& toSend);
virtual InputSource* resolveSystemId(const XMLCh* const sysId
,const XMLCh* const pubId);
// -----------------------------------------------------------------------
// Private helper methods
// -----------------------------------------------------------------------
void commonInit();
void cleanUp();
XMLSize_t buildAttList
(
const XMLSize_t attCount
, XMLElementDecl* elemDecl
, RefVectorOf<XMLAttr>& toFill
);
void updateNSMap
(
const XMLCh* const attrPrefix
, const XMLCh* const attrLocalName
, const XMLCh* const attrValue
);
void scanAttrListforNameSpaces(RefVectorOf<XMLAttr>* theAttrList, XMLSize_t attCount, XMLElementDecl* elemDecl);
// -----------------------------------------------------------------------
// Private scanning methods
// -----------------------------------------------------------------------
bool scanAttValue
(
const XMLAttDef* const attDef
, const XMLCh *const attrName
, XMLBuffer& toFill
);
bool scanContent();
void scanEndTag(bool& gotData);
bool scanStartTag(bool& gotData);
bool scanStartTagNS(bool& gotData);
// -----------------------------------------------------------------------
// Grammar preparsing methods
// -----------------------------------------------------------------------
Grammar* loadDTDGrammar(const InputSource& src, const bool toCache = false);
// -----------------------------------------------------------------------
// Data members
//
// fRawAttrList
// During the initial scan of the attributes we can only do a raw
// scan for key/value pairs. So this vector is used to store them
// until they can be processed (and put into fAttrList.)
//
// fDTDValidator
// The DTD validator instance.
//
// fDTDElemNonDeclPool
// registry of "faulted-in" DTD element decls
// fElemCount
// count of the number of start tags seen so far (starts at 1).
// Used for duplicate attribute detection/processing of required/defaulted attributes
// fAttDefRegistry
// mapping from XMLAttDef instances to the count of the last
// start tag where they were utilized.
// fUndeclaredAttrRegistry
// mapping of attr QNames to detect duplicates
//
// -----------------------------------------------------------------------
ValueVectorOf<XMLAttr*>* fAttrNSList;
DTDValidator* fDTDValidator;
DTDGrammar* fDTDGrammar;
NameIdPool<DTDElementDecl>* fDTDElemNonDeclPool;
unsigned int fElemCount;
RefHashTableOf<unsigned int, PtrHasher>* fAttDefRegistry;
Hash2KeysSetOf<StringHasher>* fUndeclaredAttrRegistry;
};
inline const XMLCh* DGXMLScanner::getName() const
{
return XMLUni::fgDGXMLScanner;
}
inline Grammar::GrammarType DGXMLScanner::getCurrentGrammarType() const
{
return Grammar::DTDGrammarType;
}
XERCES_CPP_NAMESPACE_END
#endif
+891
View File
@@ -0,0 +1,891 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* $Id: ElemStack.cpp 830538 2009-10-28 13:41:11Z amassari $
*/
// ---------------------------------------------------------------------------
// Includes
// ---------------------------------------------------------------------------
#include <string.h>
#include <xercesc/util/EmptyStackException.hpp>
#include <xercesc/util/NoSuchElementException.hpp>
#include <xercesc/framework/XMLElementDecl.hpp>
#include <xercesc/internal/ElemStack.hpp>
#include <xercesc/validators/common/Grammar.hpp>
XERCES_CPP_NAMESPACE_BEGIN
// ---------------------------------------------------------------------------
// ElemStack: Constructors and Destructor
// ---------------------------------------------------------------------------
ElemStack::ElemStack(MemoryManager* const manager) :
fEmptyNamespaceId(0)
, fGlobalPoolId(0)
, fPrefixPool(109, manager)
, fGlobalNamespaces(0)
, fStack(0)
, fStackCapacity(32)
, fStackTop(0)
, fUnknownNamespaceId(0)
, fXMLNamespaceId(0)
, fXMLPoolId(0)
, fXMLNSNamespaceId(0)
, fXMLNSPoolId(0)
, fNamespaceMap(0)
, fMemoryManager(manager)
{
// Do an initial allocation of the stack and zero it out
fStack = (StackElem**) fMemoryManager->allocate
(
fStackCapacity * sizeof(StackElem*)
);//new StackElem*[fStackCapacity];
memset(fStack, 0, fStackCapacity * sizeof(StackElem*));
fNamespaceMap = new (fMemoryManager) ValueVectorOf<PrefMapElem*>(16, fMemoryManager);
}
ElemStack::~ElemStack()
{
if(fGlobalNamespaces)
{
fMemoryManager->deallocate(fGlobalNamespaces->fMap);
delete fGlobalNamespaces;
}
//
// Start working from the bottom of the stack and clear it out as we
// go up. Once we hit an uninitialized one, we can break out.
//
for (XMLSize_t stackInd = 0; stackInd < fStackCapacity; stackInd++)
{
// If this entry has been set, then lets clean it up
if (!fStack[stackInd])
break;
fMemoryManager->deallocate(fStack[stackInd]->fChildren);//delete [] fStack[stackInd]->fChildren;
fMemoryManager->deallocate(fStack[stackInd]->fMap);//delete [] fStack[stackInd]->fMap;
fMemoryManager->deallocate(fStack[stackInd]->fSchemaElemName);
delete fStack[stackInd];
}
// Delete the stack array itself now
fMemoryManager->deallocate(fStack);//delete [] fStack;
delete fNamespaceMap;
}
// ---------------------------------------------------------------------------
// ElemStack: Stack access
// ---------------------------------------------------------------------------
XMLSize_t ElemStack::addLevel()
{
// See if we need to expand the stack
if (fStackTop == fStackCapacity)
expandStack();
// If this element has not been initialized yet, then initialize it
if (!fStack[fStackTop])
{
fStack[fStackTop] = new (fMemoryManager) StackElem;
fStack[fStackTop]->fChildCapacity = 0;
fStack[fStackTop]->fChildren = 0;
fStack[fStackTop]->fMapCapacity = 0;
fStack[fStackTop]->fMap = 0;
fStack[fStackTop]->fSchemaElemName = 0;
fStack[fStackTop]->fSchemaElemNameMaxLen = 0;
}
// Set up the new top row
fStack[fStackTop]->fThisElement = 0;
fStack[fStackTop]->fReaderNum = 0xFFFFFFFF;
fStack[fStackTop]->fChildCount = 0;
fStack[fStackTop]->fMapCount = 0;
fStack[fStackTop]->fValidationFlag = false;
fStack[fStackTop]->fCommentOrPISeen = false;
fStack[fStackTop]->fReferenceEscaped = false;
fStack[fStackTop]->fCurrentURI = fUnknownNamespaceId;
fStack[fStackTop]->fCurrentScope = Grammar::TOP_LEVEL_SCOPE;
fStack[fStackTop]->fCurrentGrammar = 0;
// Bump the top of stack
fStackTop++;
return fStackTop-1;
}
XMLSize_t ElemStack::addLevel(XMLElementDecl* const toSet, const XMLSize_t readerNum)
{
// See if we need to expand the stack
if (fStackTop == fStackCapacity)
expandStack();
// If this element has not been initialized yet, then initialize it
if (!fStack[fStackTop])
{
fStack[fStackTop] = new (fMemoryManager) StackElem;
fStack[fStackTop]->fChildCapacity = 0;
fStack[fStackTop]->fChildren = 0;
fStack[fStackTop]->fMapCapacity = 0;
fStack[fStackTop]->fMap = 0;
fStack[fStackTop]->fSchemaElemName = 0;
fStack[fStackTop]->fSchemaElemNameMaxLen = 0;
}
// Set up the new top row
fStack[fStackTop]->fThisElement = toSet;
fStack[fStackTop]->fReaderNum = readerNum;
fStack[fStackTop]->fChildCount = 0;
fStack[fStackTop]->fMapCount = 0;
fStack[fStackTop]->fValidationFlag = false;
fStack[fStackTop]->fCommentOrPISeen = false;
fStack[fStackTop]->fReferenceEscaped = false;
fStack[fStackTop]->fCurrentURI = fUnknownNamespaceId;
fStack[fStackTop]->fCurrentScope = Grammar::TOP_LEVEL_SCOPE;
fStack[fStackTop]->fCurrentGrammar = 0;
// Bump the top of stack
fStackTop++;
return fStackTop-1;
}
const ElemStack::StackElem* ElemStack::popTop()
{
// Watch for an underflow error
if (!fStackTop)
ThrowXMLwithMemMgr(EmptyStackException, XMLExcepts::ElemStack_StackUnderflow, fMemoryManager);
fStackTop--;
return fStack[fStackTop];
}
void
ElemStack::setElement(XMLElementDecl* const toSet, const XMLSize_t readerNum)
{
if (!fStackTop)
ThrowXMLwithMemMgr(EmptyStackException, XMLExcepts::ElemStack_EmptyStack, fMemoryManager);
fStack[fStackTop - 1]->fThisElement = toSet;
fStack[fStackTop - 1]->fReaderNum = readerNum;
}
// ---------------------------------------------------------------------------
// ElemStack: Stack top access
// ---------------------------------------------------------------------------
XMLSize_t ElemStack::addChild(QName* const child, const bool toParent)
{
if (!fStackTop)
ThrowXMLwithMemMgr(EmptyStackException, XMLExcepts::ElemStack_EmptyStack, fMemoryManager);
//
// If they want to add to the parent, then we have to have at least two
// elements on the stack.
//
if (toParent && (fStackTop < 2))
ThrowXMLwithMemMgr(NoSuchElementException, XMLExcepts::ElemStack_NoParentPushed, fMemoryManager);
// Get a convenience pointer to the stack top row
StackElem* curRow = toParent
? fStack[fStackTop - 2] : fStack[fStackTop - 1];
// See if we need to expand this row's child array
if (curRow->fChildCount == curRow->fChildCapacity)
{
// Increase the capacity by a quarter and allocate a new row
const XMLSize_t newCapacity = curRow->fChildCapacity ?
(XMLSize_t)(curRow->fChildCapacity * 1.25) :
32;
QName** newRow = (QName**) fMemoryManager->allocate
(
newCapacity * sizeof(QName*)
);//new QName*[newCapacity];
//
// Copy over the old contents. We don't have to initialize the new
// part because The current child count is used to know how much of
// it is valid.
//
// Only both doing this if there is any current content, since
// this code also does the initial faulting in of the array when
// both the current capacity and child count are zero.
//
for (XMLSize_t index = 0; index < curRow->fChildCount; index++)
newRow[index] = curRow->fChildren[index];
// Clean up the old children and store the new info
fMemoryManager->deallocate(curRow->fChildren);//delete [] curRow->fChildren;
curRow->fChildren = newRow;
curRow->fChildCapacity = newCapacity;
}
// Add this id to the end of the row's child id array and bump the count
curRow->fChildren[curRow->fChildCount++] = child;
// Return the level of the index we just filled (before the bump)
return curRow->fChildCount - 1;
}
const ElemStack::StackElem* ElemStack::topElement() const
{
if (!fStackTop)
ThrowXMLwithMemMgr(EmptyStackException, XMLExcepts::ElemStack_EmptyStack, fMemoryManager);
return fStack[fStackTop - 1];
}
// ---------------------------------------------------------------------------
// ElemStack: Prefix map methods
// ---------------------------------------------------------------------------
void ElemStack::addGlobalPrefix(const XMLCh* const prefixToAdd
, const unsigned int uriId)
{
if (!fGlobalNamespaces)
{
fGlobalNamespaces = new (fMemoryManager) StackElem;
fGlobalNamespaces->fChildCapacity = 0;
fGlobalNamespaces->fChildren = 0;
fGlobalNamespaces->fMapCapacity = 0;
fGlobalNamespaces->fMap = 0;
fGlobalNamespaces->fMapCount = 0;
fGlobalNamespaces->fSchemaElemName = 0;
fGlobalNamespaces->fSchemaElemNameMaxLen = 0;
fGlobalNamespaces->fThisElement = 0;
fGlobalNamespaces->fReaderNum = 0xFFFFFFFF;
fGlobalNamespaces->fChildCount = 0;
fGlobalNamespaces->fValidationFlag = false;
fGlobalNamespaces->fCommentOrPISeen = false;
fGlobalNamespaces->fReferenceEscaped = false;
fGlobalNamespaces->fCurrentURI = fUnknownNamespaceId;
fGlobalNamespaces->fCurrentScope = Grammar::TOP_LEVEL_SCOPE;
fGlobalNamespaces->fCurrentGrammar = 0;
}
// Map the prefix to its unique id
const unsigned int prefId = fPrefixPool.addOrFind(prefixToAdd);
//
// Add a new element to the prefix map for this element. If its full,
// then expand it out.
//
if (fGlobalNamespaces->fMapCount == fGlobalNamespaces->fMapCapacity)
expandMap(fGlobalNamespaces);
//
// And now add a new element for this prefix. Watch for the special case
// of xmlns=="", and force it to ""=[globalid]
//
fGlobalNamespaces->fMap[fGlobalNamespaces->fMapCount].fPrefId = prefId;
if ((prefId == fGlobalPoolId) && (uriId == fEmptyNamespaceId))
fGlobalNamespaces->fMap[fGlobalNamespaces->fMapCount].fURIId = fEmptyNamespaceId;
else
fGlobalNamespaces->fMap[fGlobalNamespaces->fMapCount].fURIId = uriId;
// Bump the map count now
fGlobalNamespaces->fMapCount++;
}
void ElemStack::addPrefix( const XMLCh* const prefixToAdd
, const unsigned int uriId)
{
if (!fStackTop)
ThrowXMLwithMemMgr(EmptyStackException, XMLExcepts::ElemStack_EmptyStack, fMemoryManager);
// Get a convenience pointer to the stack top row
StackElem* curRow = fStack[fStackTop - 1];
// Map the prefix to its unique id
const unsigned int prefId = fPrefixPool.addOrFind(prefixToAdd);
//
// Add a new element to the prefix map for this element. If its full,
// then expand it out.
//
if (curRow->fMapCount == curRow->fMapCapacity)
expandMap(curRow);
//
// And now add a new element for this prefix. Watch for the special case
// of xmlns=="", and force it to ""=[globalid]
//
curRow->fMap[curRow->fMapCount].fPrefId = prefId;
if ((prefId == fGlobalPoolId) && (uriId == fEmptyNamespaceId))
curRow->fMap[curRow->fMapCount].fURIId = fEmptyNamespaceId;
else
curRow->fMap[curRow->fMapCount].fURIId = uriId;
// Bump the map count now
curRow->fMapCount++;
}
unsigned int ElemStack::mapPrefixToURI( const XMLCh* const prefixToMap
, bool& unknown) const
{
// Assume we find it
unknown = false;
//
// Map the prefix to its unique id, from the prefix string pool. If its
// not a valid prefix, then its a failure.
//
unsigned int prefixId = (!prefixToMap || !*prefixToMap)?fGlobalPoolId : fPrefixPool.getId(prefixToMap);
if (prefixId == 0)
{
unknown = true;
return fUnknownNamespaceId;
}
//
// Check for the special prefixes 'xml' and 'xmlns' since they cannot
// be overridden.
//
else if (prefixId == fXMLPoolId)
return fXMLNamespaceId;
else if (prefixId == fXMLNSPoolId)
return fXMLNSNamespaceId;
//
// Start at the stack top and work backwards until we come to some
// element that mapped this prefix.
//
for (XMLSize_t index = fStackTop; index > 0; index--)
{
// Get a convenience pointer to the current element
StackElem* curRow = fStack[index-1];
// Search the map at this level for the passed prefix
for (XMLSize_t mapIndex = 0; mapIndex < curRow->fMapCount; mapIndex++)
{
if (curRow->fMap[mapIndex].fPrefId == prefixId)
return curRow->fMap[mapIndex].fURIId;
}
}
// If the prefix wasn't found, try in the global namespaces
if(fGlobalNamespaces)
{
for (XMLSize_t mapIndex = 0; mapIndex < fGlobalNamespaces->fMapCount; mapIndex++)
{
if (fGlobalNamespaces->fMap[mapIndex].fPrefId == prefixId)
return fGlobalNamespaces->fMap[mapIndex].fURIId;
}
}
//
// If the prefix is an empty string, then we will return the special
// global namespace id. This can be overridden, but no one has or we
// would have not gotten here.
//
if (!*prefixToMap)
return fEmptyNamespaceId;
// Oh well, don't have a clue so return the unknown id
unknown = true;
return fUnknownNamespaceId;
}
ValueVectorOf<PrefMapElem*>* ElemStack::getNamespaceMap() const
{
fNamespaceMap->removeAllElements();
// Start at the stack top and work backwards until we come to some
// element that mapped this prefix.
for (XMLSize_t index = fStackTop; index > 0; index--)
{
// Get a convenience pointer to the current element
StackElem* curRow = fStack[index-1];
// If no prefixes mapped at this level, then go the next one
if (!curRow->fMapCount)
continue;
// Search the map at this level for the passed prefix
for (XMLSize_t mapIndex = 0; mapIndex < curRow->fMapCount; mapIndex++)
fNamespaceMap->addElement(&(curRow->fMap[mapIndex]));
}
// Add the global namespaces
if(fGlobalNamespaces)
{
for (XMLSize_t mapIndex = 0; mapIndex < fGlobalNamespaces->fMapCount; mapIndex++)
fNamespaceMap->addElement(&(fGlobalNamespaces->fMap[mapIndex]));
}
return fNamespaceMap;
}
// ---------------------------------------------------------------------------
// ElemStack: Miscellaneous methods
// ---------------------------------------------------------------------------
void ElemStack::reset( const unsigned int emptyId
, const unsigned int unknownId
, const unsigned int xmlId
, const unsigned int xmlNSId)
{
if(fGlobalNamespaces)
{
fMemoryManager->deallocate(fGlobalNamespaces->fMap);
delete fGlobalNamespaces;
fGlobalNamespaces = 0;
}
// Reset the stack top to clear the stack
fStackTop = 0;
// if first time, put in the standard prefixes
if (fXMLPoolId == 0) {
fGlobalPoolId = fPrefixPool.addOrFind(XMLUni::fgZeroLenString);
fXMLPoolId = fPrefixPool.addOrFind(XMLUni::fgXMLString);
fXMLNSPoolId = fPrefixPool.addOrFind(XMLUni::fgXMLNSString);
}
// And store the new special URI ids
fEmptyNamespaceId = emptyId;
fUnknownNamespaceId = unknownId;
fXMLNamespaceId = xmlId;
fXMLNSNamespaceId = xmlNSId;
}
// ---------------------------------------------------------------------------
// ElemStack: Private helpers
// ---------------------------------------------------------------------------
void ElemStack::expandMap(StackElem* const toExpand)
{
// For convenience get the old map size
const XMLSize_t oldCap = toExpand->fMapCapacity;
//
// Expand the capacity by 25%, or initialize it to 16 if its currently
// empty. Then allocate a new temp buffer.
//
const XMLSize_t newCapacity = oldCap ?
(XMLSize_t )(oldCap * 1.25) : 16;
PrefMapElem* newMap = (PrefMapElem*) fMemoryManager->allocate
(
newCapacity * sizeof(PrefMapElem)
);//new PrefMapElem[newCapacity];
//
// Copy over the old stuff. We DON'T have to zero out the new stuff
// since this is a by value map and the current map index controls what
// is relevant.
//
memcpy(newMap, toExpand->fMap, oldCap * sizeof(PrefMapElem));
// Delete the old map and store the new stuff
fMemoryManager->deallocate(toExpand->fMap);//delete [] toExpand->fMap;
toExpand->fMap = newMap;
toExpand->fMapCapacity = newCapacity;
}
void ElemStack::expandStack()
{
// Expand the capacity by 25% and allocate a new buffer
const XMLSize_t newCapacity = (XMLSize_t)(fStackCapacity * 1.25);
StackElem** newStack = (StackElem**) fMemoryManager->allocate
(
newCapacity * sizeof(StackElem*)
);//new StackElem*[newCapacity];
// Copy over the old stuff
memcpy(newStack, fStack, fStackCapacity * sizeof(StackElem*));
//
// And zero out the new stuff. Though we use a stack top, we reuse old
// stack contents so we need to know if elements have been initially
// allocated or not as we push new stuff onto the stack.
//
memset
(
&newStack[fStackCapacity]
, 0
, (newCapacity - fStackCapacity) * sizeof(StackElem*)
);
// Delete the old array and update our members
fMemoryManager->deallocate(fStack);//delete [] fStack;
fStack = newStack;
fStackCapacity = newCapacity;
}
// ---------------------------------------------------------------------------
// WFElemStack: Constructors and Destructor
// ---------------------------------------------------------------------------
WFElemStack::WFElemStack(MemoryManager* const manager) :
fEmptyNamespaceId(0)
, fGlobalPoolId(0)
, fStackCapacity(32)
, fStackTop(0)
, fUnknownNamespaceId(0)
, fXMLNamespaceId(0)
, fXMLPoolId(0)
, fXMLNSNamespaceId(0)
, fXMLNSPoolId(0)
, fMapCapacity(0)
, fMap(0)
, fStack(0)
, fPrefixPool(109, manager)
, fMemoryManager(manager)
{
// Do an initial allocation of the stack and zero it out
fStack = (StackElem**) fMemoryManager->allocate
(
fStackCapacity * sizeof(StackElem*)
);//new StackElem*[fStackCapacity];
memset(fStack, 0, fStackCapacity * sizeof(StackElem*));
}
WFElemStack::~WFElemStack()
{
//
// Start working from the bottom of the stack and clear it out as we
// go up. Once we hit an uninitialized one, we can break out.
//
for (XMLSize_t stackInd = 0; stackInd < fStackCapacity; stackInd++)
{
// If this entry has been set, then lets clean it up
if (!fStack[stackInd])
break;
fMemoryManager->deallocate(fStack[stackInd]->fThisElement);//delete [] fStack[stackInd]->fThisElement;
delete fStack[stackInd];
}
if (fMap)
fMemoryManager->deallocate(fMap);//delete [] fMap;
// Delete the stack array itself now
fMemoryManager->deallocate(fStack);//delete [] fStack;
}
// ---------------------------------------------------------------------------
// WFElemStack: Stack access
// ---------------------------------------------------------------------------
XMLSize_t WFElemStack::addLevel()
{
// See if we need to expand the stack
if (fStackTop == fStackCapacity)
expandStack();
// If this element has not been initialized yet, then initialize it
if (!fStack[fStackTop])
{
fStack[fStackTop] = new (fMemoryManager) StackElem;
fStack[fStackTop]->fThisElement = 0;
fStack[fStackTop]->fElemMaxLength = 0;
}
// Set up the new top row
fStack[fStackTop]->fReaderNum = 0xFFFFFFFF;
fStack[fStackTop]->fCurrentURI = fUnknownNamespaceId;
fStack[fStackTop]->fTopPrefix = -1;
if (fStackTop != 0)
fStack[fStackTop]->fTopPrefix = fStack[fStackTop - 1]->fTopPrefix;
// Bump the top of stack
fStackTop++;
return fStackTop-1;
}
XMLSize_t
WFElemStack::addLevel(const XMLCh* const toSet,
const unsigned int toSetLen,
const unsigned int readerNum)
{
// See if we need to expand the stack
if (fStackTop == fStackCapacity)
expandStack();
// If this element has not been initialized yet, then initialize it
if (!fStack[fStackTop])
{
fStack[fStackTop] = new (fMemoryManager) StackElem;
fStack[fStackTop]->fThisElement = 0;
fStack[fStackTop]->fElemMaxLength = 0;
}
// Set up the new top row
fStack[fStackTop]->fCurrentURI = fUnknownNamespaceId;
fStack[fStackTop]->fTopPrefix = -1;
// And store the new stuff
if (toSetLen > fStack[fStackTop]->fElemMaxLength) {
fMemoryManager->deallocate(fStack[fStackTop]->fThisElement);//delete [] fStack[fStackTop]->fThisElement;
fStack[fStackTop]->fElemMaxLength = toSetLen;
fStack[fStackTop]->fThisElement = (XMLCh*) fMemoryManager->allocate
(
(toSetLen + 1) * sizeof(XMLCh)
);//new XMLCh[toSetLen + 1];
}
XMLString::moveChars(fStack[fStackTop]->fThisElement, toSet, toSetLen + 1);
fStack[fStackTop]->fReaderNum = readerNum;
if (fStackTop != 0)
fStack[fStackTop]->fTopPrefix = fStack[fStackTop - 1]->fTopPrefix;
// Bump the top of stack
fStackTop++;
return fStackTop-1;
}
const WFElemStack::StackElem* WFElemStack::popTop()
{
// Watch for an underflow error
if (!fStackTop)
ThrowXMLwithMemMgr(EmptyStackException, XMLExcepts::ElemStack_StackUnderflow, fMemoryManager);
fStackTop--;
return fStack[fStackTop];
}
void
WFElemStack::setElement(const XMLCh* const toSet,
const unsigned int toSetLen,
const unsigned int readerNum)
{
if (!fStackTop)
ThrowXMLwithMemMgr(EmptyStackException, XMLExcepts::ElemStack_EmptyStack, fMemoryManager);
if (toSetLen > fStack[fStackTop - 1]->fElemMaxLength) {
fMemoryManager->deallocate(fStack[fStackTop - 1]->fThisElement);//delete [] fStack[fStackTop - 1]->fThisElement;
fStack[fStackTop - 1]->fElemMaxLength = toSetLen;
fStack[fStackTop - 1]->fThisElement = (XMLCh*) fMemoryManager->allocate
(
(toSetLen + 1) * sizeof(XMLCh)
);//new XMLCh[toSetLen + 1];
}
XMLString::moveChars(fStack[fStackTop - 1]->fThisElement, toSet, toSetLen + 1);
fStack[fStackTop - 1]->fReaderNum = readerNum;
}
// ---------------------------------------------------------------------------
// WFElemStack: Stack top access
// ---------------------------------------------------------------------------
const WFElemStack::StackElem* WFElemStack::topElement() const
{
if (!fStackTop)
ThrowXMLwithMemMgr(EmptyStackException, XMLExcepts::ElemStack_EmptyStack, fMemoryManager);
return fStack[fStackTop - 1];
}
// ---------------------------------------------------------------------------
// WFElemStack: Prefix map methods
// ---------------------------------------------------------------------------
void WFElemStack::addPrefix( const XMLCh* const prefixToAdd
, const unsigned int uriId)
{
if (!fStackTop)
ThrowXMLwithMemMgr(EmptyStackException, XMLExcepts::ElemStack_EmptyStack, fMemoryManager);
// Get a convenience pointer to the stack top row
StackElem* curRow = fStack[fStackTop - 1];
// Map the prefix to its unique id
const unsigned int prefId = fPrefixPool.addOrFind(prefixToAdd);
//
// Add a new element to the prefix map for this element. If its full,
// then expand it out.
//
if ((unsigned int)curRow->fTopPrefix + 1 == fMapCapacity)
expandMap();
//
// And now add a new element for this prefix. Watch for the special case
// of xmlns=="", and force it to ""=[globalid]
//
fMap[curRow->fTopPrefix + 1].fPrefId = prefId;
if ((prefId == fGlobalPoolId) && (uriId == fEmptyNamespaceId))
fMap[curRow->fTopPrefix + 1].fURIId = fEmptyNamespaceId;
else
fMap[curRow->fTopPrefix + 1].fURIId = uriId;
// Bump the map count now
curRow->fTopPrefix++;
}
unsigned int WFElemStack::mapPrefixToURI( const XMLCh* const prefixToMap
, bool& unknown) const
{
// Assume we find it
unknown = false;
//
// Map the prefix to its unique id, from the prefix string pool. If its
// not a valid prefix, then its a failure.
//
unsigned int prefixId = fPrefixPool.getId(prefixToMap);
if (!prefixId)
{
unknown = true;
return fUnknownNamespaceId;
}
//
// Check for the special prefixes 'xml' and 'xmlns' since they cannot
// be overridden.
//
if (prefixId == fXMLPoolId)
return fXMLNamespaceId;
else if (prefixId == fXMLNSPoolId)
return fXMLNSNamespaceId;
//
// Start at the stack top and work backwards until we come to some
// element that mapped this prefix.
//
// Get a convenience pointer to the stack top row
StackElem* curRow = fStack[fStackTop - 1];
for (int mapIndex = curRow->fTopPrefix; mapIndex >=0; mapIndex--)
{
if (fMap[mapIndex].fPrefId == prefixId)
return fMap[mapIndex].fURIId;
}
//
// If the prefix is an empty string, then we will return the special
// global namespace id. This can be overridden, but no one has or we
// would have not gotten here.
//
if (!*prefixToMap)
return fEmptyNamespaceId;
// Oh well, don't have a clue so return the unknown id
unknown = true;
return fUnknownNamespaceId;
}
// ---------------------------------------------------------------------------
// WFElemStack: Miscellaneous methods
// ---------------------------------------------------------------------------
void WFElemStack::reset( const unsigned int emptyId
, const unsigned int unknownId
, const unsigned int xmlId
, const unsigned int xmlNSId)
{
// Reset the stack top to clear the stack
fStackTop = 0;
// if first time, put in the standard prefixes
if (fXMLPoolId == 0) {
fGlobalPoolId = fPrefixPool.addOrFind(XMLUni::fgZeroLenString);
fXMLPoolId = fPrefixPool.addOrFind(XMLUni::fgXMLString);
fXMLNSPoolId = fPrefixPool.addOrFind(XMLUni::fgXMLNSString);
}
// And store the new special URI ids
fEmptyNamespaceId = emptyId;
fUnknownNamespaceId = unknownId;
fXMLNamespaceId = xmlId;
fXMLNSNamespaceId = xmlNSId;
}
// ---------------------------------------------------------------------------
// WFElemStack: Private helpers
// ---------------------------------------------------------------------------
void WFElemStack::expandMap()
{
//
// Expand the capacity by 25%, or initialize it to 16 if its currently
// empty. Then allocate a new temp buffer.
//
const XMLSize_t newCapacity = fMapCapacity ?
(XMLSize_t)(fMapCapacity * 1.25) : 16;
PrefMapElem* newMap = (PrefMapElem*) fMemoryManager->allocate
(
newCapacity * sizeof(PrefMapElem)
);//new PrefMapElem[newCapacity];
//
// Copy over the old stuff. We DON'T have to zero out the new stuff
// since this is a by value map and the current map index controls what
// is relevant.
//
if (fMapCapacity) {
memcpy(newMap, fMap, fMapCapacity * sizeof(PrefMapElem));
fMemoryManager->deallocate(fMap);//delete [] fMap;
}
fMap = newMap;
fMapCapacity = newCapacity;
}
void WFElemStack::expandStack()
{
// Expand the capacity by 25% and allocate a new buffer
const XMLSize_t newCapacity = (XMLSize_t)(fStackCapacity * 1.25);
StackElem** newStack = (StackElem**) fMemoryManager->allocate
(
newCapacity * sizeof(StackElem*)
);//new StackElem*[newCapacity];
// Copy over the old stuff
memcpy(newStack, fStack, fStackCapacity * sizeof(StackElem*));
//
// And zero out the new stuff. Though we use a stack top, we reuse old
// stack contents so we need to know if elements have been initially
// allocated or not as we push new stuff onto the stack.
//
memset
(
&newStack[fStackCapacity]
, 0
, (newCapacity - fStackCapacity) * sizeof(StackElem*)
);
// Delete the old array and update our members
fMemoryManager->deallocate(fStack);//delete [] fStack;
fStack = newStack;
fStackCapacity = newCapacity;
}
XERCES_CPP_NAMESPACE_END
+592
View File
@@ -0,0 +1,592 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* $Id: ElemStack.hpp 830538 2009-10-28 13:41:11Z amassari $
*/
#if !defined(XERCESC_INCLUDE_GUARD_ELEMSTACK_HPP)
#define XERCESC_INCLUDE_GUARD_ELEMSTACK_HPP
#include <xercesc/util/StringPool.hpp>
#include <xercesc/util/QName.hpp>
#include <xercesc/util/ValueVectorOf.hpp>
XERCES_CPP_NAMESPACE_BEGIN
class XMLElementDecl;
class Grammar;
struct PrefMapElem : public XMemory
{
unsigned int fPrefId;
unsigned int fURIId;
};
//
// During the scan of content, we have to keep up with the nesting of
// elements (for validation and wellformedness purposes) and we have to
// have places to remember namespace (prefix to URI) mappings.
//
// We only have to keep a stack of the current path down through the tree
// that we are currently scanning, and keep track of any children of any
// elements along that path.
//
// So, this data structure is a stack, which represents the current path
// through the tree that we've worked our way down to. For each node in
// the stack, there is an array of element ids that represent the ids of
// the child elements scanned so far. Upon exit from that element, its
// array of child elements is validated.
//
// Since we have the actual XMLElementDecl in the stack nodes, when its time
// to validate, we just extract the content model from that element decl
// and validate. All the required data falls easily to hand. Note that we
// actually have some derivative of XMLElementDecl, which is specific to
// the validator used, but the abstract API is sufficient for the needs of
// the scanner.
//
// Since the namespace support also requires the storage of information on
// a nested element basis, this structure also holds the namespace info. For
// each level, the prefixes defined at that level (and the namespaces that
// they map to) are stored.
//
class XMLPARSER_EXPORT ElemStack : public XMemory
{
public :
// -----------------------------------------------------------------------
// Class specific data types
//
// These really should be private, but some of the compilers we have to
// support are too dumb to deal with that.
//
// PrefMapElem
// fURIId is the id of the URI from the validator's URI map. The
// fPrefId is the id of the prefix from our own prefix pool. The
// namespace stack consists of these elements.
//
// StackElem
// fThisElement is the basic element decl for the current element.
// The fRowCapacity is how large fChildIds has grown so far.
// fChildCount is how many of them are valid right now.
//
// The fMapCapacity is how large fMap has grown so far. fMapCount
// is how many of them are valid right now.
//
// Note that we store the reader number we were in when we found the
// start tag. We'll use this at the end tag to test for unbalanced
// markup in entities.
//
// MapModes
// When a prefix is mapped to a namespace id, it matters whether the
// QName being mapped is an attribute or name. Attributes are not
// affected by an sibling xmlns attributes, whereas elements are
// affected by its own xmlns attributes.
// -----------------------------------------------------------------------
struct StackElem : public XMemory
{
XMLElementDecl* fThisElement;
XMLSize_t fReaderNum;
XMLSize_t fChildCapacity;
XMLSize_t fChildCount;
QName** fChildren;
PrefMapElem* fMap;
XMLSize_t fMapCapacity;
XMLSize_t fMapCount;
bool fValidationFlag;
bool fCommentOrPISeen;
bool fReferenceEscaped;
unsigned int fCurrentScope;
Grammar* fCurrentGrammar;
unsigned int fCurrentURI;
XMLCh * fSchemaElemName;
XMLSize_t fSchemaElemNameMaxLen;
int fPrefixColonPos;
};
enum MapModes
{
Mode_Attribute
, Mode_Element
};
// -----------------------------------------------------------------------
// Constructors and Destructor
// -----------------------------------------------------------------------
ElemStack(MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager);
~ElemStack();
// -----------------------------------------------------------------------
// Stack access
// -----------------------------------------------------------------------
XMLSize_t addLevel();
XMLSize_t addLevel(XMLElementDecl* const toSet, const XMLSize_t readerNum);
const StackElem* popTop();
// -----------------------------------------------------------------------
// Stack top access
// -----------------------------------------------------------------------
XMLSize_t addChild(QName* const child, const bool toParent);
const StackElem* topElement() const;
void setElement(XMLElementDecl* const toSet, const XMLSize_t readerNum);
void setValidationFlag(bool validationFlag);
bool getValidationFlag();
inline void setCommentOrPISeen();
inline bool getCommentOrPISeen() const;
inline void setReferenceEscaped();
inline bool getReferenceEscaped() const;
void setCurrentScope(int currentScope);
int getCurrentScope();
void setCurrentGrammar(Grammar* currentGrammar);
Grammar* getCurrentGrammar();
void setCurrentURI(unsigned int uri);
unsigned int getCurrentURI();
inline void setCurrentSchemaElemName(const XMLCh * const schemaElemName);
inline XMLCh *getCurrentSchemaElemName();
void setPrefixColonPos(int colonPos);
int getPrefixColonPos() const;
// -----------------------------------------------------------------------
// Prefix map methods
// -----------------------------------------------------------------------
void addGlobalPrefix
(
const XMLCh* const prefixToAdd
, const unsigned int uriId
);
void addPrefix
(
const XMLCh* const prefixToAdd
, const unsigned int uriId
);
unsigned int mapPrefixToURI
(
const XMLCh* const prefixToMap
, bool& unknown
) const;
ValueVectorOf<PrefMapElem*>* getNamespaceMap() const;
unsigned int getPrefixId(const XMLCh* const prefix) const;
const XMLCh* getPrefixForId(unsigned int prefId) const;
// -----------------------------------------------------------------------
// Miscellaneous methods
// -----------------------------------------------------------------------
bool isEmpty() const;
void reset
(
const unsigned int emptyId
, const unsigned int unknownId
, const unsigned int xmlId
, const unsigned int xmlNSId
);
unsigned int getEmptyNamespaceId();
private :
// -----------------------------------------------------------------------
// Unimplemented constructors and operators
// -----------------------------------------------------------------------
ElemStack(const ElemStack&);
ElemStack& operator=(const ElemStack&);
// -----------------------------------------------------------------------
// Private helper methods
// -----------------------------------------------------------------------
void expandMap(StackElem* const toExpand);
void expandStack();
// -----------------------------------------------------------------------
// Data members
//
// fEmptyNamespaceId
// This is the special URI id for the "" namespace, which is magic
// because of the xmlns="" operation.
//
// fGlobalPoolId
// This is a special URI id that is returned when the namespace
// prefix is "" and no one has explicitly mapped that prefix to an
// explicit URI (or when they explicitly clear any such mapping,
// which they can also do.) And also its prefix pool id, which is
// stored here for fast access.
//
// fPrefixPool
// This is the prefix pool where prefixes are hashed and given unique
// ids. These ids are used to track prefixes in the element stack.
//
// fGlobalNamespaces
// This object contains the namespace bindings that are globally valid
//
// fStack
// fStackCapacity
// fStackTop
// This the stack array. Its an array of pointers to StackElem
// structures. The capacity is the current high water mark of the
// stack. The top is the current top of stack (i.e. the part of it
// being used.)
//
// fUnknownNamespaceId
// This is the URI id for the special URI that is assigned to any
// prefix which has not been mapped. This lets us keep going after
// issuing the error.
//
// fXMLNamespaceId
// fXMLPoolId
// fXMLNSNamespaceId
// fXMLNSPoolId
// These are the URI ids for the special URIs that are assigned to
// the 'xml' and 'xmlns' namespaces. And also its prefix pool id,
// which is stored here for fast access.
// -----------------------------------------------------------------------
unsigned int fEmptyNamespaceId;
unsigned int fGlobalPoolId;
XMLStringPool fPrefixPool;
StackElem* fGlobalNamespaces;
StackElem** fStack;
XMLSize_t fStackCapacity;
XMLSize_t fStackTop;
unsigned int fUnknownNamespaceId;
unsigned int fXMLNamespaceId;
unsigned int fXMLPoolId;
unsigned int fXMLNSNamespaceId;
unsigned int fXMLNSPoolId;
ValueVectorOf<PrefMapElem*>* fNamespaceMap;
MemoryManager* fMemoryManager;
};
class XMLPARSER_EXPORT WFElemStack : public XMemory
{
public :
// -----------------------------------------------------------------------
// Class specific data types
//
// These really should be private, but some of the compilers we have to
// support are too dumb to deal with that.
//
// PrefMapElem
// fURIId is the id of the URI from the validator's URI map. The
// fPrefId is the id of the prefix from our own prefix pool. The
// namespace stack consists of these elements.
//
// StackElem
// fThisElement is the basic element decl for the current element.
// The fRowCapacity is how large fChildIds has grown so far.
// fChildCount is how many of them are valid right now.
//
// The fMapCapacity is how large fMap has grown so far. fMapCount
// is how many of them are valid right now.
//
// Note that we store the reader number we were in when we found the
// start tag. We'll use this at the end tag to test for unbalanced
// markup in entities.
//
// MapModes
// When a prefix is mapped to a namespace id, it matters whether the
// QName being mapped is an attribute or name. Attributes are not
// affected by an sibling xmlns attributes, whereas elements are
// affected by its own xmlns attributes.
// -----------------------------------------------------------------------
struct StackElem : public XMemory
{
int fTopPrefix;
unsigned int fCurrentURI;
unsigned int fReaderNum;
unsigned int fElemMaxLength;
XMLCh* fThisElement;
};
enum MapModes
{
Mode_Attribute
, Mode_Element
};
// -----------------------------------------------------------------------
// Constructors and Destructor
// -----------------------------------------------------------------------
WFElemStack(MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager);
~WFElemStack();
// -----------------------------------------------------------------------
// Stack access
// -----------------------------------------------------------------------
XMLSize_t addLevel();
XMLSize_t addLevel(const XMLCh* const toSet, const unsigned int toSetLen,
const unsigned int readerNum);
const StackElem* popTop();
// -----------------------------------------------------------------------
// Stack top access
// -----------------------------------------------------------------------
const StackElem* topElement() const;
void setElement(const XMLCh* const toSet, const unsigned int toSetLen,
const unsigned int readerNum);
void setCurrentURI(unsigned int uri);
unsigned int getCurrentURI();
// -----------------------------------------------------------------------
// Prefix map methods
// -----------------------------------------------------------------------
void addPrefix
(
const XMLCh* const prefixToAdd
, const unsigned int uriId
);
unsigned int mapPrefixToURI
(
const XMLCh* const prefixToMap
, bool& unknown
) const;
// -----------------------------------------------------------------------
// Miscellaneous methods
// -----------------------------------------------------------------------
bool isEmpty() const;
void reset
(
const unsigned int emptyId
, const unsigned int unknownId
, const unsigned int xmlId
, const unsigned int xmlNSId
);
private :
// -----------------------------------------------------------------------
// Unimplemented constructors and operators
// -----------------------------------------------------------------------
WFElemStack(const WFElemStack&);
WFElemStack& operator=(const WFElemStack&);
// -----------------------------------------------------------------------
// Private helper methods
// -----------------------------------------------------------------------
void expandMap();
void expandStack();
// -----------------------------------------------------------------------
// Data members
//
// fEmptyNamespaceId
// This is the special URI id for the "" namespace, which is magic
// because of the xmlns="" operation.
//
// fGlobalPoolId
// This is a special URI id that is returned when the namespace
// prefix is "" and no one has explicitly mapped that prefix to an
// explicit URI (or when they explicitly clear any such mapping,
// which they can also do.) And also its prefix pool id, which is
// stored here for fast access.
//
// fPrefixPool
// This is the prefix pool where prefixes are hashed and given unique
// ids. These ids are used to track prefixes in the element stack.
//
// fStack
// fStackCapacity
// fStackTop
// This the stack array. Its an array of pointers to StackElem
// structures. The capacity is the current high water mark of the
// stack. The top is the current top of stack (i.e. the part of it
// being used.)
//
// fUnknownNamespaceId
// This is the URI id for the special URI that is assigned to any
// prefix which has not been mapped. This lets us keep going after
// issuing the error.
//
// fXMLNamespaceId
// fXMLPoolId
// fXMLNSNamespaceId
// fXMLNSPoolId
// These are the URI ids for the special URIs that are assigned to
// the 'xml' and 'xmlns' namespaces. And also its prefix pool id,
// which is stored here for fast access.
// -----------------------------------------------------------------------
unsigned int fEmptyNamespaceId;
unsigned int fGlobalPoolId;
XMLSize_t fStackCapacity;
XMLSize_t fStackTop;
unsigned int fUnknownNamespaceId;
unsigned int fXMLNamespaceId;
unsigned int fXMLPoolId;
unsigned int fXMLNSNamespaceId;
unsigned int fXMLNSPoolId;
XMLSize_t fMapCapacity;
PrefMapElem* fMap;
StackElem** fStack;
XMLStringPool fPrefixPool;
MemoryManager* fMemoryManager;
};
// ---------------------------------------------------------------------------
// ElemStack: Miscellaneous methods
// ---------------------------------------------------------------------------
inline bool ElemStack::isEmpty() const
{
return (fStackTop == 0);
}
inline bool ElemStack::getValidationFlag()
{
return fStack[fStackTop-1]->fValidationFlag;
}
inline void ElemStack::setValidationFlag(bool validationFlag)
{
fStack[fStackTop-1]->fValidationFlag = validationFlag;
}
inline bool ElemStack::getCommentOrPISeen() const
{
return fStack[fStackTop-1]->fCommentOrPISeen;
}
inline void ElemStack::setCommentOrPISeen()
{
fStack[fStackTop-1]->fCommentOrPISeen = true;
}
inline bool ElemStack::getReferenceEscaped() const
{
return fStack[fStackTop-1]->fReferenceEscaped;
}
inline void ElemStack::setReferenceEscaped()
{
fStack[fStackTop-1]->fReferenceEscaped = true;
}
inline void ElemStack::setCurrentSchemaElemName(const XMLCh * const schemaElemName)
{
XMLSize_t schemaElemNameLen = XMLString::stringLen(schemaElemName);
XMLSize_t stackPos = fStackTop-1;
if(fStack[stackPos]->fSchemaElemNameMaxLen <= schemaElemNameLen)
{
XMLCh *tempStr = fStack[stackPos]->fSchemaElemName;
fStack[stackPos]->fSchemaElemNameMaxLen = schemaElemNameLen << 1;
fStack[stackPos]->fSchemaElemName = (XMLCh *)fMemoryManager->allocate((fStack[stackPos]->fSchemaElemNameMaxLen)*sizeof(XMLCh));
fMemoryManager->deallocate(tempStr);
}
XMLString::copyString(fStack[stackPos]->fSchemaElemName, schemaElemName);
}
inline XMLCh *ElemStack::getCurrentSchemaElemName()
{
return fStack[fStackTop-1]->fSchemaElemName;
}
inline int ElemStack::getCurrentScope()
{
return fStack[fStackTop-1]->fCurrentScope;
}
inline void ElemStack::setCurrentScope(int currentScope)
{
fStack[fStackTop-1]->fCurrentScope = currentScope;
}
inline Grammar* ElemStack::getCurrentGrammar()
{
return fStack[fStackTop-1]->fCurrentGrammar;
}
inline void ElemStack::setCurrentGrammar(Grammar* currentGrammar)
{
fStack[fStackTop-1]->fCurrentGrammar = currentGrammar;
}
inline unsigned int ElemStack::getCurrentURI()
{
return fStack[fStackTop-1]->fCurrentURI;
}
inline void ElemStack::setCurrentURI(unsigned int uri)
{
fStack[fStackTop-1]->fCurrentURI = uri;
}
inline unsigned int ElemStack::getPrefixId(const XMLCh* const prefix) const
{
return fPrefixPool.getId(prefix);
}
inline const XMLCh* ElemStack::getPrefixForId(unsigned int prefId) const
{
return fPrefixPool.getValueForId(prefId);
}
inline void ElemStack::setPrefixColonPos(int colonPos)
{
fStack[fStackTop-1]->fPrefixColonPos = colonPos;
}
inline int ElemStack::getPrefixColonPos() const {
return fStack[fStackTop-1]->fPrefixColonPos;
}
inline unsigned int ElemStack::getEmptyNamespaceId() {
return fEmptyNamespaceId;
}
// ---------------------------------------------------------------------------
// WFElemStack: Miscellaneous methods
// ---------------------------------------------------------------------------
inline bool WFElemStack::isEmpty() const
{
return (fStackTop == 0);
}
inline unsigned int WFElemStack::getCurrentURI()
{
return fStack[fStackTop-1]->fCurrentURI;
}
inline void WFElemStack::setCurrentURI(unsigned int uri)
{
fStack[fStackTop-1]->fCurrentURI = uri;
}
XERCES_CPP_NAMESPACE_END
#endif
@@ -0,0 +1,116 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* $Id: EndOfEntityException.hpp 676911 2008-07-15 13:27:32Z amassari $
*/
#if !defined(XERCESC_INCLUDE_GUARD_ENDOFENTITYEXCEPTION_HPP)
#define XERCESC_INCLUDE_GUARD_ENDOFENTITYEXCEPTION_HPP
#include <xercesc/util/XercesDefs.hpp>
XERCES_CPP_NAMESPACE_BEGIN
class XMLEntityDecl;
//
// This class is only used internally. Its thrown by the ReaderMgr class,
// when an entity ends, and is caught in the scanner. This tells the scanner
// that an entity has ended, and allows it to do the right thing according
// to what was going on when the entity ended.
//
// Since its internal, it does not bother implementing XMLException.
//
class XMLPARSER_EXPORT EndOfEntityException
{
public:
// -----------------------------------------------------------------------
// Constructors and Destructor
// -----------------------------------------------------------------------
EndOfEntityException( XMLEntityDecl* entityThatEnded
, const XMLSize_t readerNum) :
fEntity(entityThatEnded)
, fReaderNum(readerNum)
{
}
EndOfEntityException(const EndOfEntityException& toCopy) :
fEntity(toCopy.fEntity)
, fReaderNum(toCopy.fReaderNum)
{
}
~EndOfEntityException()
{
}
// -----------------------------------------------------------------------
// Getter methods
// -----------------------------------------------------------------------
XMLEntityDecl& getEntity();
const XMLEntityDecl& getEntity() const;
XMLSize_t getReaderNum() const;
private :
// -----------------------------------------------------------------------
// Unimplemented constructors and operators
// -----------------------------------------------------------------------
EndOfEntityException& operator = (const EndOfEntityException&);
// -----------------------------------------------------------------------
// Private data members
//
// fEntity
// This is a reference to the entity that ended, causing this
// exception.
//
// fReaderNum
// The unique reader number of the reader that was handling this
// entity. This is used to know whether a particular entity has
// ended.
// -----------------------------------------------------------------------
XMLEntityDecl* fEntity;
XMLSize_t fReaderNum;
};
// ---------------------------------------------------------------------------
// EndOfEntityException: Getter methods
// ---------------------------------------------------------------------------
inline XMLEntityDecl& EndOfEntityException::getEntity()
{
return *fEntity;
}
inline const XMLEntityDecl& EndOfEntityException::getEntity() const
{
return *fEntity;
}
inline XMLSize_t EndOfEntityException::getReaderNum() const
{
return fReaderNum;
}
XERCES_CPP_NAMESPACE_END
#endif
+834
View File
@@ -0,0 +1,834 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* $Id: IANAEncodings.hpp 527149 2007-04-10 14:56:39Z amassari $
*/
#if !defined(XERCESC_INCLUDE_GUARD_IANAENCODINGS_HPP)
#define XERCESC_INCLUDE_GUARD_IANAENCODINGS_HPP
#include <xercesc/util/XercesDefs.hpp>
XERCES_CPP_NAMESPACE_BEGIN
// ----------------------------------------------------------------
// This file was generated from the IANA charset source.
// so do not edit this file directly!!
// ----------------------------------------------------------------
const XMLCh gEncodingArray[][46] =
{
{ 0x0041,0x004E,0x0053,0x0049,0x005F,0x0058,0x0033,0x002E,0x0034,0x002D,0x0031,0x0039,0x0036,0x0038,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0036,0x00 }
, { 0x0041,0x004E,0x0053,0x0049,0x005F,0x0058,0x0033,0x002E,0x0034,0x002D,0x0031,0x0039,0x0038,0x0036,0x00 }
, { 0x0049,0x0053,0x004F,0x005F,0x0036,0x0034,0x0036,0x002E,0x0069,0x0072,0x0076,0x003A,0x0031,0x0039,0x0039,0x0031,0x00 }
, { 0x0041,0x0053,0x0043,0x0049,0x0049,0x00 }
, { 0x0049,0x0053,0x004F,0x0036,0x0034,0x0036,0x002D,0x0055,0x0053,0x00 }
, { 0x0055,0x0053,0x002D,0x0041,0x0053,0x0043,0x0049,0x0049,0x00 }
, { 0x0075,0x0073,0x00 }
, { 0x0049,0x0042,0x004D,0x0033,0x0036,0x0037,0x00 }
, { 0x0063,0x0070,0x0033,0x0036,0x0037,0x00 }
, { 0x0063,0x0073,0x0041,0x0053,0x0043,0x0049,0x0049,0x00 }
, { 0x0049,0x0053,0x004F,0x002D,0x0031,0x0030,0x0036,0x0034,0x0036,0x002D,0x0055,0x0054,0x0046,0x002D,0x0031,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0031,0x0030,0x0036,0x0034,0x0036,0x0055,0x0054,0x0046,0x0031,0x00 }
, { 0x0049,0x0053,0x004F,0x005F,0x0036,0x0034,0x0036,0x002E,0x0062,0x0061,0x0073,0x0069,0x0063,0x003A,0x0031,0x0039,0x0038,0x0033,0x00 }
, { 0x0072,0x0065,0x0066,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0036,0x0034,0x0036,0x0062,0x0061,0x0073,0x0069,0x0063,0x0031,0x0039,0x0038,0x0033,0x00 }
, { 0x0049,0x004E,0x0056,0x0041,0x0052,0x0049,0x0041,0x004E,0x0054,0x00 }
, { 0x0063,0x0073,0x0049,0x004E,0x0056,0x0041,0x0052,0x0049,0x0041,0x004E,0x0054,0x00 }
, { 0x0049,0x0053,0x004F,0x005F,0x0036,0x0034,0x0036,0x002E,0x0069,0x0072,0x0076,0x003A,0x0031,0x0039,0x0038,0x0033,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0032,0x00 }
, { 0x0069,0x0072,0x0076,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0032,0x0049,0x006E,0x0074,0x006C,0x0052,0x0065,0x0066,0x0056,0x0065,0x0072,0x0073,0x0069,0x006F,0x006E,0x00 }
, { 0x0042,0x0053,0x005F,0x0034,0x0037,0x0033,0x0030,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0034,0x00 }
, { 0x0049,0x0053,0x004F,0x0036,0x0034,0x0036,0x002D,0x0047,0x0042,0x00 }
, { 0x0067,0x0062,0x00 }
, { 0x0075,0x006B,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0034,0x0055,0x006E,0x0069,0x0074,0x0065,0x0064,0x004B,0x0069,0x006E,0x0067,0x0064,0x006F,0x006D,0x00 }
, { 0x004E,0x0041,0x0054,0x0053,0x002D,0x0053,0x0045,0x0046,0x0049,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0038,0x002D,0x0031,0x00 }
, { 0x0063,0x0073,0x004E,0x0041,0x0054,0x0053,0x0053,0x0045,0x0046,0x0049,0x00 }
, { 0x004E,0x0041,0x0054,0x0053,0x002D,0x0053,0x0045,0x0046,0x0049,0x002D,0x0041,0x0044,0x0044,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0038,0x002D,0x0032,0x00 }
, { 0x0063,0x0073,0x004E,0x0041,0x0054,0x0053,0x0053,0x0045,0x0046,0x0049,0x0041,0x0044,0x0044,0x00 }
, { 0x004E,0x0041,0x0054,0x0053,0x002D,0x0044,0x0041,0x004E,0x004F,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0039,0x002D,0x0031,0x00 }
, { 0x0063,0x0073,0x004E,0x0041,0x0054,0x0053,0x0044,0x0041,0x004E,0x004F,0x00 }
, { 0x004E,0x0041,0x0054,0x0053,0x002D,0x0044,0x0041,0x004E,0x004F,0x002D,0x0041,0x0044,0x0044,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0039,0x002D,0x0032,0x00 }
, { 0x0063,0x0073,0x004E,0x0041,0x0054,0x0053,0x0044,0x0041,0x004E,0x004F,0x0041,0x0044,0x0044,0x00 }
, { 0x0053,0x0045,0x004E,0x005F,0x0038,0x0035,0x0030,0x0032,0x0030,0x0030,0x005F,0x0042,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0031,0x0030,0x00 }
, { 0x0046,0x0049,0x00 }
, { 0x0049,0x0053,0x004F,0x0036,0x0034,0x0036,0x002D,0x0046,0x0049,0x00 }
, { 0x0049,0x0053,0x004F,0x0036,0x0034,0x0036,0x002D,0x0053,0x0045,0x00 }
, { 0x0073,0x0065,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0031,0x0030,0x0053,0x0077,0x0065,0x0064,0x0069,0x0073,0x0068,0x00 }
, { 0x0053,0x0045,0x004E,0x005F,0x0038,0x0035,0x0030,0x0032,0x0030,0x0030,0x005F,0x0043,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0031,0x0031,0x00 }
, { 0x0049,0x0053,0x004F,0x0036,0x0034,0x0036,0x002D,0x0053,0x0045,0x0032,0x00 }
, { 0x0073,0x0065,0x0032,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0031,0x0031,0x0053,0x0077,0x0065,0x0064,0x0069,0x0073,0x0068,0x0046,0x006F,0x0072,0x004E,0x0061,0x006D,0x0065,0x0073,0x00 }
, { 0x004B,0x0053,0x005F,0x0043,0x005F,0x0035,0x0036,0x0030,0x0031,0x002D,0x0031,0x0039,0x0038,0x0037,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0031,0x0034,0x0039,0x00 }
, { 0x004B,0x0053,0x005F,0x0043,0x005F,0x0035,0x0036,0x0030,0x0031,0x002D,0x0031,0x0039,0x0038,0x0039,0x00 }
, { 0x004B,0x0053,0x0043,0x005F,0x0035,0x0036,0x0030,0x0031,0x00 }
, { 0x006B,0x006F,0x0072,0x0065,0x0061,0x006E,0x00 }
, { 0x0063,0x0073,0x004B,0x0053,0x0043,0x0035,0x0036,0x0030,0x0031,0x0031,0x0039,0x0038,0x0037,0x00 }
, { 0x0049,0x0053,0x004F,0x002D,0x0032,0x0030,0x0032,0x0032,0x002D,0x004B,0x0052,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0032,0x0030,0x0032,0x0032,0x004B,0x0052,0x00 }
, { 0x0045,0x0055,0x0043,0x002D,0x004B,0x0052,0x00 }
, { 0x0063,0x0073,0x0045,0x0055,0x0043,0x004B,0x0052,0x00 }
, { 0x0049,0x0053,0x004F,0x002D,0x0032,0x0030,0x0032,0x0032,0x002D,0x004A,0x0050,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0032,0x0030,0x0032,0x0032,0x004A,0x0050,0x00 }
, { 0x0049,0x0053,0x004F,0x002D,0x0032,0x0030,0x0032,0x0032,0x002D,0x004A,0x0050,0x002D,0x0032,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0032,0x0030,0x0032,0x0032,0x004A,0x0050,0x0032,0x00 }
, { 0x0049,0x0053,0x004F,0x002D,0x0032,0x0030,0x0032,0x0032,0x002D,0x0043,0x004E,0x00 }
, { 0x0049,0x0053,0x004F,0x002D,0x0032,0x0030,0x0032,0x0032,0x002D,0x0043,0x004E,0x002D,0x0045,0x0058,0x0054,0x00 }
, { 0x004A,0x0049,0x0053,0x005F,0x0043,0x0036,0x0032,0x0032,0x0030,0x002D,0x0031,0x0039,0x0036,0x0039,0x002D,0x006A,0x0070,0x00 }
, { 0x004A,0x0049,0x0053,0x005F,0x0043,0x0036,0x0032,0x0032,0x0030,0x002D,0x0031,0x0039,0x0036,0x0039,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0031,0x0033,0x00 }
, { 0x006B,0x0061,0x0074,0x0061,0x006B,0x0061,0x006E,0x0061,0x00 }
, { 0x0078,0x0030,0x0032,0x0030,0x0031,0x002D,0x0037,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0031,0x0033,0x004A,0x0049,0x0053,0x0043,0x0036,0x0032,0x0032,0x0030,0x006A,0x0070,0x00 }
, { 0x004A,0x0049,0x0053,0x005F,0x0043,0x0036,0x0032,0x0032,0x0030,0x002D,0x0031,0x0039,0x0036,0x0039,0x002D,0x0072,0x006F,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0031,0x0034,0x00 }
, { 0x006A,0x0070,0x00 }
, { 0x0049,0x0053,0x004F,0x0036,0x0034,0x0036,0x002D,0x004A,0x0050,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0031,0x0034,0x004A,0x0049,0x0053,0x0043,0x0036,0x0032,0x0032,0x0030,0x0072,0x006F,0x00 }
, { 0x0049,0x0054,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0031,0x0035,0x00 }
, { 0x0049,0x0053,0x004F,0x0036,0x0034,0x0036,0x002D,0x0049,0x0054,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0031,0x0035,0x0049,0x0074,0x0061,0x006C,0x0069,0x0061,0x006E,0x00 }
, { 0x0050,0x0054,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0031,0x0036,0x00 }
, { 0x0049,0x0053,0x004F,0x0036,0x0034,0x0036,0x002D,0x0050,0x0054,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0031,0x0036,0x0050,0x006F,0x0072,0x0074,0x0075,0x0067,0x0075,0x0065,0x0073,0x0065,0x00 }
, { 0x0045,0x0053,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0031,0x0037,0x00 }
, { 0x0049,0x0053,0x004F,0x0036,0x0034,0x0036,0x002D,0x0045,0x0053,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0031,0x0037,0x0053,0x0070,0x0061,0x006E,0x0069,0x0073,0x0068,0x00 }
, { 0x0067,0x0072,0x0065,0x0065,0x006B,0x0037,0x002D,0x006F,0x006C,0x0064,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0031,0x0038,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0031,0x0038,0x0047,0x0072,0x0065,0x0065,0x006B,0x0037,0x004F,0x006C,0x0064,0x00 }
, { 0x006C,0x0061,0x0074,0x0069,0x006E,0x002D,0x0067,0x0072,0x0065,0x0065,0x006B,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0031,0x0039,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0031,0x0039,0x004C,0x0061,0x0074,0x0069,0x006E,0x0047,0x0072,0x0065,0x0065,0x006B,0x00 }
, { 0x0044,0x0049,0x004E,0x005F,0x0036,0x0036,0x0030,0x0030,0x0033,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0032,0x0031,0x00 }
, { 0x0064,0x0065,0x00 }
, { 0x0049,0x0053,0x004F,0x0036,0x0034,0x0036,0x002D,0x0044,0x0045,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0032,0x0031,0x0047,0x0065,0x0072,0x006D,0x0061,0x006E,0x00 }
, { 0x004E,0x0046,0x005F,0x005A,0x005F,0x0036,0x0032,0x002D,0x0030,0x0031,0x0030,0x005F,0x0028,0x0031,0x0039,0x0037,0x0033,0x0029,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0032,0x0035,0x00 }
, { 0x0049,0x0053,0x004F,0x0036,0x0034,0x0036,0x002D,0x0046,0x0052,0x0031,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0032,0x0035,0x0046,0x0072,0x0065,0x006E,0x0063,0x0068,0x00 }
, { 0x004C,0x0061,0x0074,0x0069,0x006E,0x002D,0x0067,0x0072,0x0065,0x0065,0x006B,0x002D,0x0031,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0032,0x0037,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0032,0x0037,0x004C,0x0061,0x0074,0x0069,0x006E,0x0047,0x0072,0x0065,0x0065,0x006B,0x0031,0x00 }
, { 0x0049,0x0053,0x004F,0x005F,0x0035,0x0034,0x0032,0x0037,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0033,0x0037,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0035,0x0034,0x0032,0x0037,0x0043,0x0079,0x0072,0x0069,0x006C,0x006C,0x0069,0x0063,0x00 }
, { 0x004A,0x0049,0x0053,0x005F,0x0043,0x0036,0x0032,0x0032,0x0036,0x002D,0x0031,0x0039,0x0037,0x0038,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0034,0x0032,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0034,0x0032,0x004A,0x0049,0x0053,0x0043,0x0036,0x0032,0x0032,0x0036,0x0031,0x0039,0x0037,0x0038,0x00 }
, { 0x0042,0x0053,0x005F,0x0076,0x0069,0x0065,0x0077,0x0064,0x0061,0x0074,0x0061,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0034,0x0037,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0034,0x0037,0x0042,0x0053,0x0056,0x0069,0x0065,0x0077,0x0064,0x0061,0x0074,0x0061,0x00 }
, { 0x0049,0x004E,0x0049,0x0053,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0034,0x0039,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0034,0x0039,0x0049,0x004E,0x0049,0x0053,0x00 }
, { 0x0049,0x004E,0x0049,0x0053,0x002D,0x0038,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0035,0x0030,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0035,0x0030,0x0049,0x004E,0x0049,0x0053,0x0038,0x00 }
, { 0x0049,0x004E,0x0049,0x0053,0x002D,0x0063,0x0079,0x0072,0x0069,0x006C,0x006C,0x0069,0x0063,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0035,0x0031,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0035,0x0031,0x0049,0x004E,0x0049,0x0053,0x0043,0x0079,0x0072,0x0069,0x006C,0x006C,0x0069,0x0063,0x00 }
, { 0x0049,0x0053,0x004F,0x005F,0x0035,0x0034,0x0032,0x0037,0x003A,0x0031,0x0039,0x0038,0x0031,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0035,0x0034,0x00 }
, { 0x0049,0x0053,0x004F,0x0035,0x0034,0x0032,0x0037,0x0043,0x0079,0x0072,0x0069,0x006C,0x006C,0x0069,0x0063,0x0031,0x0039,0x0038,0x0031,0x00 }
, { 0x0049,0x0053,0x004F,0x005F,0x0035,0x0034,0x0032,0x0038,0x003A,0x0031,0x0039,0x0038,0x0030,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0035,0x0035,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0035,0x0034,0x0032,0x0038,0x0047,0x0072,0x0065,0x0065,0x006B,0x00 }
, { 0x0047,0x0042,0x005F,0x0031,0x0039,0x0038,0x0038,0x002D,0x0038,0x0030,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0035,0x0037,0x00 }
, { 0x0063,0x006E,0x00 }
, { 0x0049,0x0053,0x004F,0x0036,0x0034,0x0036,0x002D,0x0043,0x004E,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0035,0x0037,0x0047,0x0042,0x0031,0x0039,0x0038,0x0038,0x00 }
, { 0x0047,0x0042,0x005F,0x0032,0x0033,0x0031,0x0032,0x002D,0x0038,0x0030,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0035,0x0038,0x00 }
, { 0x0063,0x0068,0x0069,0x006E,0x0065,0x0073,0x0065,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0035,0x0038,0x0047,0x0042,0x0032,0x0033,0x0031,0x0032,0x0038,0x0030,0x00 }
, { 0x004E,0x0053,0x005F,0x0034,0x0035,0x0035,0x0031,0x002D,0x0031,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0036,0x0030,0x00 }
, { 0x0049,0x0053,0x004F,0x0036,0x0034,0x0036,0x002D,0x004E,0x004F,0x00 }
, { 0x006E,0x006F,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0036,0x0030,0x0044,0x0061,0x006E,0x0069,0x0073,0x0068,0x004E,0x006F,0x0072,0x0077,0x0065,0x0067,0x0069,0x0061,0x006E,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0036,0x0030,0x004E,0x006F,0x0072,0x0077,0x0065,0x0067,0x0069,0x0061,0x006E,0x0031,0x00 }
, { 0x004E,0x0053,0x005F,0x0034,0x0035,0x0035,0x0031,0x002D,0x0032,0x00 }
, { 0x0049,0x0053,0x004F,0x0036,0x0034,0x0036,0x002D,0x004E,0x004F,0x0032,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0036,0x0031,0x00 }
, { 0x006E,0x006F,0x0032,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0036,0x0031,0x004E,0x006F,0x0072,0x0077,0x0065,0x0067,0x0069,0x0061,0x006E,0x0032,0x00 }
, { 0x004E,0x0046,0x005F,0x005A,0x005F,0x0036,0x0032,0x002D,0x0030,0x0031,0x0030,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0036,0x0039,0x00 }
, { 0x0049,0x0053,0x004F,0x0036,0x0034,0x0036,0x002D,0x0046,0x0052,0x00 }
, { 0x0066,0x0072,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0036,0x0039,0x0046,0x0072,0x0065,0x006E,0x0063,0x0068,0x00 }
, { 0x0076,0x0069,0x0064,0x0065,0x006F,0x0074,0x0065,0x0078,0x002D,0x0073,0x0075,0x0070,0x0070,0x006C,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0037,0x0030,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0037,0x0030,0x0056,0x0069,0x0064,0x0065,0x006F,0x0074,0x0065,0x0078,0x0053,0x0075,0x0070,0x0070,0x0031,0x00 }
, { 0x0050,0x0054,0x0032,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0038,0x0034,0x00 }
, { 0x0049,0x0053,0x004F,0x0036,0x0034,0x0036,0x002D,0x0050,0x0054,0x0032,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0038,0x0034,0x0050,0x006F,0x0072,0x0074,0x0075,0x0067,0x0075,0x0065,0x0073,0x0065,0x0032,0x00 }
, { 0x0045,0x0053,0x0032,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0038,0x0035,0x00 }
, { 0x0049,0x0053,0x004F,0x0036,0x0034,0x0036,0x002D,0x0045,0x0053,0x0032,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0038,0x0035,0x0053,0x0070,0x0061,0x006E,0x0069,0x0073,0x0068,0x0032,0x00 }
, { 0x004D,0x0053,0x005A,0x005F,0x0037,0x0037,0x0039,0x0035,0x002E,0x0033,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0038,0x0036,0x00 }
, { 0x0049,0x0053,0x004F,0x0036,0x0034,0x0036,0x002D,0x0048,0x0055,0x00 }
, { 0x0068,0x0075,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0038,0x0036,0x0048,0x0075,0x006E,0x0067,0x0061,0x0072,0x0069,0x0061,0x006E,0x00 }
, { 0x004A,0x0049,0x0053,0x005F,0x0043,0x0036,0x0032,0x0032,0x0036,0x002D,0x0031,0x0039,0x0038,0x0033,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0038,0x0037,0x00 }
, { 0x0078,0x0030,0x0032,0x0030,0x0038,0x00 }
, { 0x004A,0x0049,0x0053,0x005F,0x0058,0x0030,0x0032,0x0030,0x0038,0x002D,0x0031,0x0039,0x0038,0x0033,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0038,0x0037,0x004A,0x0049,0x0053,0x0058,0x0030,0x0032,0x0030,0x0038,0x00 }
, { 0x0067,0x0072,0x0065,0x0065,0x006B,0x0037,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0038,0x0038,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0038,0x0038,0x0047,0x0072,0x0065,0x0065,0x006B,0x0037,0x00 }
, { 0x0041,0x0053,0x004D,0x004F,0x005F,0x0034,0x0034,0x0039,0x00 }
, { 0x0049,0x0053,0x004F,0x005F,0x0039,0x0030,0x0033,0x0036,0x00 }
, { 0x0061,0x0072,0x0061,0x0062,0x0069,0x0063,0x0037,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0038,0x0039,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0038,0x0039,0x0041,0x0053,0x004D,0x004F,0x0034,0x0034,0x0039,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0039,0x0030,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0039,0x0030,0x00 }
, { 0x004A,0x0049,0x0053,0x005F,0x0043,0x0036,0x0032,0x0032,0x0039,0x002D,0x0031,0x0039,0x0038,0x0034,0x002D,0x0061,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0039,0x0031,0x00 }
, { 0x006A,0x0070,0x002D,0x006F,0x0063,0x0072,0x002D,0x0061,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0039,0x0031,0x004A,0x0049,0x0053,0x0043,0x0036,0x0032,0x0032,0x0039,0x0031,0x0039,0x0038,0x0034,0x0061,0x00 }
, { 0x004A,0x0049,0x0053,0x005F,0x0043,0x0036,0x0032,0x0032,0x0039,0x002D,0x0031,0x0039,0x0038,0x0034,0x002D,0x0062,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0039,0x0032,0x00 }
, { 0x0049,0x0053,0x004F,0x0036,0x0034,0x0036,0x002D,0x004A,0x0050,0x002D,0x004F,0x0043,0x0052,0x002D,0x0042,0x00 }
, { 0x006A,0x0070,0x002D,0x006F,0x0063,0x0072,0x002D,0x0062,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0039,0x0032,0x004A,0x0049,0x0053,0x0043,0x0036,0x0032,0x0039,0x0039,0x0031,0x0039,0x0038,0x0034,0x0062,0x00 }
, { 0x004A,0x0049,0x0053,0x005F,0x0043,0x0036,0x0032,0x0032,0x0039,0x002D,0x0031,0x0039,0x0038,0x0034,0x002D,0x0062,0x002D,0x0061,0x0064,0x0064,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0039,0x0033,0x00 }
, { 0x006A,0x0070,0x002D,0x006F,0x0063,0x0072,0x002D,0x0062,0x002D,0x0061,0x0064,0x0064,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0039,0x0033,0x004A,0x0049,0x0053,0x0036,0x0032,0x0032,0x0039,0x0031,0x0039,0x0038,0x0034,0x0062,0x0061,0x0064,0x0064,0x00 }
, { 0x004A,0x0049,0x0053,0x005F,0x0043,0x0036,0x0032,0x0032,0x0039,0x002D,0x0031,0x0039,0x0038,0x0034,0x002D,0x0068,0x0061,0x006E,0x0064,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0039,0x0034,0x00 }
, { 0x006A,0x0070,0x002D,0x006F,0x0063,0x0072,0x002D,0x0068,0x0061,0x006E,0x0064,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0039,0x0034,0x004A,0x0049,0x0053,0x0036,0x0032,0x0032,0x0039,0x0031,0x0039,0x0038,0x0034,0x0068,0x0061,0x006E,0x0064,0x00 }
, { 0x004A,0x0049,0x0053,0x005F,0x0043,0x0036,0x0032,0x0032,0x0039,0x002D,0x0031,0x0039,0x0038,0x0034,0x002D,0x0068,0x0061,0x006E,0x0064,0x002D,0x0061,0x0064,0x0064,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0039,0x0035,0x00 }
, { 0x006A,0x0070,0x002D,0x006F,0x0063,0x0072,0x002D,0x0068,0x0061,0x006E,0x0064,0x002D,0x0061,0x0064,0x0064,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0039,0x0035,0x004A,0x0049,0x0053,0x0036,0x0032,0x0032,0x0039,0x0031,0x0039,0x0038,0x0034,0x0068,0x0061,0x006E,0x0064,0x0061,0x0064,0x0064,0x00 }
, { 0x004A,0x0049,0x0053,0x005F,0x0043,0x0036,0x0032,0x0032,0x0039,0x002D,0x0031,0x0039,0x0038,0x0034,0x002D,0x006B,0x0061,0x006E,0x0061,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0039,0x0036,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0039,0x0036,0x004A,0x0049,0x0053,0x0043,0x0036,0x0032,0x0032,0x0039,0x0031,0x0039,0x0038,0x0034,0x006B,0x0061,0x006E,0x0061,0x00 }
, { 0x0049,0x0053,0x004F,0x005F,0x0032,0x0030,0x0033,0x0033,0x002D,0x0031,0x0039,0x0038,0x0033,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0039,0x0038,0x00 }
, { 0x0065,0x0031,0x0033,0x0062,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0032,0x0030,0x0033,0x0033,0x00 }
, { 0x0041,0x004E,0x0053,0x0049,0x005F,0x0058,0x0033,0x002E,0x0031,0x0031,0x0030,0x002D,0x0031,0x0039,0x0038,0x0033,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0039,0x0039,0x00 }
, { 0x0043,0x0053,0x0041,0x005F,0x0054,0x0035,0x0030,0x0030,0x002D,0x0031,0x0039,0x0038,0x0033,0x00 }
, { 0x004E,0x0041,0x0050,0x004C,0x0050,0x0053,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0039,0x0039,0x004E,0x0041,0x0050,0x004C,0x0050,0x0053,0x00 }
, { 0x0049,0x0053,0x004F,0x005F,0x0038,0x0038,0x0035,0x0039,0x002D,0x0031,0x003A,0x0031,0x0039,0x0038,0x0037,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0031,0x0030,0x0030,0x00 }
, { 0x0049,0x0053,0x004F,0x005F,0x0038,0x0038,0x0035,0x0039,0x002D,0x0031,0x00 }
, { 0x0049,0x0053,0x004F,0x002D,0x0038,0x0038,0x0035,0x0039,0x002D,0x0031,0x00 }
, { 0x006C,0x0061,0x0074,0x0069,0x006E,0x0031,0x00 }
, { 0x006C,0x0031,0x00 }
, { 0x0049,0x0042,0x004D,0x0038,0x0031,0x0039,0x00 }
, { 0x0043,0x0050,0x0038,0x0031,0x0039,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x004C,0x0061,0x0074,0x0069,0x006E,0x0031,0x00 }
, { 0x0049,0x0053,0x004F,0x005F,0x0038,0x0038,0x0035,0x0039,0x002D,0x0032,0x003A,0x0031,0x0039,0x0038,0x0037,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0031,0x0030,0x0031,0x00 }
, { 0x0049,0x0053,0x004F,0x005F,0x0038,0x0038,0x0035,0x0039,0x002D,0x0032,0x00 }
, { 0x0049,0x0053,0x004F,0x002D,0x0038,0x0038,0x0035,0x0039,0x002D,0x0032,0x00 }
, { 0x006C,0x0061,0x0074,0x0069,0x006E,0x0032,0x00 }
, { 0x006C,0x0032,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x004C,0x0061,0x0074,0x0069,0x006E,0x0032,0x00 }
, { 0x0054,0x002E,0x0036,0x0031,0x002D,0x0037,0x0062,0x0069,0x0074,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0031,0x0030,0x0032,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0031,0x0030,0x0032,0x0054,0x0036,0x0031,0x0037,0x0062,0x0069,0x0074,0x00 }
, { 0x0054,0x002E,0x0036,0x0031,0x002D,0x0038,0x0062,0x0069,0x0074,0x00 }
, { 0x0054,0x002E,0x0036,0x0031,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0031,0x0030,0x0033,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0031,0x0030,0x0033,0x0054,0x0036,0x0031,0x0038,0x0062,0x0069,0x0074,0x00 }
, { 0x0049,0x0053,0x004F,0x005F,0x0038,0x0038,0x0035,0x0039,0x002D,0x0033,0x003A,0x0031,0x0039,0x0038,0x0038,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0031,0x0030,0x0039,0x00 }
, { 0x0049,0x0053,0x004F,0x005F,0x0038,0x0038,0x0035,0x0039,0x002D,0x0033,0x00 }
, { 0x0049,0x0053,0x004F,0x002D,0x0038,0x0038,0x0035,0x0039,0x002D,0x0033,0x00 }
, { 0x006C,0x0061,0x0074,0x0069,0x006E,0x0033,0x00 }
, { 0x006C,0x0033,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x004C,0x0061,0x0074,0x0069,0x006E,0x0033,0x00 }
, { 0x0049,0x0053,0x004F,0x005F,0x0038,0x0038,0x0035,0x0039,0x002D,0x0034,0x003A,0x0031,0x0039,0x0038,0x0038,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0031,0x0031,0x0030,0x00 }
, { 0x0049,0x0053,0x004F,0x005F,0x0038,0x0038,0x0035,0x0039,0x002D,0x0034,0x00 }
, { 0x0049,0x0053,0x004F,0x002D,0x0038,0x0038,0x0035,0x0039,0x002D,0x0034,0x00 }
, { 0x006C,0x0061,0x0074,0x0069,0x006E,0x0034,0x00 }
, { 0x006C,0x0034,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x004C,0x0061,0x0074,0x0069,0x006E,0x0034,0x00 }
, { 0x0045,0x0043,0x004D,0x0041,0x002D,0x0063,0x0079,0x0072,0x0069,0x006C,0x006C,0x0069,0x0063,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0031,0x0031,0x0031,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0031,0x0031,0x0031,0x0045,0x0043,0x004D,0x0041,0x0043,0x0079,0x0072,0x0069,0x006C,0x006C,0x0069,0x0063,0x00 }
, { 0x0043,0x0053,0x0041,0x005F,0x005A,0x0032,0x0034,0x0033,0x002E,0x0034,0x002D,0x0031,0x0039,0x0038,0x0035,0x002D,0x0031,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0031,0x0032,0x0031,0x00 }
, { 0x0049,0x0053,0x004F,0x0036,0x0034,0x0036,0x002D,0x0043,0x0041,0x00 }
, { 0x0063,0x0073,0x0061,0x0037,0x002D,0x0031,0x00 }
, { 0x0063,0x0061,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0031,0x0032,0x0031,0x0043,0x0061,0x006E,0x0061,0x0064,0x0069,0x0061,0x006E,0x0031,0x00 }
, { 0x0043,0x0053,0x0041,0x005F,0x005A,0x0032,0x0034,0x0033,0x002E,0x0034,0x002D,0x0031,0x0039,0x0038,0x0035,0x002D,0x0032,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0031,0x0032,0x0032,0x00 }
, { 0x0049,0x0053,0x004F,0x0036,0x0034,0x0036,0x002D,0x0043,0x0041,0x0032,0x00 }
, { 0x0063,0x0073,0x0061,0x0037,0x002D,0x0032,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0031,0x0032,0x0032,0x0043,0x0061,0x006E,0x0061,0x0064,0x0069,0x0061,0x006E,0x0032,0x00 }
, { 0x0043,0x0053,0x0041,0x005F,0x005A,0x0032,0x0034,0x0033,0x002E,0x0034,0x002D,0x0031,0x0039,0x0038,0x0035,0x002D,0x0067,0x0072,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0031,0x0032,0x0033,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0031,0x0032,0x0033,0x0043,0x0053,0x0041,0x005A,0x0032,0x0034,0x0033,0x0034,0x0031,0x0039,0x0038,0x0035,0x0067,0x0072,0x00 }
, { 0x0049,0x0053,0x004F,0x005F,0x0038,0x0038,0x0035,0x0039,0x002D,0x0036,0x003A,0x0031,0x0039,0x0038,0x0037,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0031,0x0032,0x0037,0x00 }
, { 0x0049,0x0053,0x004F,0x005F,0x0038,0x0038,0x0035,0x0039,0x002D,0x0036,0x00 }
, { 0x0049,0x0053,0x004F,0x002D,0x0038,0x0038,0x0035,0x0039,0x002D,0x0036,0x00 }
, { 0x0045,0x0043,0x004D,0x0041,0x002D,0x0031,0x0031,0x0034,0x00 }
, { 0x0041,0x0053,0x004D,0x004F,0x002D,0x0037,0x0030,0x0038,0x00 }
, { 0x0061,0x0072,0x0061,0x0062,0x0069,0x0063,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x004C,0x0061,0x0074,0x0069,0x006E,0x0041,0x0072,0x0061,0x0062,0x0069,0x0063,0x00 }
, { 0x0049,0x0053,0x004F,0x005F,0x0038,0x0038,0x0035,0x0039,0x002D,0x0036,0x002D,0x0045,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0038,0x0038,0x0035,0x0039,0x0036,0x0045,0x00 }
, { 0x0049,0x0053,0x004F,0x002D,0x0038,0x0038,0x0035,0x0039,0x002D,0x0036,0x002D,0x0045,0x00 }
, { 0x0049,0x0053,0x004F,0x005F,0x0038,0x0038,0x0035,0x0039,0x002D,0x0036,0x002D,0x0049,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0038,0x0038,0x0035,0x0039,0x0036,0x0049,0x00 }
, { 0x0049,0x0053,0x004F,0x002D,0x0038,0x0038,0x0035,0x0039,0x002D,0x0036,0x002D,0x0049,0x00 }
, { 0x0049,0x0053,0x004F,0x005F,0x0038,0x0038,0x0035,0x0039,0x002D,0x0037,0x003A,0x0031,0x0039,0x0038,0x0037,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0031,0x0032,0x0036,0x00 }
, { 0x0049,0x0053,0x004F,0x005F,0x0038,0x0038,0x0035,0x0039,0x002D,0x0037,0x00 }
, { 0x0049,0x0053,0x004F,0x002D,0x0038,0x0038,0x0035,0x0039,0x002D,0x0037,0x00 }
, { 0x0045,0x004C,0x004F,0x0054,0x005F,0x0039,0x0032,0x0038,0x00 }
, { 0x0045,0x0043,0x004D,0x0041,0x002D,0x0031,0x0031,0x0038,0x00 }
, { 0x0067,0x0072,0x0065,0x0065,0x006B,0x00 }
, { 0x0067,0x0072,0x0065,0x0065,0x006B,0x0038,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x004C,0x0061,0x0074,0x0069,0x006E,0x0047,0x0072,0x0065,0x0065,0x006B,0x00 }
, { 0x0054,0x002E,0x0031,0x0030,0x0031,0x002D,0x0047,0x0032,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0031,0x0032,0x0038,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0031,0x0032,0x0038,0x0054,0x0031,0x0030,0x0031,0x0047,0x0032,0x00 }
, { 0x0049,0x0053,0x004F,0x005F,0x0038,0x0038,0x0035,0x0039,0x002D,0x0038,0x003A,0x0031,0x0039,0x0038,0x0038,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0031,0x0033,0x0038,0x00 }
, { 0x0049,0x0053,0x004F,0x005F,0x0038,0x0038,0x0035,0x0039,0x002D,0x0038,0x00 }
, { 0x0049,0x0053,0x004F,0x002D,0x0038,0x0038,0x0035,0x0039,0x002D,0x0038,0x00 }
, { 0x0068,0x0065,0x0062,0x0072,0x0065,0x0077,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x004C,0x0061,0x0074,0x0069,0x006E,0x0048,0x0065,0x0062,0x0072,0x0065,0x0077,0x00 }
, { 0x0049,0x0053,0x004F,0x005F,0x0038,0x0038,0x0035,0x0039,0x002D,0x0038,0x002D,0x0045,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0038,0x0038,0x0035,0x0039,0x0038,0x0045,0x00 }
, { 0x0049,0x0053,0x004F,0x002D,0x0038,0x0038,0x0035,0x0039,0x002D,0x0038,0x002D,0x0045,0x00 }
, { 0x0049,0x0053,0x004F,0x005F,0x0038,0x0038,0x0035,0x0039,0x002D,0x0038,0x002D,0x0049,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0038,0x0038,0x0035,0x0039,0x0038,0x0049,0x00 }
, { 0x0049,0x0053,0x004F,0x002D,0x0038,0x0038,0x0035,0x0039,0x002D,0x0038,0x002D,0x0049,0x00 }
, { 0x0043,0x0053,0x004E,0x005F,0x0033,0x0036,0x0039,0x0031,0x0030,0x0033,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0031,0x0033,0x0039,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0031,0x0033,0x0039,0x0043,0x0053,0x004E,0x0033,0x0036,0x0039,0x0031,0x0030,0x0033,0x00 }
, { 0x004A,0x0055,0x0053,0x005F,0x0049,0x002E,0x0042,0x0031,0x002E,0x0030,0x0030,0x0032,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0031,0x0034,0x0031,0x00 }
, { 0x0049,0x0053,0x004F,0x0036,0x0034,0x0036,0x002D,0x0059,0x0055,0x00 }
, { 0x006A,0x0073,0x00 }
, { 0x0079,0x0075,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0031,0x0034,0x0031,0x004A,0x0055,0x0053,0x0049,0x0042,0x0031,0x0030,0x0030,0x0032,0x00 }
, { 0x0049,0x0053,0x004F,0x005F,0x0036,0x0039,0x0033,0x0037,0x002D,0x0032,0x002D,0x0061,0x0064,0x0064,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0031,0x0034,0x0032,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0054,0x0065,0x0078,0x0074,0x0043,0x006F,0x006D,0x006D,0x00 }
, { 0x0049,0x0045,0x0043,0x005F,0x0050,0x0032,0x0037,0x002D,0x0031,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0031,0x0034,0x0033,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0031,0x0034,0x0033,0x0049,0x0045,0x0043,0x0050,0x0032,0x0037,0x0031,0x00 }
, { 0x0049,0x0053,0x004F,0x005F,0x0038,0x0038,0x0035,0x0039,0x002D,0x0035,0x003A,0x0031,0x0039,0x0038,0x0038,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0031,0x0034,0x0034,0x00 }
, { 0x0049,0x0053,0x004F,0x005F,0x0038,0x0038,0x0035,0x0039,0x002D,0x0035,0x00 }
, { 0x0049,0x0053,0x004F,0x002D,0x0038,0x0038,0x0035,0x0039,0x002D,0x0035,0x00 }
, { 0x0063,0x0079,0x0072,0x0069,0x006C,0x006C,0x0069,0x0063,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x004C,0x0061,0x0074,0x0069,0x006E,0x0043,0x0079,0x0072,0x0069,0x006C,0x006C,0x0069,0x0063,0x00 }
, { 0x004A,0x0055,0x0053,0x005F,0x0049,0x002E,0x0042,0x0031,0x002E,0x0030,0x0030,0x0033,0x002D,0x0073,0x0065,0x0072,0x0062,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0031,0x0034,0x0036,0x00 }
, { 0x0073,0x0065,0x0072,0x0062,0x0069,0x0061,0x006E,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0031,0x0034,0x0036,0x0053,0x0065,0x0072,0x0062,0x0069,0x0061,0x006E,0x00 }
, { 0x004A,0x0055,0x0053,0x005F,0x0049,0x002E,0x0042,0x0031,0x002E,0x0030,0x0030,0x0033,0x002D,0x006D,0x0061,0x0063,0x00 }
, { 0x006D,0x0061,0x0063,0x0065,0x0064,0x006F,0x006E,0x0069,0x0061,0x006E,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0031,0x0034,0x0037,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0031,0x0034,0x0037,0x004D,0x0061,0x0063,0x0065,0x0064,0x006F,0x006E,0x0069,0x0061,0x006E,0x00 }
, { 0x0049,0x0053,0x004F,0x005F,0x0038,0x0038,0x0035,0x0039,0x002D,0x0039,0x003A,0x0031,0x0039,0x0038,0x0039,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0031,0x0034,0x0038,0x00 }
, { 0x0049,0x0053,0x004F,0x005F,0x0038,0x0038,0x0035,0x0039,0x002D,0x0039,0x00 }
, { 0x0049,0x0053,0x004F,0x002D,0x0038,0x0038,0x0035,0x0039,0x002D,0x0039,0x00 }
, { 0x006C,0x0061,0x0074,0x0069,0x006E,0x0035,0x00 }
, { 0x006C,0x0035,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x004C,0x0061,0x0074,0x0069,0x006E,0x0035,0x00 }
, { 0x0067,0x0072,0x0065,0x0065,0x006B,0x002D,0x0063,0x0063,0x0069,0x0074,0x0074,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0031,0x0035,0x0030,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0031,0x0035,0x0030,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0031,0x0035,0x0030,0x0047,0x0072,0x0065,0x0065,0x006B,0x0043,0x0043,0x0049,0x0054,0x0054,0x00 }
, { 0x004E,0x0043,0x005F,0x004E,0x0043,0x0030,0x0030,0x002D,0x0031,0x0030,0x003A,0x0038,0x0031,0x00 }
, { 0x0063,0x0075,0x0062,0x0061,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0031,0x0035,0x0031,0x00 }
, { 0x0049,0x0053,0x004F,0x0036,0x0034,0x0036,0x002D,0x0043,0x0055,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0031,0x0035,0x0031,0x0043,0x0075,0x0062,0x0061,0x00 }
, { 0x0049,0x0053,0x004F,0x005F,0x0036,0x0039,0x0033,0x0037,0x002D,0x0032,0x002D,0x0032,0x0035,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0031,0x0035,0x0032,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0036,0x0039,0x0033,0x0037,0x0041,0x0064,0x0064,0x00 }
, { 0x0047,0x004F,0x0053,0x0054,0x005F,0x0031,0x0039,0x0037,0x0036,0x0038,0x002D,0x0037,0x0034,0x00 }
, { 0x0053,0x0054,0x005F,0x0053,0x0045,0x0056,0x005F,0x0033,0x0035,0x0038,0x002D,0x0038,0x0038,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0031,0x0035,0x0033,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0031,0x0035,0x0033,0x0047,0x004F,0x0053,0x0054,0x0031,0x0039,0x0037,0x0036,0x0038,0x0037,0x0034,0x00 }
, { 0x0049,0x0053,0x004F,0x005F,0x0038,0x0038,0x0035,0x0039,0x002D,0x0073,0x0075,0x0070,0x0070,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0031,0x0035,0x0034,0x00 }
, { 0x006C,0x0061,0x0074,0x0069,0x006E,0x0031,0x002D,0x0032,0x002D,0x0035,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0038,0x0038,0x0035,0x0039,0x0053,0x0075,0x0070,0x0070,0x00 }
, { 0x0049,0x0053,0x004F,0x005F,0x0031,0x0030,0x0033,0x0036,0x0037,0x002D,0x0062,0x006F,0x0078,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0031,0x0035,0x0035,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0031,0x0030,0x0033,0x0036,0x0037,0x0042,0x006F,0x0078,0x00 }
, { 0x0049,0x0053,0x004F,0x002D,0x0038,0x0038,0x0035,0x0039,0x002D,0x0031,0x0030,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0031,0x0035,0x0037,0x00 }
, { 0x006C,0x0036,0x00 }
, { 0x0049,0x0053,0x004F,0x005F,0x0038,0x0038,0x0035,0x0039,0x002D,0x0031,0x0030,0x003A,0x0031,0x0039,0x0039,0x0032,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x004C,0x0061,0x0074,0x0069,0x006E,0x0036,0x00 }
, { 0x006C,0x0061,0x0074,0x0069,0x006E,0x0036,0x00 }
, { 0x006C,0x0061,0x0074,0x0069,0x006E,0x002D,0x006C,0x0061,0x0070,0x00 }
, { 0x006C,0x0061,0x0070,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0031,0x0035,0x0038,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0031,0x0035,0x0038,0x004C,0x0061,0x0070,0x00 }
, { 0x004A,0x0049,0x0053,0x005F,0x0058,0x0030,0x0032,0x0031,0x0032,0x002D,0x0031,0x0039,0x0039,0x0030,0x00 }
, { 0x0078,0x0030,0x0032,0x0031,0x0032,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0031,0x0035,0x0039,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0031,0x0035,0x0039,0x004A,0x0049,0x0053,0x0058,0x0030,0x0032,0x0031,0x0032,0x0031,0x0039,0x0039,0x0030,0x00 }
, { 0x0044,0x0053,0x005F,0x0032,0x0030,0x0038,0x0039,0x00 }
, { 0x0044,0x0053,0x0032,0x0030,0x0038,0x0039,0x00 }
, { 0x0049,0x0053,0x004F,0x0036,0x0034,0x0036,0x002D,0x0044,0x004B,0x00 }
, { 0x0064,0x006B,0x00 }
, { 0x0063,0x0073,0x0049,0x0053,0x004F,0x0036,0x0034,0x0036,0x0044,0x0061,0x006E,0x0069,0x0073,0x0068,0x00 }
, { 0x0075,0x0073,0x002D,0x0064,0x006B,0x00 }
, { 0x0063,0x0073,0x0055,0x0053,0x0044,0x004B,0x00 }
, { 0x0064,0x006B,0x002D,0x0075,0x0073,0x00 }
, { 0x0063,0x0073,0x0044,0x004B,0x0055,0x0053,0x00 }
, { 0x004A,0x0049,0x0053,0x005F,0x0058,0x0030,0x0032,0x0030,0x0031,0x00 }
, { 0x0058,0x0030,0x0032,0x0030,0x0031,0x00 }
, { 0x0063,0x0073,0x0048,0x0061,0x006C,0x0066,0x0057,0x0069,0x0064,0x0074,0x0068,0x004B,0x0061,0x0074,0x0061,0x006B,0x0061,0x006E,0x0061,0x00 }
, { 0x004B,0x0053,0x0043,0x0035,0x0036,0x0033,0x0036,0x00 }
, { 0x0049,0x0053,0x004F,0x0036,0x0034,0x0036,0x002D,0x004B,0x0052,0x00 }
, { 0x0063,0x0073,0x004B,0x0053,0x0043,0x0035,0x0036,0x0033,0x0036,0x00 }
, { 0x0049,0x0053,0x004F,0x002D,0x0031,0x0030,0x0036,0x0034,0x0036,0x002D,0x0055,0x0043,0x0053,0x002D,0x0032,0x00 }
, { 0x0063,0x0073,0x0055,0x006E,0x0069,0x0063,0x006F,0x0064,0x0065,0x00 }
, { 0x0049,0x0053,0x004F,0x002D,0x0031,0x0030,0x0036,0x0034,0x0036,0x002D,0x0055,0x0043,0x0053,0x002D,0x0034,0x00 }
, { 0x0063,0x0073,0x0055,0x0043,0x0053,0x0034,0x00 }
, { 0x0044,0x0045,0x0043,0x002D,0x004D,0x0043,0x0053,0x00 }
, { 0x0064,0x0065,0x0063,0x00 }
, { 0x0063,0x0073,0x0044,0x0045,0x0043,0x004D,0x0043,0x0053,0x00 }
, { 0x0068,0x0070,0x002D,0x0072,0x006F,0x006D,0x0061,0x006E,0x0038,0x00 }
, { 0x0072,0x006F,0x006D,0x0061,0x006E,0x0038,0x00 }
, { 0x0072,0x0038,0x00 }
, { 0x0063,0x0073,0x0048,0x0050,0x0052,0x006F,0x006D,0x0061,0x006E,0x0038,0x00 }
, { 0x006D,0x0061,0x0063,0x0069,0x006E,0x0074,0x006F,0x0073,0x0068,0x00 }
, { 0x006D,0x0061,0x0063,0x00 }
, { 0x0063,0x0073,0x004D,0x0061,0x0063,0x0069,0x006E,0x0074,0x006F,0x0073,0x0068,0x00 }
, { 0x0049,0x0042,0x004D,0x0030,0x0033,0x0037,0x00 }
, { 0x0063,0x0070,0x0030,0x0033,0x0037,0x00 }
, { 0x0065,0x0062,0x0063,0x0064,0x0069,0x0063,0x002D,0x0063,0x0070,0x002D,0x0075,0x0073,0x00 }
, { 0x0065,0x0062,0x0063,0x0064,0x0069,0x0063,0x002D,0x0063,0x0070,0x002D,0x0063,0x0061,0x00 }
, { 0x0065,0x0062,0x0063,0x0064,0x0069,0x0063,0x002D,0x0063,0x0070,0x002D,0x0077,0x0074,0x00 }
, { 0x0065,0x0062,0x0063,0x0064,0x0069,0x0063,0x002D,0x0063,0x0070,0x002D,0x006E,0x006C,0x00 }
, { 0x0063,0x0073,0x0049,0x0042,0x004D,0x0030,0x0033,0x0037,0x00 }
, { 0x0049,0x0042,0x004D,0x0030,0x0033,0x0038,0x00 }
, { 0x0045,0x0042,0x0043,0x0044,0x0049,0x0043,0x002D,0x0049,0x004E,0x0054,0x00 }
, { 0x0063,0x0070,0x0030,0x0033,0x0038,0x00 }
, { 0x0063,0x0073,0x0049,0x0042,0x004D,0x0030,0x0033,0x0038,0x00 }
, { 0x0049,0x0042,0x004D,0x0032,0x0037,0x0033,0x00 }
, { 0x0043,0x0050,0x0032,0x0037,0x0033,0x00 }
, { 0x0063,0x0073,0x0049,0x0042,0x004D,0x0032,0x0037,0x0033,0x00 }
, { 0x0049,0x0042,0x004D,0x0032,0x0037,0x0034,0x00 }
, { 0x0045,0x0042,0x0043,0x0044,0x0049,0x0043,0x002D,0x0042,0x0045,0x00 }
, { 0x0043,0x0050,0x0032,0x0037,0x0034,0x00 }
, { 0x0063,0x0073,0x0049,0x0042,0x004D,0x0032,0x0037,0x0034,0x00 }
, { 0x0049,0x0042,0x004D,0x0032,0x0037,0x0035,0x00 }
, { 0x0045,0x0042,0x0043,0x0044,0x0049,0x0043,0x002D,0x0042,0x0052,0x00 }
, { 0x0063,0x0070,0x0032,0x0037,0x0035,0x00 }
, { 0x0063,0x0073,0x0049,0x0042,0x004D,0x0032,0x0037,0x0035,0x00 }
, { 0x0049,0x0042,0x004D,0x0032,0x0037,0x0037,0x00 }
, { 0x0045,0x0042,0x0043,0x0044,0x0049,0x0043,0x002D,0x0043,0x0050,0x002D,0x0044,0x004B,0x00 }
, { 0x0045,0x0042,0x0043,0x0044,0x0049,0x0043,0x002D,0x0043,0x0050,0x002D,0x004E,0x004F,0x00 }
, { 0x0063,0x0073,0x0049,0x0042,0x004D,0x0032,0x0037,0x0037,0x00 }
, { 0x0049,0x0042,0x004D,0x0032,0x0037,0x0038,0x00 }
, { 0x0043,0x0050,0x0032,0x0037,0x0038,0x00 }
, { 0x0065,0x0062,0x0063,0x0064,0x0069,0x0063,0x002D,0x0063,0x0070,0x002D,0x0066,0x0069,0x00 }
, { 0x0065,0x0062,0x0063,0x0064,0x0069,0x0063,0x002D,0x0063,0x0070,0x002D,0x0073,0x0065,0x00 }
, { 0x0063,0x0073,0x0049,0x0042,0x004D,0x0032,0x0037,0x0038,0x00 }
, { 0x0049,0x0042,0x004D,0x0032,0x0038,0x0030,0x00 }
, { 0x0043,0x0050,0x0032,0x0038,0x0030,0x00 }
, { 0x0065,0x0062,0x0063,0x0064,0x0069,0x0063,0x002D,0x0063,0x0070,0x002D,0x0069,0x0074,0x00 }
, { 0x0063,0x0073,0x0049,0x0042,0x004D,0x0032,0x0038,0x0030,0x00 }
, { 0x0049,0x0042,0x004D,0x0032,0x0038,0x0031,0x00 }
, { 0x0045,0x0042,0x0043,0x0044,0x0049,0x0043,0x002D,0x004A,0x0050,0x002D,0x0045,0x00 }
, { 0x0063,0x0070,0x0032,0x0038,0x0031,0x00 }
, { 0x0063,0x0073,0x0049,0x0042,0x004D,0x0032,0x0038,0x0031,0x00 }
, { 0x0049,0x0042,0x004D,0x0032,0x0038,0x0034,0x00 }
, { 0x0043,0x0050,0x0032,0x0038,0x0034,0x00 }
, { 0x0065,0x0062,0x0063,0x0064,0x0069,0x0063,0x002D,0x0063,0x0070,0x002D,0x0065,0x0073,0x00 }
, { 0x0063,0x0073,0x0049,0x0042,0x004D,0x0032,0x0038,0x0034,0x00 }
, { 0x0049,0x0042,0x004D,0x0032,0x0038,0x0035,0x00 }
, { 0x0043,0x0050,0x0032,0x0038,0x0035,0x00 }
, { 0x0065,0x0062,0x0063,0x0064,0x0069,0x0063,0x002D,0x0063,0x0070,0x002D,0x0067,0x0062,0x00 }
, { 0x0063,0x0073,0x0049,0x0042,0x004D,0x0032,0x0038,0x0035,0x00 }
, { 0x0049,0x0042,0x004D,0x0032,0x0039,0x0030,0x00 }
, { 0x0063,0x0070,0x0032,0x0039,0x0030,0x00 }
, { 0x0045,0x0042,0x0043,0x0044,0x0049,0x0043,0x002D,0x004A,0x0050,0x002D,0x006B,0x0061,0x006E,0x0061,0x00 }
, { 0x0063,0x0073,0x0049,0x0042,0x004D,0x0032,0x0039,0x0030,0x00 }
, { 0x0049,0x0042,0x004D,0x0032,0x0039,0x0037,0x00 }
, { 0x0063,0x0070,0x0032,0x0039,0x0037,0x00 }
, { 0x0065,0x0062,0x0063,0x0064,0x0069,0x0063,0x002D,0x0063,0x0070,0x002D,0x0066,0x0072,0x00 }
, { 0x0063,0x0073,0x0049,0x0042,0x004D,0x0032,0x0039,0x0037,0x00 }
, { 0x0049,0x0042,0x004D,0x0034,0x0032,0x0030,0x00 }
, { 0x0063,0x0070,0x0034,0x0032,0x0030,0x00 }
, { 0x0065,0x0062,0x0063,0x0064,0x0069,0x0063,0x002D,0x0063,0x0070,0x002D,0x0061,0x0072,0x0031,0x00 }
, { 0x0063,0x0073,0x0049,0x0042,0x004D,0x0034,0x0032,0x0030,0x00 }
, { 0x0049,0x0042,0x004D,0x0034,0x0032,0x0033,0x00 }
, { 0x0063,0x0070,0x0034,0x0032,0x0033,0x00 }
, { 0x0065,0x0062,0x0063,0x0064,0x0069,0x0063,0x002D,0x0063,0x0070,0x002D,0x0067,0x0072,0x00 }
, { 0x0063,0x0073,0x0049,0x0042,0x004D,0x0034,0x0032,0x0033,0x00 }
, { 0x0049,0x0042,0x004D,0x0034,0x0032,0x0034,0x00 }
, { 0x0063,0x0070,0x0034,0x0032,0x0034,0x00 }
, { 0x0065,0x0062,0x0063,0x0064,0x0069,0x0063,0x002D,0x0063,0x0070,0x002D,0x0068,0x0065,0x00 }
, { 0x0063,0x0073,0x0049,0x0042,0x004D,0x0034,0x0032,0x0034,0x00 }
, { 0x0049,0x0042,0x004D,0x0034,0x0033,0x0037,0x00 }
, { 0x0063,0x0070,0x0034,0x0033,0x0037,0x00 }
, { 0x0034,0x0033,0x0037,0x00 }
, { 0x0063,0x0073,0x0050,0x0043,0x0038,0x0043,0x006F,0x0064,0x0065,0x0050,0x0061,0x0067,0x0065,0x0034,0x0033,0x0037,0x00 }
, { 0x0049,0x0042,0x004D,0x0035,0x0030,0x0030,0x00 }
, { 0x0043,0x0050,0x0035,0x0030,0x0030,0x00 }
, { 0x0065,0x0062,0x0063,0x0064,0x0069,0x0063,0x002D,0x0063,0x0070,0x002D,0x0062,0x0065,0x00 }
, { 0x0065,0x0062,0x0063,0x0064,0x0069,0x0063,0x002D,0x0063,0x0070,0x002D,0x0063,0x0068,0x00 }
, { 0x0063,0x0073,0x0049,0x0042,0x004D,0x0035,0x0030,0x0030,0x00 }
, { 0x0049,0x0042,0x004D,0x0037,0x0037,0x0035,0x00 }
, { 0x0063,0x0070,0x0037,0x0037,0x0035,0x00 }
, { 0x0063,0x0073,0x0050,0x0043,0x0037,0x0037,0x0035,0x0042,0x0061,0x006C,0x0074,0x0069,0x0063,0x00 }
, { 0x0049,0x0042,0x004D,0x0038,0x0035,0x0030,0x00 }
, { 0x0063,0x0070,0x0038,0x0035,0x0030,0x00 }
, { 0x0038,0x0035,0x0030,0x00 }
, { 0x0063,0x0073,0x0050,0x0043,0x0038,0x0035,0x0030,0x004D,0x0075,0x006C,0x0074,0x0069,0x006C,0x0069,0x006E,0x0067,0x0075,0x0061,0x006C,0x00 }
, { 0x0049,0x0042,0x004D,0x0038,0x0035,0x0031,0x00 }
, { 0x0063,0x0070,0x0038,0x0035,0x0031,0x00 }
, { 0x0038,0x0035,0x0031,0x00 }
, { 0x0063,0x0073,0x0049,0x0042,0x004D,0x0038,0x0035,0x0031,0x00 }
, { 0x0049,0x0042,0x004D,0x0038,0x0035,0x0032,0x00 }
, { 0x0063,0x0070,0x0038,0x0035,0x0032,0x00 }
, { 0x0038,0x0035,0x0032,0x00 }
, { 0x0063,0x0073,0x0050,0x0043,0x0070,0x0038,0x0035,0x0032,0x00 }
, { 0x0049,0x0042,0x004D,0x0038,0x0035,0x0035,0x00 }
, { 0x0063,0x0070,0x0038,0x0035,0x0035,0x00 }
, { 0x0038,0x0035,0x0035,0x00 }
, { 0x0063,0x0073,0x0049,0x0042,0x004D,0x0038,0x0035,0x0035,0x00 }
, { 0x0049,0x0042,0x004D,0x0038,0x0035,0x0037,0x00 }
, { 0x0063,0x0070,0x0038,0x0035,0x0037,0x00 }
, { 0x0038,0x0035,0x0037,0x00 }
, { 0x0063,0x0073,0x0049,0x0042,0x004D,0x0038,0x0035,0x0037,0x00 }
, { 0x0049,0x0042,0x004D,0x0038,0x0036,0x0030,0x00 }
, { 0x0063,0x0070,0x0038,0x0036,0x0030,0x00 }
, { 0x0038,0x0036,0x0030,0x00 }
, { 0x0063,0x0073,0x0049,0x0042,0x004D,0x0038,0x0036,0x0030,0x00 }
, { 0x0049,0x0042,0x004D,0x0038,0x0036,0x0031,0x00 }
, { 0x0063,0x0070,0x0038,0x0036,0x0031,0x00 }
, { 0x0038,0x0036,0x0031,0x00 }
, { 0x0063,0x0070,0x002D,0x0069,0x0073,0x00 }
, { 0x0063,0x0073,0x0049,0x0042,0x004D,0x0038,0x0036,0x0031,0x00 }
, { 0x0049,0x0042,0x004D,0x0038,0x0036,0x0032,0x00 }
, { 0x0063,0x0070,0x0038,0x0036,0x0032,0x00 }
, { 0x0038,0x0036,0x0032,0x00 }
, { 0x0063,0x0073,0x0050,0x0043,0x0038,0x0036,0x0032,0x004C,0x0061,0x0074,0x0069,0x006E,0x0048,0x0065,0x0062,0x0072,0x0065,0x0077,0x00 }
, { 0x0049,0x0042,0x004D,0x0038,0x0036,0x0033,0x00 }
, { 0x0063,0x0070,0x0038,0x0036,0x0033,0x00 }
, { 0x0038,0x0036,0x0033,0x00 }
, { 0x0063,0x0073,0x0049,0x0042,0x004D,0x0038,0x0036,0x0033,0x00 }
, { 0x0049,0x0042,0x004D,0x0038,0x0036,0x0034,0x00 }
, { 0x0063,0x0070,0x0038,0x0036,0x0034,0x00 }
, { 0x0063,0x0073,0x0049,0x0042,0x004D,0x0038,0x0036,0x0034,0x00 }
, { 0x0049,0x0042,0x004D,0x0038,0x0036,0x0035,0x00 }
, { 0x0063,0x0070,0x0038,0x0036,0x0035,0x00 }
, { 0x0038,0x0036,0x0035,0x00 }
, { 0x0063,0x0073,0x0049,0x0042,0x004D,0x0038,0x0036,0x0035,0x00 }
, { 0x0049,0x0042,0x004D,0x0038,0x0036,0x0036,0x00 }
, { 0x0063,0x0070,0x0038,0x0036,0x0036,0x00 }
, { 0x0038,0x0036,0x0036,0x00 }
, { 0x0063,0x0073,0x0049,0x0042,0x004D,0x0038,0x0036,0x0036,0x00 }
, { 0x0049,0x0042,0x004D,0x0038,0x0036,0x0038,0x00 }
, { 0x0043,0x0050,0x0038,0x0036,0x0038,0x00 }
, { 0x0063,0x0070,0x002D,0x0061,0x0072,0x00 }
, { 0x0063,0x0073,0x0049,0x0042,0x004D,0x0038,0x0036,0x0038,0x00 }
, { 0x0049,0x0042,0x004D,0x0038,0x0036,0x0039,0x00 }
, { 0x0063,0x0070,0x0038,0x0036,0x0039,0x00 }
, { 0x0038,0x0036,0x0039,0x00 }
, { 0x0063,0x0070,0x002D,0x0067,0x0072,0x00 }
, { 0x0063,0x0073,0x0049,0x0042,0x004D,0x0038,0x0036,0x0039,0x00 }
, { 0x0049,0x0042,0x004D,0x0038,0x0037,0x0030,0x00 }
, { 0x0043,0x0050,0x0038,0x0037,0x0030,0x00 }
, { 0x0065,0x0062,0x0063,0x0064,0x0069,0x0063,0x002D,0x0063,0x0070,0x002D,0x0072,0x006F,0x0065,0x0063,0x0065,0x00 }
, { 0x0065,0x0062,0x0063,0x0064,0x0069,0x0063,0x002D,0x0063,0x0070,0x002D,0x0079,0x0075,0x00 }
, { 0x0063,0x0073,0x0049,0x0042,0x004D,0x0038,0x0037,0x0030,0x00 }
, { 0x0049,0x0042,0x004D,0x0038,0x0037,0x0031,0x00 }
, { 0x0043,0x0050,0x0038,0x0037,0x0031,0x00 }
, { 0x0065,0x0062,0x0063,0x0064,0x0069,0x0063,0x002D,0x0063,0x0070,0x002D,0x0069,0x0073,0x00 }
, { 0x0063,0x0073,0x0049,0x0042,0x004D,0x0038,0x0037,0x0031,0x00 }
, { 0x0049,0x0042,0x004D,0x0038,0x0038,0x0030,0x00 }
, { 0x0063,0x0070,0x0038,0x0038,0x0030,0x00 }
, { 0x0045,0x0042,0x0043,0x0044,0x0049,0x0043,0x002D,0x0043,0x0079,0x0072,0x0069,0x006C,0x006C,0x0069,0x0063,0x00 }
, { 0x0063,0x0073,0x0049,0x0042,0x004D,0x0038,0x0038,0x0030,0x00 }
, { 0x0049,0x0042,0x004D,0x0038,0x0039,0x0031,0x00 }
, { 0x0063,0x0070,0x0038,0x0039,0x0031,0x00 }
, { 0x0063,0x0073,0x0049,0x0042,0x004D,0x0038,0x0039,0x0031,0x00 }
, { 0x0049,0x0042,0x004D,0x0039,0x0030,0x0033,0x00 }
, { 0x0063,0x0070,0x0039,0x0030,0x0033,0x00 }
, { 0x0063,0x0073,0x0049,0x0042,0x004D,0x0039,0x0030,0x0033,0x00 }
, { 0x0049,0x0042,0x004D,0x0039,0x0030,0x0034,0x00 }
, { 0x0063,0x0070,0x0039,0x0030,0x0034,0x00 }
, { 0x0039,0x0030,0x0034,0x00 }
, { 0x0063,0x0073,0x0049,0x0042,0x0042,0x004D,0x0039,0x0030,0x0034,0x00 }
, { 0x0049,0x0042,0x004D,0x0039,0x0030,0x0035,0x00 }
, { 0x0043,0x0050,0x0039,0x0030,0x0035,0x00 }
, { 0x0065,0x0062,0x0063,0x0064,0x0069,0x0063,0x002D,0x0063,0x0070,0x002D,0x0074,0x0072,0x00 }
, { 0x0063,0x0073,0x0049,0x0042,0x004D,0x0039,0x0030,0x0035,0x00 }
, { 0x0049,0x0042,0x004D,0x0039,0x0031,0x0038,0x00 }
, { 0x0043,0x0050,0x0039,0x0031,0x0038,0x00 }
, { 0x0065,0x0062,0x0063,0x0064,0x0069,0x0063,0x002D,0x0063,0x0070,0x002D,0x0061,0x0072,0x0032,0x00 }
, { 0x0063,0x0073,0x0049,0x0042,0x004D,0x0039,0x0031,0x0038,0x00 }
, { 0x0049,0x0042,0x004D,0x0031,0x0030,0x0032,0x0036,0x00 }
, { 0x0043,0x0050,0x0031,0x0030,0x0032,0x0036,0x00 }
, { 0x0063,0x0073,0x0049,0x0042,0x004D,0x0031,0x0030,0x0032,0x0036,0x00 }
, { 0x0045,0x0042,0x0043,0x0044,0x0049,0x0043,0x002D,0x0041,0x0054,0x002D,0x0044,0x0045,0x00 }
, { 0x0063,0x0073,0x0049,0x0042,0x004D,0x0045,0x0042,0x0043,0x0044,0x0049,0x0043,0x0041,0x0054,0x0044,0x0045,0x00 }
, { 0x0045,0x0042,0x0043,0x0044,0x0049,0x0043,0x002D,0x0041,0x0054,0x002D,0x0044,0x0045,0x002D,0x0041,0x00 }
, { 0x0063,0x0073,0x0045,0x0042,0x0043,0x0044,0x0049,0x0043,0x0041,0x0054,0x0044,0x0045,0x0041,0x00 }
, { 0x0045,0x0042,0x0043,0x0044,0x0049,0x0043,0x002D,0x0043,0x0041,0x002D,0x0046,0x0052,0x00 }
, { 0x0063,0x0073,0x0045,0x0042,0x0043,0x0044,0x0049,0x0043,0x0043,0x0041,0x0046,0x0052,0x00 }
, { 0x0045,0x0042,0x0043,0x0044,0x0049,0x0043,0x002D,0x0044,0x004B,0x002D,0x004E,0x004F,0x00 }
, { 0x0063,0x0073,0x0045,0x0042,0x0043,0x0044,0x0049,0x0043,0x0044,0x004B,0x004E,0x004F,0x00 }
, { 0x0045,0x0042,0x0043,0x0044,0x0049,0x0043,0x002D,0x0044,0x004B,0x002D,0x004E,0x004F,0x002D,0x0041,0x00 }
, { 0x0063,0x0073,0x0045,0x0042,0x0043,0x0044,0x0049,0x0043,0x0044,0x004B,0x004E,0x004F,0x0041,0x00 }
, { 0x0045,0x0042,0x0043,0x0044,0x0049,0x0043,0x002D,0x0046,0x0049,0x002D,0x0053,0x0045,0x00 }
, { 0x0063,0x0073,0x0045,0x0042,0x0043,0x0044,0x0049,0x0043,0x0046,0x0049,0x0053,0x0045,0x00 }
, { 0x0045,0x0042,0x0043,0x0044,0x0049,0x0043,0x002D,0x0046,0x0049,0x002D,0x0053,0x0045,0x002D,0x0041,0x00 }
, { 0x0063,0x0073,0x0045,0x0042,0x0043,0x0044,0x0049,0x0043,0x0046,0x0049,0x0053,0x0045,0x0041,0x00 }
, { 0x0045,0x0042,0x0043,0x0044,0x0049,0x0043,0x002D,0x0046,0x0052,0x00 }
, { 0x0063,0x0073,0x0045,0x0042,0x0043,0x0044,0x0049,0x0043,0x0046,0x0052,0x00 }
, { 0x0045,0x0042,0x0043,0x0044,0x0049,0x0043,0x002D,0x0049,0x0054,0x00 }
, { 0x0063,0x0073,0x0045,0x0042,0x0043,0x0044,0x0049,0x0043,0x0049,0x0054,0x00 }
, { 0x0045,0x0042,0x0043,0x0044,0x0049,0x0043,0x002D,0x0050,0x0054,0x00 }
, { 0x0063,0x0073,0x0045,0x0042,0x0043,0x0044,0x0049,0x0043,0x0050,0x0054,0x00 }
, { 0x0045,0x0042,0x0043,0x0044,0x0049,0x0043,0x002D,0x0045,0x0053,0x00 }
, { 0x0063,0x0073,0x0045,0x0042,0x0043,0x0044,0x0049,0x0043,0x0045,0x0053,0x00 }
, { 0x0045,0x0042,0x0043,0x0044,0x0049,0x0043,0x002D,0x0045,0x0053,0x002D,0x0041,0x00 }
, { 0x0063,0x0073,0x0045,0x0042,0x0043,0x0044,0x0049,0x0043,0x0045,0x0053,0x0041,0x00 }
, { 0x0045,0x0042,0x0043,0x0044,0x0049,0x0043,0x002D,0x0045,0x0053,0x002D,0x0053,0x00 }
, { 0x0063,0x0073,0x0045,0x0042,0x0043,0x0044,0x0049,0x0043,0x0045,0x0053,0x0053,0x00 }
, { 0x0045,0x0042,0x0043,0x0044,0x0049,0x0043,0x002D,0x0055,0x004B,0x00 }
, { 0x0063,0x0073,0x0045,0x0042,0x0043,0x0044,0x0049,0x0043,0x0055,0x004B,0x00 }
, { 0x0045,0x0042,0x0043,0x0044,0x0049,0x0043,0x002D,0x0055,0x0053,0x00 }
, { 0x0063,0x0073,0x0045,0x0042,0x0043,0x0044,0x0049,0x0043,0x0055,0x0053,0x00 }
, { 0x0055,0x004E,0x004B,0x004E,0x004F,0x0057,0x004E,0x002D,0x0038,0x0042,0x0049,0x0054,0x00 }
, { 0x0063,0x0073,0x0055,0x006E,0x006B,0x006E,0x006F,0x0077,0x006E,0x0038,0x0042,0x0069,0x0054,0x00 }
, { 0x004D,0x004E,0x0045,0x004D,0x004F,0x004E,0x0049,0x0043,0x00 }
, { 0x0063,0x0073,0x004D,0x006E,0x0065,0x006D,0x006F,0x006E,0x0069,0x0063,0x00 }
, { 0x004D,0x004E,0x0045,0x004D,0x00 }
, { 0x0063,0x0073,0x004D,0x006E,0x0065,0x006D,0x00 }
, { 0x0056,0x0049,0x0053,0x0043,0x0049,0x0049,0x00 }
, { 0x0063,0x0073,0x0056,0x0049,0x0053,0x0043,0x0049,0x0049,0x00 }
, { 0x0056,0x0049,0x0051,0x0052,0x00 }
, { 0x0063,0x0073,0x0056,0x0049,0x0051,0x0052,0x00 }
, { 0x004B,0x004F,0x0049,0x0038,0x002D,0x0052,0x00 }
, { 0x0063,0x0073,0x004B,0x004F,0x0049,0x0038,0x0052,0x00 }
, { 0x004B,0x004F,0x0049,0x0038,0x002D,0x0055,0x00 }
, { 0x0049,0x0042,0x004D,0x0030,0x0030,0x0038,0x0035,0x0038,0x00 }
, { 0x0043,0x0043,0x0053,0x0049,0x0044,0x0030,0x0030,0x0038,0x0035,0x0038,0x00 }
, { 0x0043,0x0050,0x0030,0x0030,0x0038,0x0035,0x0038,0x00 }
, { 0x0050,0x0043,0x002D,0x004D,0x0075,0x006C,0x0074,0x0069,0x006C,0x0069,0x006E,0x0067,0x0075,0x0061,0x006C,0x002D,0x0038,0x0035,0x0030,0x002B,0x0065,0x0075,0x0072,0x006F,0x00 }
, { 0x0049,0x0042,0x004D,0x0030,0x0030,0x0039,0x0032,0x0034,0x00 }
, { 0x0043,0x0043,0x0053,0x0049,0x0044,0x0030,0x0030,0x0039,0x0032,0x0034,0x00 }
, { 0x0043,0x0050,0x0030,0x0030,0x0039,0x0032,0x0034,0x00 }
, { 0x0065,0x0062,0x0063,0x0064,0x0069,0x0063,0x002D,0x004C,0x0061,0x0074,0x0069,0x006E,0x0039,0x002D,0x002D,0x0065,0x0075,0x0072,0x006F,0x00 }
, { 0x0049,0x0042,0x004D,0x0030,0x0031,0x0031,0x0034,0x0030,0x00 }
, { 0x0043,0x0043,0x0053,0x0049,0x0044,0x0030,0x0031,0x0031,0x0034,0x0030,0x00 }
, { 0x0043,0x0050,0x0030,0x0031,0x0031,0x0034,0x0030,0x00 }
, { 0x0065,0x0062,0x0063,0x0064,0x0069,0x0063,0x002D,0x0075,0x0073,0x002D,0x0033,0x0037,0x002B,0x0065,0x0075,0x0072,0x006F,0x00 }
, { 0x0049,0x0042,0x004D,0x0030,0x0031,0x0031,0x0034,0x0031,0x00 }
, { 0x0043,0x0043,0x0053,0x0049,0x0044,0x0030,0x0031,0x0031,0x0034,0x0031,0x00 }
, { 0x0043,0x0050,0x0030,0x0031,0x0031,0x0034,0x0031,0x00 }
, { 0x0065,0x0062,0x0063,0x0064,0x0069,0x0063,0x002D,0x0064,0x0065,0x002D,0x0032,0x0037,0x0033,0x002B,0x0065,0x0075,0x0072,0x006F,0x00 }
, { 0x0049,0x0042,0x004D,0x0030,0x0031,0x0031,0x0034,0x0032,0x00 }
, { 0x0043,0x0043,0x0053,0x0049,0x0044,0x0030,0x0031,0x0031,0x0034,0x0032,0x00 }
, { 0x0043,0x0050,0x0030,0x0031,0x0031,0x0034,0x0032,0x00 }
, { 0x0065,0x0062,0x0063,0x0064,0x0069,0x0063,0x002D,0x0064,0x006B,0x002D,0x0032,0x0037,0x0037,0x002B,0x0065,0x0075,0x0072,0x006F,0x00 }
, { 0x0065,0x0062,0x0063,0x0064,0x0069,0x0063,0x002D,0x006E,0x006F,0x002D,0x0032,0x0037,0x0037,0x002B,0x0065,0x0075,0x0072,0x006F,0x00 }
, { 0x0049,0x0042,0x004D,0x0030,0x0031,0x0031,0x0034,0x0033,0x00 }
, { 0x0043,0x0043,0x0053,0x0049,0x0044,0x0030,0x0031,0x0031,0x0034,0x0033,0x00 }
, { 0x0043,0x0050,0x0030,0x0031,0x0031,0x0034,0x0033,0x00 }
, { 0x0065,0x0062,0x0063,0x0064,0x0069,0x0063,0x002D,0x0066,0x0069,0x002D,0x0032,0x0037,0x0038,0x002B,0x0065,0x0075,0x0072,0x006F,0x00 }
, { 0x0065,0x0062,0x0063,0x0064,0x0069,0x0063,0x002D,0x0073,0x0065,0x002D,0x0032,0x0037,0x0038,0x002B,0x0065,0x0075,0x0072,0x006F,0x00 }
, { 0x0049,0x0042,0x004D,0x0030,0x0031,0x0031,0x0034,0x0034,0x00 }
, { 0x0043,0x0043,0x0053,0x0049,0x0044,0x0030,0x0031,0x0031,0x0034,0x0034,0x00 }
, { 0x0043,0x0050,0x0030,0x0031,0x0031,0x0034,0x0034,0x00 }
, { 0x0065,0x0062,0x0063,0x0064,0x0069,0x0063,0x002D,0x0069,0x0074,0x002D,0x0032,0x0038,0x0030,0x002B,0x0065,0x0075,0x0072,0x006F,0x00 }
, { 0x0049,0x0042,0x004D,0x0030,0x0031,0x0031,0x0034,0x0035,0x00 }
, { 0x0043,0x0043,0x0053,0x0049,0x0044,0x0030,0x0031,0x0031,0x0034,0x0035,0x00 }
, { 0x0043,0x0050,0x0030,0x0031,0x0031,0x0034,0x0035,0x00 }
, { 0x0065,0x0062,0x0063,0x0064,0x0069,0x0063,0x002D,0x0065,0x0073,0x002D,0x0032,0x0038,0x0034,0x002B,0x0065,0x0075,0x0072,0x006F,0x00 }
, { 0x0049,0x0042,0x004D,0x0030,0x0031,0x0031,0x0034,0x0036,0x00 }
, { 0x0043,0x0043,0x0053,0x0049,0x0044,0x0030,0x0031,0x0031,0x0034,0x0036,0x00 }
, { 0x0043,0x0050,0x0030,0x0031,0x0031,0x0034,0x0036,0x00 }
, { 0x0065,0x0062,0x0063,0x0064,0x0069,0x0063,0x002D,0x0067,0x0062,0x002D,0x0032,0x0038,0x0035,0x002B,0x0065,0x0075,0x0072,0x006F,0x00 }
, { 0x0049,0x0042,0x004D,0x0030,0x0031,0x0031,0x0034,0x0037,0x00 }
, { 0x0043,0x0043,0x0053,0x0049,0x0044,0x0030,0x0031,0x0031,0x0034,0x0037,0x00 }
, { 0x0043,0x0050,0x0030,0x0031,0x0031,0x0034,0x0037,0x00 }
, { 0x0065,0x0062,0x0063,0x0064,0x0069,0x0063,0x002D,0x0066,0x0072,0x002D,0x0032,0x0039,0x0037,0x002B,0x0065,0x0075,0x0072,0x006F,0x00 }
, { 0x0049,0x0042,0x004D,0x0030,0x0031,0x0031,0x0034,0x0038,0x00 }
, { 0x0043,0x0043,0x0053,0x0049,0x0044,0x0030,0x0031,0x0031,0x0034,0x0038,0x00 }
, { 0x0043,0x0050,0x0030,0x0031,0x0031,0x0034,0x0038,0x00 }
, { 0x0065,0x0062,0x0063,0x0064,0x0069,0x0063,0x002D,0x0069,0x006E,0x0074,0x0065,0x0072,0x006E,0x0061,0x0074,0x0069,0x006F,0x006E,0x0061,0x006C,0x002D,0x0035,0x0030,0x0030,0x002B,0x0065,0x0075,0x0072,0x006F,0x00 }
, { 0x0049,0x0042,0x004D,0x0030,0x0031,0x0031,0x0034,0x0039,0x00 }
, { 0x0043,0x0043,0x0053,0x0049,0x0044,0x0030,0x0031,0x0031,0x0034,0x0039,0x00 }
, { 0x0043,0x0050,0x0030,0x0031,0x0031,0x0034,0x0039,0x00 }
, { 0x0065,0x0062,0x0063,0x0064,0x0069,0x0063,0x002D,0x0069,0x0073,0x002D,0x0038,0x0037,0x0031,0x002B,0x0065,0x0075,0x0072,0x006F,0x00 }
, { 0x0042,0x0069,0x0067,0x0035,0x002D,0x0048,0x004B,0x0053,0x0043,0x0053,0x00 }
, { 0x0055,0x004E,0x0049,0x0043,0x004F,0x0044,0x0045,0x002D,0x0031,0x002D,0x0031,0x00 }
, { 0x0063,0x0073,0x0055,0x006E,0x0069,0x0063,0x006F,0x0064,0x0065,0x0031,0x0031,0x00 }
, { 0x0053,0x0043,0x0053,0x0055,0x00 }
, { 0x0055,0x0054,0x0046,0x002D,0x0037,0x00 }
, { 0x0055,0x0054,0x0046,0x002D,0x0031,0x0036,0x0042,0x0045,0x00 }
, { 0x0055,0x0054,0x0046,0x002D,0x0031,0x0036,0x004C,0x0045,0x00 }
, { 0x0055,0x0054,0x0046,0x002D,0x0031,0x0036,0x00 }
, { 0x0043,0x0045,0x0053,0x0055,0x002D,0x0038,0x00 }
, { 0x0063,0x0073,0x0043,0x0045,0x0053,0x0055,0x002D,0x0038,0x00 }
, { 0x0055,0x0054,0x0046,0x002D,0x0033,0x0032,0x00 }
, { 0x0055,0x0054,0x0046,0x002D,0x0033,0x0032,0x0042,0x0045,0x00 }
, { 0x0055,0x0054,0x0046,0x002D,0x0033,0x0032,0x004C,0x0045,0x00 }
, { 0x0055,0x004E,0x0049,0x0043,0x004F,0x0044,0x0045,0x002D,0x0031,0x002D,0x0031,0x002D,0x0055,0x0054,0x0046,0x002D,0x0037,0x00 }
, { 0x0063,0x0073,0x0055,0x006E,0x0069,0x0063,0x006F,0x0064,0x0065,0x0031,0x0031,0x0055,0x0054,0x0046,0x0037,0x00 }
, { 0x0055,0x0054,0x0046,0x002D,0x0038,0x00 }
, { 0x0049,0x0053,0x004F,0x002D,0x0038,0x0038,0x0035,0x0039,0x002D,0x0031,0x0033,0x00 }
, { 0x0049,0x0053,0x004F,0x002D,0x0038,0x0038,0x0035,0x0039,0x002D,0x0031,0x0034,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0069,0x0072,0x002D,0x0031,0x0039,0x0039,0x00 }
, { 0x0049,0x0053,0x004F,0x005F,0x0038,0x0038,0x0035,0x0039,0x002D,0x0031,0x0034,0x003A,0x0031,0x0039,0x0039,0x0038,0x00 }
, { 0x0049,0x0053,0x004F,0x005F,0x0038,0x0038,0x0035,0x0039,0x002D,0x0031,0x0034,0x00 }
, { 0x006C,0x0061,0x0074,0x0069,0x006E,0x0038,0x00 }
, { 0x0069,0x0073,0x006F,0x002D,0x0063,0x0065,0x006C,0x0074,0x0069,0x0063,0x00 }
, { 0x006C,0x0038,0x00 }
, { 0x0049,0x0053,0x004F,0x002D,0x0038,0x0038,0x0035,0x0039,0x002D,0x0031,0x0035,0x00 }
, { 0x0049,0x0053,0x004F,0x005F,0x0038,0x0038,0x0035,0x0039,0x002D,0x0031,0x0035,0x00 }
, { 0x0049,0x0053,0x004F,0x002D,0x0038,0x0038,0x0035,0x0039,0x002D,0x0031,0x0036,0x00 }
, { 0x00 }
, { 0x0047,0x0042,0x004B,0x00 }
, { 0x0043,0x0050,0x0039,0x0033,0x0036,0x00 }
, { 0x004D,0x0053,0x0039,0x0033,0x0036,0x00 }
, { 0x0077,0x0069,0x006E,0x0064,0x006F,0x0077,0x0073,0x002D,0x0039,0x0033,0x0036,0x00 }
, { 0x0047,0x0042,0x0031,0x0038,0x0030,0x0033,0x0030,0x00 }
, { 0x004A,0x0049,0x0053,0x005F,0x0045,0x006E,0x0063,0x006F,0x0064,0x0069,0x006E,0x0067,0x00 }
, { 0x0063,0x0073,0x004A,0x0049,0x0053,0x0045,0x006E,0x0063,0x006F,0x0064,0x0069,0x006E,0x0067,0x00 }
, { 0x0053,0x0068,0x0069,0x0066,0x0074,0x005F,0x004A,0x0049,0x0053,0x00 }
, { 0x004D,0x0053,0x005F,0x004B,0x0061,0x006E,0x006A,0x0069,0x00 }
, { 0x0063,0x0073,0x0053,0x0068,0x0069,0x0066,0x0074,0x004A,0x0049,0x0053,0x00 }
, { 0x0045,0x0078,0x0074,0x0065,0x006E,0x0064,0x0065,0x0064,0x005F,0x0055,0x004E,0x0049,0x0058,0x005F,0x0043,0x006F,0x0064,0x0065,0x005F,0x0050,0x0061,0x0063,0x006B,0x0065,0x0064,0x005F,0x0046,0x006F,0x0072,0x006D,0x0061,0x0074,0x005F,0x0066,0x006F,0x0072,0x005F,0x004A,0x0061,0x0070,0x0061,0x006E,0x0065,0x0073,0x0065,0x00 }
, { 0x0063,0x0073,0x0045,0x0055,0x0043,0x0050,0x006B,0x0064,0x0046,0x006D,0x0074,0x004A,0x0061,0x0070,0x0061,0x006E,0x0065,0x0073,0x0065,0x00 }
, { 0x0045,0x0055,0x0043,0x002D,0x004A,0x0050,0x00 }
, { 0x0045,0x0078,0x0074,0x0065,0x006E,0x0064,0x0065,0x0064,0x005F,0x0055,0x004E,0x0049,0x0058,0x005F,0x0043,0x006F,0x0064,0x0065,0x005F,0x0046,0x0069,0x0078,0x0065,0x0064,0x005F,0x0057,0x0069,0x0064,0x0074,0x0068,0x005F,0x0066,0x006F,0x0072,0x005F,0x004A,0x0061,0x0070,0x0061,0x006E,0x0065,0x0073,0x0065,0x00 }
, { 0x0063,0x0073,0x0045,0x0055,0x0043,0x0046,0x0069,0x0078,0x0057,0x0069,0x0064,0x004A,0x0061,0x0070,0x0061,0x006E,0x0065,0x0073,0x0065,0x00 }
, { 0x0049,0x0053,0x004F,0x002D,0x0031,0x0030,0x0036,0x0034,0x0036,0x002D,0x0055,0x0043,0x0053,0x002D,0x0042,0x0061,0x0073,0x0069,0x0063,0x00 }
, { 0x0063,0x0073,0x0055,0x006E,0x0069,0x0063,0x006F,0x0064,0x0065,0x0041,0x0053,0x0043,0x0049,0x0049,0x00 }
, { 0x0049,0x0053,0x004F,0x002D,0x0031,0x0030,0x0036,0x0034,0x0036,0x002D,0x0055,0x006E,0x0069,0x0063,0x006F,0x0064,0x0065,0x002D,0x004C,0x0061,0x0074,0x0069,0x006E,0x0031,0x00 }
, { 0x0063,0x0073,0x0055,0x006E,0x0069,0x0063,0x006F,0x0064,0x0065,0x004C,0x0061,0x0074,0x0069,0x006E,0x0031,0x00 }
, { 0x0049,0x0053,0x004F,0x002D,0x0031,0x0030,0x0036,0x0034,0x0036,0x00 }
, { 0x0049,0x0053,0x004F,0x002D,0x0031,0x0030,0x0036,0x0034,0x0036,0x002D,0x004A,0x002D,0x0031,0x00 }
, { 0x0049,0x0053,0x004F,0x002D,0x0055,0x006E,0x0069,0x0063,0x006F,0x0064,0x0065,0x002D,0x0049,0x0042,0x004D,0x002D,0x0031,0x0032,0x0036,0x0031,0x00 }
, { 0x0063,0x0073,0x0055,0x006E,0x0069,0x0063,0x006F,0x0064,0x0065,0x0049,0x0042,0x004D,0x0031,0x0032,0x0036,0x0031,0x00 }
, { 0x0049,0x0053,0x004F,0x002D,0x0055,0x006E,0x0069,0x0063,0x006F,0x0064,0x0065,0x002D,0x0049,0x0042,0x004D,0x002D,0x0031,0x0032,0x0036,0x0038,0x00 }
, { 0x0063,0x0073,0x0055,0x006E,0x0069,0x0063,0x006F,0x0064,0x0065,0x0049,0x0042,0x004D,0x0031,0x0032,0x0036,0x0038,0x00 }
, { 0x0049,0x0053,0x004F,0x002D,0x0055,0x006E,0x0069,0x0063,0x006F,0x0064,0x0065,0x002D,0x0049,0x0042,0x004D,0x002D,0x0031,0x0032,0x0037,0x0036,0x00 }
, { 0x0063,0x0073,0x0055,0x006E,0x0069,0x0063,0x006F,0x0064,0x0065,0x0049,0x0042,0x004D,0x0031,0x0032,0x0037,0x0036,0x00 }
, { 0x0049,0x0053,0x004F,0x002D,0x0055,0x006E,0x0069,0x0063,0x006F,0x0064,0x0065,0x002D,0x0049,0x0042,0x004D,0x002D,0x0031,0x0032,0x0036,0x0034,0x00 }
, { 0x0063,0x0073,0x0055,0x006E,0x0069,0x0063,0x006F,0x0064,0x0065,0x0049,0x0042,0x004D,0x0031,0x0032,0x0036,0x0034,0x00 }
, { 0x0049,0x0053,0x004F,0x002D,0x0055,0x006E,0x0069,0x0063,0x006F,0x0064,0x0065,0x002D,0x0049,0x0042,0x004D,0x002D,0x0031,0x0032,0x0036,0x0035,0x00 }
, { 0x0063,0x0073,0x0055,0x006E,0x0069,0x0063,0x006F,0x0064,0x0065,0x0049,0x0042,0x004D,0x0031,0x0032,0x0036,0x0035,0x00 }
, { 0x0049,0x0053,0x004F,0x002D,0x0038,0x0038,0x0035,0x0039,0x002D,0x0031,0x002D,0x0057,0x0069,0x006E,0x0064,0x006F,0x0077,0x0073,0x002D,0x0033,0x002E,0x0030,0x002D,0x004C,0x0061,0x0074,0x0069,0x006E,0x002D,0x0031,0x00 }
, { 0x0063,0x0073,0x0057,0x0069,0x006E,0x0064,0x006F,0x0077,0x0073,0x0033,0x0030,0x004C,0x0061,0x0074,0x0069,0x006E,0x0031,0x00 }
, { 0x0049,0x0053,0x004F,0x002D,0x0038,0x0038,0x0035,0x0039,0x002D,0x0031,0x002D,0x0057,0x0069,0x006E,0x0064,0x006F,0x0077,0x0073,0x002D,0x0033,0x002E,0x0031,0x002D,0x004C,0x0061,0x0074,0x0069,0x006E,0x002D,0x0031,0x00 }
, { 0x0063,0x0073,0x0057,0x0069,0x006E,0x0064,0x006F,0x0077,0x0073,0x0033,0x0031,0x004C,0x0061,0x0074,0x0069,0x006E,0x0031,0x00 }
, { 0x0049,0x0053,0x004F,0x002D,0x0038,0x0038,0x0035,0x0039,0x002D,0x0032,0x002D,0x0057,0x0069,0x006E,0x0064,0x006F,0x0077,0x0073,0x002D,0x004C,0x0061,0x0074,0x0069,0x006E,0x002D,0x0032,0x00 }
, { 0x0063,0x0073,0x0057,0x0069,0x006E,0x0064,0x006F,0x0077,0x0073,0x0033,0x0031,0x004C,0x0061,0x0074,0x0069,0x006E,0x0032,0x00 }
, { 0x0049,0x0053,0x004F,0x002D,0x0038,0x0038,0x0035,0x0039,0x002D,0x0039,0x002D,0x0057,0x0069,0x006E,0x0064,0x006F,0x0077,0x0073,0x002D,0x004C,0x0061,0x0074,0x0069,0x006E,0x002D,0x0035,0x00 }
, { 0x0063,0x0073,0x0057,0x0069,0x006E,0x0064,0x006F,0x0077,0x0073,0x0033,0x0031,0x004C,0x0061,0x0074,0x0069,0x006E,0x0035,0x00 }
, { 0x0041,0x0064,0x006F,0x0062,0x0065,0x002D,0x0053,0x0074,0x0061,0x006E,0x0064,0x0061,0x0072,0x0064,0x002D,0x0045,0x006E,0x0063,0x006F,0x0064,0x0069,0x006E,0x0067,0x00 }
, { 0x0063,0x0073,0x0041,0x0064,0x006F,0x0062,0x0065,0x0053,0x0074,0x0061,0x006E,0x0064,0x0061,0x0072,0x0064,0x0045,0x006E,0x0063,0x006F,0x0064,0x0069,0x006E,0x0067,0x00 }
, { 0x0056,0x0065,0x006E,0x0074,0x0075,0x0072,0x0061,0x002D,0x0055,0x0053,0x00 }
, { 0x0063,0x0073,0x0056,0x0065,0x006E,0x0074,0x0075,0x0072,0x0061,0x0055,0x0053,0x00 }
, { 0x0056,0x0065,0x006E,0x0074,0x0075,0x0072,0x0061,0x002D,0x0049,0x006E,0x0074,0x0065,0x0072,0x006E,0x0061,0x0074,0x0069,0x006F,0x006E,0x0061,0x006C,0x00 }
, { 0x0063,0x0073,0x0056,0x0065,0x006E,0x0074,0x0075,0x0072,0x0061,0x0049,0x006E,0x0074,0x0065,0x0072,0x006E,0x0061,0x0074,0x0069,0x006F,0x006E,0x0061,0x006C,0x00 }
, { 0x0050,0x0043,0x0038,0x002D,0x0044,0x0061,0x006E,0x0069,0x0073,0x0068,0x002D,0x004E,0x006F,0x0072,0x0077,0x0065,0x0067,0x0069,0x0061,0x006E,0x00 }
, { 0x0063,0x0073,0x0050,0x0043,0x0038,0x0044,0x0061,0x006E,0x0069,0x0073,0x0068,0x004E,0x006F,0x0072,0x0077,0x0065,0x0067,0x0069,0x0061,0x006E,0x00 }
, { 0x0050,0x0043,0x0038,0x002D,0x0054,0x0075,0x0072,0x006B,0x0069,0x0073,0x0068,0x00 }
, { 0x0063,0x0073,0x0050,0x0043,0x0038,0x0054,0x0075,0x0072,0x006B,0x0069,0x0073,0x0068,0x00 }
, { 0x0049,0x0042,0x004D,0x002D,0x0053,0x0079,0x006D,0x0062,0x006F,0x006C,0x0073,0x00 }
, { 0x0063,0x0073,0x0049,0x0042,0x004D,0x0053,0x0079,0x006D,0x0062,0x006F,0x006C,0x0073,0x00 }
, { 0x0049,0x0042,0x004D,0x002D,0x0054,0x0068,0x0061,0x0069,0x00 }
, { 0x0063,0x0073,0x0049,0x0042,0x004D,0x0054,0x0068,0x0061,0x0069,0x00 }
, { 0x0048,0x0050,0x002D,0x004C,0x0065,0x0067,0x0061,0x006C,0x00 }
, { 0x0063,0x0073,0x0048,0x0050,0x004C,0x0065,0x0067,0x0061,0x006C,0x00 }
, { 0x0048,0x0050,0x002D,0x0050,0x0069,0x002D,0x0066,0x006F,0x006E,0x0074,0x00 }
, { 0x0063,0x0073,0x0048,0x0050,0x0050,0x0069,0x0046,0x006F,0x006E,0x0074,0x00 }
, { 0x0048,0x0050,0x002D,0x004D,0x0061,0x0074,0x0068,0x0038,0x00 }
, { 0x0063,0x0073,0x0048,0x0050,0x004D,0x0061,0x0074,0x0068,0x0038,0x00 }
, { 0x0041,0x0064,0x006F,0x0062,0x0065,0x002D,0x0053,0x0079,0x006D,0x0062,0x006F,0x006C,0x002D,0x0045,0x006E,0x0063,0x006F,0x0064,0x0069,0x006E,0x0067,0x00 }
, { 0x0063,0x0073,0x0048,0x0050,0x0050,0x0053,0x004D,0x0061,0x0074,0x0068,0x00 }
, { 0x0048,0x0050,0x002D,0x0044,0x0065,0x0073,0x006B,0x0054,0x006F,0x0070,0x00 }
, { 0x0063,0x0073,0x0048,0x0050,0x0044,0x0065,0x0073,0x006B,0x0074,0x006F,0x0070,0x00 }
, { 0x0056,0x0065,0x006E,0x0074,0x0075,0x0072,0x0061,0x002D,0x004D,0x0061,0x0074,0x0068,0x00 }
, { 0x0063,0x0073,0x0056,0x0065,0x006E,0x0074,0x0075,0x0072,0x0061,0x004D,0x0061,0x0074,0x0068,0x00 }
, { 0x004D,0x0069,0x0063,0x0072,0x006F,0x0073,0x006F,0x0066,0x0074,0x002D,0x0050,0x0075,0x0062,0x006C,0x0069,0x0073,0x0068,0x0069,0x006E,0x0067,0x00 }
, { 0x0063,0x0073,0x004D,0x0069,0x0063,0x0072,0x006F,0x0073,0x006F,0x0066,0x0074,0x0050,0x0075,0x0062,0x006C,0x0069,0x0073,0x0068,0x0069,0x006E,0x0067,0x00 }
, { 0x0057,0x0069,0x006E,0x0064,0x006F,0x0077,0x0073,0x002D,0x0033,0x0031,0x004A,0x00 }
, { 0x0063,0x0073,0x0057,0x0069,0x006E,0x0064,0x006F,0x0077,0x0073,0x0033,0x0031,0x004A,0x00 }
, { 0x0047,0x0042,0x0032,0x0033,0x0031,0x0032,0x00 }
, { 0x0063,0x0073,0x0047,0x0042,0x0032,0x0033,0x0031,0x0032,0x00 }
, { 0x0042,0x0069,0x0067,0x0035,0x00 }
, { 0x0063,0x0073,0x0042,0x0069,0x0067,0x0035,0x00 }
, { 0x0077,0x0069,0x006E,0x0064,0x006F,0x0077,0x0073,0x002D,0x0031,0x0032,0x0035,0x0030,0x00 }
, { 0x0077,0x0069,0x006E,0x0064,0x006F,0x0077,0x0073,0x002D,0x0031,0x0032,0x0035,0x0031,0x00 }
, { 0x0077,0x0069,0x006E,0x0064,0x006F,0x0077,0x0073,0x002D,0x0031,0x0032,0x0035,0x0032,0x00 }
, { 0x0077,0x0069,0x006E,0x0064,0x006F,0x0077,0x0073,0x002D,0x0031,0x0032,0x0035,0x0033,0x00 }
, { 0x0077,0x0069,0x006E,0x0064,0x006F,0x0077,0x0073,0x002D,0x0031,0x0032,0x0035,0x0034,0x00 }
, { 0x0077,0x0069,0x006E,0x0064,0x006F,0x0077,0x0073,0x002D,0x0031,0x0032,0x0035,0x0035,0x00 }
, { 0x0077,0x0069,0x006E,0x0064,0x006F,0x0077,0x0073,0x002D,0x0031,0x0032,0x0035,0x0036,0x00 }
, { 0x0077,0x0069,0x006E,0x0064,0x006F,0x0077,0x0073,0x002D,0x0031,0x0032,0x0035,0x0037,0x00 }
, { 0x0077,0x0069,0x006E,0x0064,0x006F,0x0077,0x0073,0x002D,0x0031,0x0032,0x0035,0x0038,0x00 }
, { 0x0054,0x0049,0x0053,0x002D,0x0036,0x0032,0x0030,0x00 }
, { 0x0048,0x005A,0x002D,0x0047,0x0042,0x002D,0x0032,0x0033,0x0031,0x0032,0x00 }
};
const unsigned int gEncodingArraySize = 791;
XERCES_CPP_NAMESPACE_END
#endif
File diff suppressed because it is too large Load Diff
+308
View File
@@ -0,0 +1,308 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* $Id: IGXMLScanner.hpp 882548 2009-11-20 13:44:14Z borisk $
*/
#if !defined(XERCESC_INCLUDE_GUARD_IGXMLSCANNER_HPP)
#define XERCESC_INCLUDE_GUARD_IGXMLSCANNER_HPP
#include <xercesc/internal/XMLScanner.hpp>
#include <xercesc/util/KVStringPair.hpp>
#include <xercesc/util/NameIdPool.hpp>
#include <xercesc/util/RefHash2KeysTableOf.hpp>
#include <xercesc/util/RefHash3KeysIdPool.hpp>
#include <xercesc/util/Hash2KeysSetOf.hpp>
#include <xercesc/validators/common/Grammar.hpp>
#include <xercesc/validators/schema/SchemaInfo.hpp>
#include <xercesc/validators/schema/SchemaElementDecl.hpp>
XERCES_CPP_NAMESPACE_BEGIN
class DTDElementDecl;
class DTDGrammar;
class DTDValidator;
class SchemaValidator;
class IdentityConstraintHandler;
class IdentityConstraint;
class ContentLeafNameTypeVector;
class SchemaAttDef;
class XMLContentModel;
class XSModel;
class PSVIAttributeList;
class PSVIElement;
// This is an integrated scanner class, which does DTD/XML Schema grammar
// processing.
class XMLPARSER_EXPORT IGXMLScanner : public XMLScanner
{
public :
// -----------------------------------------------------------------------
// Constructors and Destructor
// -----------------------------------------------------------------------
IGXMLScanner
(
XMLValidator* const valToAdopt
, GrammarResolver* const grammarResolver
, MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
);
IGXMLScanner
(
XMLDocumentHandler* const docHandler
, DocTypeHandler* const docTypeHandler
, XMLEntityHandler* const entityHandler
, XMLErrorReporter* const errReporter
, XMLValidator* const valToAdopt
, GrammarResolver* const grammarResolver
, MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
);
virtual ~IGXMLScanner();
// -----------------------------------------------------------------------
// XMLScanner public virtual methods
// -----------------------------------------------------------------------
virtual const XMLCh* getName() const;
virtual NameIdPool<DTDEntityDecl>* getEntityDeclPool();
virtual const NameIdPool<DTDEntityDecl>* getEntityDeclPool() const;
virtual void scanDocument
(
const InputSource& src
);
virtual bool scanNext(XMLPScanToken& toFill);
virtual Grammar* loadGrammar
(
const InputSource& src
, const short grammarType
, const bool toCache = false
);
virtual void resetCachedGrammar ();
virtual Grammar::GrammarType getCurrentGrammarType() const;
private :
// -----------------------------------------------------------------------
// Unimplemented constructors and operators
// -----------------------------------------------------------------------
IGXMLScanner();
IGXMLScanner(const IGXMLScanner&);
IGXMLScanner& operator=(const IGXMLScanner&);
// -----------------------------------------------------------------------
// XMLScanner virtual methods
// -----------------------------------------------------------------------
virtual void scanCDSection();
virtual void scanCharData(XMLBuffer& toToUse);
virtual EntityExpRes scanEntityRef
(
const bool inAttVal
, XMLCh& firstCh
, XMLCh& secondCh
, bool& escaped
);
virtual void scanDocTypeDecl();
virtual void scanReset(const InputSource& src);
virtual void sendCharData(XMLBuffer& toSend);
virtual InputSource* resolveSystemId(const XMLCh* const sysId
,const XMLCh* const pubId);
// -----------------------------------------------------------------------
// Private helper methods
// -----------------------------------------------------------------------
void commonInit();
void cleanUp();
XMLSize_t buildAttList
(
const RefVectorOf<KVStringPair>& providedAttrs
, const XMLSize_t attCount
, XMLElementDecl* elemDecl
, RefVectorOf<XMLAttr>& toFill
);
bool normalizeAttValue
(
const XMLAttDef* const attDef
, const XMLCh* const name
, const XMLCh* const value
, XMLBuffer& toFill
);
bool normalizeAttRawValue
(
const XMLCh* const attrName
, const XMLCh* const value
, XMLBuffer& toFill
);
void updateNSMap
(
const XMLCh* const attrName
, const XMLCh* const attrValue
);
void updateNSMap
(
const XMLCh* const attrName
, const XMLCh* const attrValue
, const int colonPosition
);
void scanRawAttrListforNameSpaces(XMLSize_t attCount);
void parseSchemaLocation(const XMLCh* const schemaLocationStr, bool ignoreLoadSchema = false);
void resolveSchemaGrammar(const XMLCh* const loc, const XMLCh* const uri, bool ignoreLoadSchema = false);
bool switchGrammar(const XMLCh* const newGrammarNameSpace);
bool laxElementValidation(QName* element, ContentLeafNameTypeVector* cv,
const XMLContentModel* const cm,
const XMLSize_t parentElemDepth);
bool anyAttributeValidation(SchemaAttDef* attWildCard,
unsigned int uriId,
bool& skipThisOne,
bool& laxThisOne);
void resizeElemState();
void processSchemaLocation(XMLCh* const schemaLoc);
void resizeRawAttrColonList();
// -----------------------------------------------------------------------
// Private scanning methods
// -----------------------------------------------------------------------
bool basicAttrValueScan
(
const XMLCh* const attrName
, XMLBuffer& toFill
);
XMLSize_t rawAttrScan
(
const XMLCh* const elemName
, RefVectorOf<KVStringPair>& toFill
, bool& isEmpty
);
bool scanAttValue
(
const XMLAttDef* const attDef
, const XMLCh* const attrName
, XMLBuffer& toFill
);
bool scanContent();
void scanEndTag(bool& gotData);
bool scanStartTag(bool& gotData);
bool scanStartTagNS(bool& gotData);
// -----------------------------------------------------------------------
// IdentityConstraints Activation methods
// -----------------------------------------------------------------------
inline bool toCheckIdentityConstraint() const;
// -----------------------------------------------------------------------
// Grammar preparsing methods
// -----------------------------------------------------------------------
Grammar* loadXMLSchemaGrammar(const InputSource& src, const bool toCache = false);
Grammar* loadDTDGrammar(const InputSource& src, const bool toCache = false);
// -----------------------------------------------------------------------
// PSVI handling methods
// -----------------------------------------------------------------------
void endElementPSVI(SchemaElementDecl* const elemDecl,
DatatypeValidator* const memberDV);
void resetPSVIElemContext();
// -----------------------------------------------------------------------
// Data members
//
// fRawAttrList
// During the initial scan of the attributes we can only do a raw
// scan for key/value pairs. So this vector is used to store them
// until they can be processed (and put into fAttrList.)
//
// fDTDValidator
// The DTD validator instance.
//
// fSchemaValidator
// The Schema validator instance.
//
// fSeeXsi
// This flag indicates a schema has been seen.
//
// fElemState
// fElemLoopState
// fElemStateSize
// Stores an element next state from DFA content model - used for
// wildcard validation
//
// fDTDElemNonDeclPool
// registry of "faulted-in" DTD element decls
// fSchemaElemNonDeclPool
// registry for elements without decls in the grammar
// fElemCount
// count of the number of start tags seen so far (starts at 1).
// Used for duplicate attribute detection/processing of required/defaulted attributes
// fAttDefRegistry
// mapping from XMLAttDef instances to the count of the last
// start tag where they were utilized.
// fUndeclaredAttrRegistry
// set of attr QNames to detect duplicates
// fPSVIAttrList
// PSVI attribute list implementation that needs to be
// filled when a PSVIHandler is registered
// fSchemaInfoList
// Transient schema info list that is passed to TraverseSchema instances.
// fCachedSchemaInfoList
// Cached Schema info list that is passed to TraverseSchema instances.
//
// -----------------------------------------------------------------------
bool fSeeXsi;
Grammar::GrammarType fGrammarType;
unsigned int fElemStateSize;
unsigned int* fElemState;
unsigned int* fElemLoopState;
XMLBuffer fContent;
RefVectorOf<KVStringPair>* fRawAttrList;
unsigned int fRawAttrColonListSize;
int* fRawAttrColonList;
DTDValidator* fDTDValidator;
SchemaValidator* fSchemaValidator;
DTDGrammar* fDTDGrammar;
IdentityConstraintHandler* fICHandler;
ValueVectorOf<XMLCh*>* fLocationPairs;
NameIdPool<DTDElementDecl>* fDTDElemNonDeclPool;
RefHash3KeysIdPool<SchemaElementDecl>* fSchemaElemNonDeclPool;
unsigned int fElemCount;
RefHashTableOf<unsigned int, PtrHasher>*fAttDefRegistry;
Hash2KeysSetOf<StringHasher>* fUndeclaredAttrRegistry;
PSVIAttributeList * fPSVIAttrList;
XSModel* fModel;
PSVIElement* fPSVIElement;
ValueStackOf<bool>* fErrorStack;
PSVIElemContext fPSVIElemContext;
RefHash2KeysTableOf<SchemaInfo>* fSchemaInfoList;
RefHash2KeysTableOf<SchemaInfo>* fCachedSchemaInfoList;
};
inline const XMLCh* IGXMLScanner::getName() const
{
return XMLUni::fgIGXMLScanner;
}
inline bool IGXMLScanner::toCheckIdentityConstraint() const
{
return fValidate && fIdentityConstraintChecking && fICHandler;
}
inline Grammar::GrammarType IGXMLScanner::getCurrentGrammarType() const
{
return fGrammarType;
}
XERCES_CPP_NAMESPACE_END
#endif
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,57 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* $Id: MemoryManagerImpl.cpp 1662868 2015-02-28 00:52:04Z scantor $
*/
// ---------------------------------------------------------------------------
// Includes
// ---------------------------------------------------------------------------
#include <xercesc/internal/MemoryManagerImpl.hpp>
#include <xercesc/util/OutOfMemoryException.hpp>
XERCES_CPP_NAMESPACE_BEGIN
MemoryManager* MemoryManagerImpl::getExceptionMemoryManager()
{
return this;
}
void* MemoryManagerImpl::allocate(XMLSize_t size)
{
void* memptr;
try {
memptr = ::operator new(size);
}
catch(...) {
throw OutOfMemoryException();
}
if(memptr==NULL && size!=0)
throw OutOfMemoryException();
return memptr;
}
void MemoryManagerImpl::deallocate(void* p)
{
if (p)
::operator delete(p);
}
XERCES_CPP_NAMESPACE_END
@@ -0,0 +1,106 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* $Id: MemoryManagerImpl.hpp 673975 2008-07-04 09:23:56Z borisk $
*/
#if !defined(XERCESC_INCLUDE_GUARD_MEMORYMANAGERIMPL_HPP)
#define XERCESC_INCLUDE_GUARD_MEMORYMANAGERIMPL_HPP
#include <xercesc/framework/MemoryManager.hpp>
XERCES_CPP_NAMESPACE_BEGIN
/**
* Configurable memory manager
*
* <p>This is Xerces default implementation of the memory
* manager interface, which will be instantiated and used
* in the absence of an application's memory manager.
* </p>
*/
class XMLUTIL_EXPORT MemoryManagerImpl : public MemoryManager
{
public:
/** @name Constructor */
//@{
/**
* Default constructor
*/
MemoryManagerImpl()
{
}
//@}
/** @name Destructor */
//@{
/**
* Default destructor
*/
virtual ~MemoryManagerImpl()
{
}
//@}
/**
* This method is called to obtain the memory manager that should be
* used to allocate memory used in exceptions.
*
* @return A pointer to the memory manager
*/
virtual MemoryManager* getExceptionMemoryManager();
/** @name The virtual methods in MemoryManager */
//@{
/**
* This method allocates requested memory.
*
* @param size The requested memory size
*
* @return A pointer to the allocated memory
*/
virtual void* allocate(XMLSize_t size);
/**
* This method deallocates memory
*
* @param p The pointer to the allocated memory to be deleted
*/
virtual void deallocate(void* p);
//@}
private:
// -----------------------------------------------------------------------
// Unimplemented constructors and operators
// -----------------------------------------------------------------------
MemoryManagerImpl(const MemoryManagerImpl&);
MemoryManagerImpl& operator=(const MemoryManagerImpl&);
};
XERCES_CPP_NAMESPACE_END
#endif
File diff suppressed because it is too large Load Diff
+447
View File
@@ -0,0 +1,447 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* $Id: ReaderMgr.hpp 833045 2009-11-05 13:21:27Z borisk $
*/
#if !defined(XERCESC_INCLUDE_GUARD_READERMGR_HPP)
#define XERCESC_INCLUDE_GUARD_READERMGR_HPP
#include <xercesc/internal/XMLReader.hpp>
#include <xercesc/util/PlatformUtils.hpp>
#include <xercesc/util/RefStackOf.hpp>
#include <xercesc/sax/Locator.hpp>
#include <xercesc/framework/XMLBuffer.hpp>
XERCES_CPP_NAMESPACE_BEGIN
class XMLEntityDecl;
class XMLEntityHandler;
class XMLDocumentHandler;
class XMLScanner;
// ---------------------------------------------------------------------------
// This class is used by the scanner. The scanner must deal with expansion
// of entities, some of which are totally different files (external parsed
// entities.) It does so by pushing readers onto a stack. The top reader is
// the one it wants to read out of, but that one must be popped when it is
// empty. To keep that logic from being all over the place, the scanner
// talks to the reader manager, which handles the stack and popping off
// used up readers.
// ---------------------------------------------------------------------------
class XMLPARSER_EXPORT ReaderMgr : public XMemory
, public Locator
{
public :
// -----------------------------------------------------------------------
// Class specific types
// -----------------------------------------------------------------------
struct LastExtEntityInfo : public XMemory
{
const XMLCh* systemId;
const XMLCh* publicId;
XMLFileLoc lineNumber;
XMLFileLoc colNumber;
};
// -----------------------------------------------------------------------
// Constructors and Destructor
// -----------------------------------------------------------------------
ReaderMgr(MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager);
~ReaderMgr();
// -----------------------------------------------------------------------
// Convenience scanning methods
//
// This are all convenience methods that work in terms of the core
// character spooling methods.
// -----------------------------------------------------------------------
bool atEOF() const;
bool getName(XMLBuffer& toFill);
bool getQName(XMLBuffer& toFill, int* colonPosition);
bool getNameToken(XMLBuffer& toFill);
XMLCh getNextChar();
bool getNextCharIfNot(const XMLCh chNotToGet, XMLCh& chGotten);
void movePlainContentChars(XMLBuffer &dest);
void getSpaces(XMLBuffer& toFill);
void getUpToCharOrWS(XMLBuffer& toFill, const XMLCh toCheck);
bool isEmpty() const;
bool lookingAtChar(const XMLCh toCheck);
bool lookingAtSpace();
XMLCh peekNextChar();
bool skipIfQuote(XMLCh& chGotten);
void skipPastChar(const XMLCh toSkip);
void skipPastSpaces(bool& skippedSomething, bool inDecl = false);
void skipPastSpaces();
void skipToChar(const XMLCh toSkipTo);
bool skippedChar(const XMLCh toSkip);
bool skippedSpace();
bool skippedString(const XMLCh* const toSkip);
bool skippedStringLong(const XMLCh* const toSkip);
void skipQuotedString(const XMLCh quoteCh);
XMLCh skipUntilIn(const XMLCh* const listToSkip);
XMLCh skipUntilInOrWS(const XMLCh* const listToSkip);
bool peekString(const XMLCh* const toPeek);
// -----------------------------------------------------------------------
// Control methods
// -----------------------------------------------------------------------
void cleanStackBackTo(const XMLSize_t readerNum);
XMLReader* createReader
(
const InputSource& src
, const bool xmlDecl
, const XMLReader::RefFrom refFrom
, const XMLReader::Types type
, const XMLReader::Sources source
, const bool calcSrsOfs = true
, XMLSize_t lowWaterMark = 100
);
XMLReader* createReader
(
const XMLCh* const sysId
, const XMLCh* const pubId
, const bool xmlDecl
, const XMLReader::RefFrom refFrom
, const XMLReader::Types type
, const XMLReader::Sources source
, InputSource*& srcToFill
, const bool calcSrcOfs = true
, XMLSize_t lowWaterMark = 100
, const bool disableDefaultEntityResolution = false
);
XMLReader* createReader
(
const XMLCh* const baseURI
, const XMLCh* const sysId
, const XMLCh* const pubId
, const bool xmlDecl
, const XMLReader::RefFrom refFrom
, const XMLReader::Types type
, const XMLReader::Sources source
, InputSource*& srcToFill
, const bool calcSrcOfs = true
, XMLSize_t lowWaterMark = 100
, const bool disableDefaultEntityResolution = false
);
XMLReader* createIntEntReader
(
const XMLCh* const sysId
, const XMLReader::RefFrom refFrom
, const XMLReader::Types type
, const XMLCh* const dataBuf
, const XMLSize_t dataLen
, const bool copyBuf
, const bool calcSrcOfs = true
, XMLSize_t lowWaterMark = 100
);
bool isScanningPERefOutOfLiteral() const;
bool pushReader
(
XMLReader* const reader
, XMLEntityDecl* const entity
);
void reset();
// -----------------------------------------------------------------------
// Getter methods
// -----------------------------------------------------------------------
const XMLCh* getCurrentEncodingStr() const;
const XMLEntityDecl* getCurrentEntity() const;
XMLEntityDecl* getCurrentEntity();
const XMLReader* getCurrentReader() const;
XMLReader* getCurrentReader();
XMLSize_t getCurrentReaderNum() const;
XMLSize_t getReaderDepth() const;
void getLastExtEntityInfo(LastExtEntityInfo& lastInfo) const;
XMLFilePos getSrcOffset() const;
bool getThrowEOE() const;
// -----------------------------------------------------------------------
// Setter methods
// -----------------------------------------------------------------------
void setEntityHandler(XMLEntityHandler* const newHandler);
void setThrowEOE(const bool newValue);
void setXMLVersion(const XMLReader::XMLVersion version);
void setStandardUriConformant(const bool newValue);
// -----------------------------------------------------------------------
// Implement the SAX Locator interface
// -----------------------------------------------------------------------
virtual const XMLCh* getPublicId() const;
virtual const XMLCh* getSystemId() const;
virtual XMLFileLoc getLineNumber() const;
virtual XMLFileLoc getColumnNumber() const;
private :
// -----------------------------------------------------------------------
// Private helper methods
// -----------------------------------------------------------------------
const XMLReader* getLastExtEntity(const XMLEntityDecl*& itsEntity) const;
bool popReader();
// -----------------------------------------------------------------------
// Unimplemented constructors and operators
// -----------------------------------------------------------------------
ReaderMgr(const ReaderMgr&);
ReaderMgr& operator=(const ReaderMgr&);
// -----------------------------------------------------------------------
// Private data members
//
// fCurEntity
// This is the current top of stack entity. We pull it off the stack
// and store it here for efficiency.
//
// fCurReader
// This is the current top of stack reader. We pull it off the
// stack and store it here for efficiency.
//
// fEntityHandler
// This is the installed entity handler. Its installed via the
// scanner but he passes it on to us since we need it the most, in
// process of creating external entity readers.
//
// fEntityStack
// We need to keep up with which of the pushed readers are pushed
// entity values that are being spooled. This is done to avoid the
// problem of recursive definitions. This stack consists of refs to
// EntityDecl objects for the pushed entities.
//
// fNextReaderNum
// This is the reader serial number value. Each new reader that is
// created from this reader is given a successive number. This lets
// us catch things like partial markup errors and such.
//
// fReaderStack
// This is the stack of reader references. We own all the readers
// and destroy them when they are used up.
//
// fThrowEOE
// This flag controls whether we throw an exception when we hit an
// end of entity. The scanner doesn't really need to know about ends
// of entities in the int/ext subsets, so it will turn this flag off
// until it gets into the content usually.
//
// fXMLVersion
// Enum to indicate if each Reader should be created as XML 1.1 or
// XML 1.0 conformant
//
// fStandardUriConformant
// This flag controls whether we force conformant URI
// -----------------------------------------------------------------------
XMLEntityDecl* fCurEntity;
XMLReader* fCurReader;
XMLEntityHandler* fEntityHandler;
RefStackOf<XMLEntityDecl>* fEntityStack;
unsigned int fNextReaderNum;
RefStackOf<XMLReader>* fReaderStack;
bool fThrowEOE;
XMLReader::XMLVersion fXMLVersion;
bool fStandardUriConformant;
MemoryManager* fMemoryManager;
};
// ---------------------------------------------------------------------------
// ReaderMgr: Inlined methods
//
// NOTE: We cannot put these in alphabetical and type order as we usually
// do because some of the compilers we have to support are too stupid to
// understand out of order inlines!
// ---------------------------------------------------------------------------
inline XMLSize_t ReaderMgr::getCurrentReaderNum() const
{
return fCurReader->getReaderNum();
}
inline const XMLReader* ReaderMgr::getCurrentReader() const
{
return fCurReader;
}
inline XMLReader* ReaderMgr::getCurrentReader()
{
return fCurReader;
}
inline bool ReaderMgr::getName(XMLBuffer& toFill)
{
toFill.reset();
return fCurReader->getName(toFill, false);
}
inline bool ReaderMgr::getQName(XMLBuffer& toFill, int *colonPosition)
{
toFill.reset();
return fCurReader->getQName(toFill, colonPosition);
}
inline bool ReaderMgr::getNameToken(XMLBuffer& toFill)
{
toFill.reset();
return fCurReader->getName(toFill, true);
}
inline bool ReaderMgr::getNextCharIfNot(const XMLCh chNotToGet, XMLCh& chGotten)
{
return fCurReader->getNextCharIfNot(chNotToGet, chGotten);
}
inline void ReaderMgr::movePlainContentChars(XMLBuffer &dest)
{
fCurReader->movePlainContentChars(dest);
}
inline bool ReaderMgr::getThrowEOE() const
{
return fThrowEOE;
}
inline XMLFilePos ReaderMgr::getSrcOffset() const
{
return fCurReader? fCurReader->getSrcOffset() : 0;
}
inline bool ReaderMgr::lookingAtChar(const XMLCh chToCheck)
{
return (chToCheck == peekNextChar());
}
inline bool ReaderMgr::lookingAtSpace()
{
XMLCh c = peekNextChar();
return fCurReader->isWhitespace(c);
}
inline void ReaderMgr::setThrowEOE(const bool newValue)
{
fThrowEOE = newValue;
}
inline void ReaderMgr::setStandardUriConformant(const bool newValue)
{
fStandardUriConformant = newValue;
}
inline bool ReaderMgr::skippedString(const XMLCh* const toSkip)
{
return fCurReader->skippedString(toSkip);
}
inline bool ReaderMgr::skippedStringLong(const XMLCh* const toSkip)
{
return fCurReader->skippedStringLong(toSkip);
}
inline void ReaderMgr::skipToChar(const XMLCh toSkipTo)
{
XMLCh nextCh = 0;
do
{
// Get chars until we find the one to skip
nextCh = getNextChar();
}
// Break out at end of input or the char to skip
while((nextCh != toSkipTo) && nextCh!=0);
}
inline void ReaderMgr::skipPastChar(const XMLCh toSkipPast)
{
XMLCh nextCh = 0;
do
{
// Get chars until we find the one to skip
nextCh = getNextChar();
}
while((nextCh != toSkipPast) && nextCh!=0);
}
inline bool ReaderMgr::peekString(const XMLCh* const toPeek)
{
return fCurReader->peekString(toPeek);
}
inline void ReaderMgr::setEntityHandler(XMLEntityHandler* const newHandler)
{
fEntityHandler = newHandler;
}
inline void ReaderMgr::setXMLVersion(const XMLReader::XMLVersion version)
{
fXMLVersion = version;
fCurReader->setXMLVersion(version);
}
//
// This is a simple class to temporarily change the 'throw at end of entity'
// flag of the reader manager. There are some places where we need to
// turn this on and off on a scoped basis.
//
class XMLPARSER_EXPORT ThrowEOEJanitor
{
public :
// -----------------------------------------------------------------------
// Constructors and destructor
// -----------------------------------------------------------------------
ThrowEOEJanitor(ReaderMgr* mgrTarget, const bool newValue) :
fOld(mgrTarget->getThrowEOE())
, fMgr(mgrTarget)
{
mgrTarget->setThrowEOE(newValue);
}
~ThrowEOEJanitor()
{
fMgr->setThrowEOE(fOld);
};
private :
// -----------------------------------------------------------------------
// Unimplemented constructors and operators
// -----------------------------------------------------------------------
ThrowEOEJanitor(const ThrowEOEJanitor&);
ThrowEOEJanitor& operator=(const ThrowEOEJanitor&);
// -----------------------------------------------------------------------
// Private data members
//
// fOld
// The previous value of the flag, which we replaced during ctor,
// and will replace during dtor.
//
// fMgr
// A pointer to the reader manager we are going to set/reset the
// flag on.
// -----------------------------------------------------------------------
bool fOld;
ReaderMgr* fMgr;
};
XERCES_CPP_NAMESPACE_END
#endif
File diff suppressed because it is too large Load Diff
+307
View File
@@ -0,0 +1,307 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* $Id: SGXMLScanner.hpp 882548 2009-11-20 13:44:14Z borisk $
*/
#if !defined(XERCESC_INCLUDE_GUARD_SGXMLSCANNER_HPP)
#define XERCESC_INCLUDE_GUARD_SGXMLSCANNER_HPP
#include <xercesc/internal/XMLScanner.hpp>
#include <xercesc/util/KVStringPair.hpp>
#include <xercesc/util/ValueHashTableOf.hpp>
#include <xercesc/util/RefHash2KeysTableOf.hpp>
#include <xercesc/util/RefHash3KeysIdPool.hpp>
#include <xercesc/util/Hash2KeysSetOf.hpp>
#include <xercesc/validators/common/Grammar.hpp>
#include <xercesc/validators/schema/SchemaInfo.hpp>
#include <xercesc/validators/schema/SchemaElementDecl.hpp>
XERCES_CPP_NAMESPACE_BEGIN
class SchemaGrammar;
class SchemaValidator;
class IdentityConstraintHandler;
class IdentityConstraint;
class ContentLeafNameTypeVector;
class SchemaAttDef;
class XMLContentModel;
class XSModel;
class PSVIAttributeList;
class PSVIElement;
// This is a scanner class, which process XML Schema grammar.
class XMLPARSER_EXPORT SGXMLScanner : public XMLScanner
{
public :
// -----------------------------------------------------------------------
// Constructors and Destructor
// -----------------------------------------------------------------------
SGXMLScanner
(
XMLValidator* const valToAdopt
, GrammarResolver* const grammarResolver
, MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
);
SGXMLScanner
(
XMLDocumentHandler* const docHandler
, DocTypeHandler* const docTypeHandler
, XMLEntityHandler* const entityHandler
, XMLErrorReporter* const errReporter
, XMLValidator* const valToAdopt
, GrammarResolver* const grammarResolver
, MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
);
virtual ~SGXMLScanner();
// -----------------------------------------------------------------------
// XMLScanner public virtual methods
// -----------------------------------------------------------------------
virtual const XMLCh* getName() const;
virtual NameIdPool<DTDEntityDecl>* getEntityDeclPool();
virtual const NameIdPool<DTDEntityDecl>* getEntityDeclPool() const;
virtual void scanDocument
(
const InputSource& src
);
virtual bool scanNext(XMLPScanToken& toFill);
virtual Grammar* loadGrammar
(
const InputSource& src
, const short grammarType
, const bool toCache = false
);
virtual void resetCachedGrammar ();
virtual Grammar::GrammarType getCurrentGrammarType() const;
protected:
// -----------------------------------------------------------------------
// XMLScanner virtual methods
// -----------------------------------------------------------------------
virtual void scanReset(const InputSource& src);
// -----------------------------------------------------------------------
// SGXMLScanner virtual methods
// -----------------------------------------------------------------------
virtual bool scanStartTag(bool& gotData);
virtual void scanEndTag(bool& gotData);
// -----------------------------------------------------------------------
// Helper methods
// -----------------------------------------------------------------------
XMLSize_t buildAttList
(
const RefVectorOf<KVStringPair>& providedAttrs
, const XMLSize_t attCount
, XMLElementDecl* elemDecl
, RefVectorOf<XMLAttr>& toFill
);
bool laxElementValidation(QName* element, ContentLeafNameTypeVector* cv,
const XMLContentModel* const cm,
const XMLSize_t parentElemDepth);
XMLSize_t rawAttrScan
(
const XMLCh* const elemName
, RefVectorOf<KVStringPair>& toFill
, bool& isEmpty
);
void updateNSMap
(
const XMLCh* const attrName
, const XMLCh* const attrValue
);
void resizeElemState();
void updateNSMap
(
const XMLCh* const attrName
, const XMLCh* const attrValue
, const int colonPosition
);
void resizeRawAttrColonList();
// -----------------------------------------------------------------------
// Data members
//
// fRawAttrList
// During the initial scan of the attributes we can only do a raw
// scan for key/value pairs. So this vector is used to store them
// until they can be processed (and put into fAttrList.)
//
// fSchemaValidator
// The Schema validator instance.
//
// fSeeXsi
// This flag indicates a schema has been seen.
//
// fElemState
// fElemLoopState
// fElemStateSize
// Stores an element next state from DFA content model - used for
// wildcard validation
//
// fElemNonDeclPool
// registry for elements without decls in the grammar
// fElemCount
// count of the number of start tags seen so far (starts at 1).
// Used for duplicate attribute detection/processing of required/defaulted attributes
// fAttDefRegistry
// mapping from XMLAttDef instances to the count of the last
// start tag where they were utilized.
// fUndeclaredAttrRegistry
// set of namespaceId/localName pairs to detect duplicates
// fPSVIAttrList
// PSVI attribute list implementation that needs to be
// filled when a PSVIHandler is registered
// fSchemaInfoList
// Transient schema info list that is passed to TraverseSchema instances.
// fCachedSchemaInfoList
// Cached Schema info list that is passed to TraverseSchema instances.
//
// -----------------------------------------------------------------------
bool fSeeXsi;
Grammar::GrammarType fGrammarType;
unsigned int fElemStateSize;
unsigned int* fElemState;
unsigned int* fElemLoopState;
XMLBuffer fContent;
ValueHashTableOf<XMLCh>* fEntityTable;
RefVectorOf<KVStringPair>* fRawAttrList;
unsigned int fRawAttrColonListSize;
int* fRawAttrColonList;
SchemaGrammar* fSchemaGrammar;
SchemaValidator* fSchemaValidator;
IdentityConstraintHandler* fICHandler;
RefHash3KeysIdPool<SchemaElementDecl>* fElemNonDeclPool;
unsigned int fElemCount;
RefHashTableOf<unsigned int, PtrHasher>*fAttDefRegistry;
Hash2KeysSetOf<StringHasher>* fUndeclaredAttrRegistry;
PSVIAttributeList * fPSVIAttrList;
XSModel* fModel;
PSVIElement* fPSVIElement;
ValueStackOf<bool>* fErrorStack;
PSVIElemContext fPSVIElemContext;
RefHash2KeysTableOf<SchemaInfo>* fSchemaInfoList;
RefHash2KeysTableOf<SchemaInfo>* fCachedSchemaInfoList;
private :
// -----------------------------------------------------------------------
// Unimplemented constructors and operators
// -----------------------------------------------------------------------
SGXMLScanner();
SGXMLScanner(const SGXMLScanner&);
SGXMLScanner& operator=(const SGXMLScanner&);
// -----------------------------------------------------------------------
// XMLScanner virtual methods
// -----------------------------------------------------------------------
virtual void scanCDSection();
virtual void scanCharData(XMLBuffer& toToUse);
virtual EntityExpRes scanEntityRef
(
const bool inAttVal
, XMLCh& firstCh
, XMLCh& secondCh
, bool& escaped
);
virtual void scanDocTypeDecl();
virtual void sendCharData(XMLBuffer& toSend);
virtual InputSource* resolveSystemId(const XMLCh* const sysId
,const XMLCh* const pubId);
// -----------------------------------------------------------------------
// Private helper methods
// -----------------------------------------------------------------------
void commonInit();
void cleanUp();
bool normalizeAttValue
(
const XMLAttDef* const attDef
, const XMLCh* const attrName
, const XMLCh* const value
, XMLBuffer& toFill
);
bool normalizeAttRawValue
(
const XMLCh* const attrName
, const XMLCh* const value
, XMLBuffer& toFill
);
void scanRawAttrListforNameSpaces(XMLSize_t attCount);
void parseSchemaLocation(const XMLCh* const schemaLocationStr, bool ignoreLoadSchema = false);
void resolveSchemaGrammar(const XMLCh* const loc, const XMLCh* const uri, bool ignoreLoadSchema = false);
bool switchGrammar(const XMLCh* const newGrammarNameSpace);
bool anyAttributeValidation(SchemaAttDef* attWildCard,
unsigned int uriId,
bool& skipThisOne,
bool& laxThisOne);
// -----------------------------------------------------------------------
// Private scanning methods
// -----------------------------------------------------------------------
bool basicAttrValueScan
(
const XMLCh* const attrName
, XMLBuffer& toFill
);
bool scanAttValue
(
const XMLAttDef* const attDef
, XMLBuffer& toFill
);
bool scanContent();
// -----------------------------------------------------------------------
// IdentityConstraints Activation methods
// -----------------------------------------------------------------------
inline bool toCheckIdentityConstraint() const;
// -----------------------------------------------------------------------
// Grammar preparsing methods
// -----------------------------------------------------------------------
Grammar* loadXMLSchemaGrammar(const InputSource& src, const bool toCache = false);
// -----------------------------------------------------------------------
// PSVI handling methods
// -----------------------------------------------------------------------
void endElementPSVI(SchemaElementDecl* const elemDecl,
DatatypeValidator* const memberDV);
void resetPSVIElemContext();
};
inline const XMLCh* SGXMLScanner::getName() const
{
return XMLUni::fgSGXMLScanner;
}
inline bool SGXMLScanner::toCheckIdentityConstraint() const
{
return fValidate && fIdentityConstraintChecking && fICHandler;
}
inline Grammar::GrammarType SGXMLScanner::getCurrentGrammarType() const
{
return fGrammarType;
}
XERCES_CPP_NAMESPACE_END
#endif
@@ -0,0 +1,217 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* $Id: ValidationContextImpl.cpp 903149 2010-01-26 09:58:40Z borisk $
*/
// ---------------------------------------------------------------------------
// Includes
// ---------------------------------------------------------------------------
#include <xercesc/internal/ValidationContextImpl.hpp>
#include <xercesc/framework/XMLRefInfo.hpp>
#include <xercesc/validators/DTD/DTDEntityDecl.hpp>
#include <xercesc/validators/datatype/InvalidDatatypeValueException.hpp>
#include <xercesc/validators/schema/NamespaceScope.hpp>
#include <xercesc/internal/ElemStack.hpp>
#include <xercesc/internal/XMLScanner.hpp>
XERCES_CPP_NAMESPACE_BEGIN
// ---------------------------------------------------------------------------
// Constructor and Destructor
// ---------------------------------------------------------------------------
ValidationContextImpl::~ValidationContextImpl()
{
if (fIdRefList)
delete fIdRefList;
}
ValidationContextImpl::ValidationContextImpl(MemoryManager* const manager)
:ValidationContext(manager)
,fIdRefList(0)
,fEntityDeclPool(0)
,fToCheckIdRefList(true)
,fValidatingMemberType(0)
,fElemStack(0)
,fScanner(0)
,fNamespaceScope(0)
{
fIdRefList = new (fMemoryManager) RefHashTableOf<XMLRefInfo>(109, fMemoryManager);
}
/**
* IdRefList
*
*/
RefHashTableOf<XMLRefInfo>* ValidationContextImpl::getIdRefList() const
{
return fIdRefList;
}
void ValidationContextImpl::setIdRefList(RefHashTableOf<XMLRefInfo>* const newIdRefList)
{
if (fIdRefList)
delete fIdRefList;
fIdRefList = newIdRefList;
}
void ValidationContextImpl::clearIdRefList()
{
if (fIdRefList)
fIdRefList->removeAll();
}
void ValidationContextImpl::addId(const XMLCh * const content)
{
if (!fIdRefList || !fToCheckIdRefList)
return;
XMLRefInfo* idEntry = fIdRefList->get(content);
if (idEntry)
{
if (idEntry->getDeclared())
{
ThrowXMLwithMemMgr1(InvalidDatatypeValueException
, XMLExcepts::VALUE_ID_Not_Unique
, content
, fMemoryManager);
}
}
else
{
idEntry = new (fMemoryManager) XMLRefInfo(content, false, false, fMemoryManager);
fIdRefList->put((void*)idEntry->getRefName(), idEntry);
}
//
// Mark it declared
//
idEntry->setDeclared(true);
}
void ValidationContextImpl::addIdRef(const XMLCh * const content)
{
if (!fIdRefList || !fToCheckIdRefList)
return;
XMLRefInfo* idEntry = fIdRefList->get(content);
if (!idEntry)
{
idEntry = new (fMemoryManager) XMLRefInfo(content, false, false, fMemoryManager);
fIdRefList->put((void*)idEntry->getRefName(), idEntry);
}
//
// Mark it used
//
idEntry->setUsed(true);
}
void ValidationContextImpl::toCheckIdRefList(bool toCheck)
{
fToCheckIdRefList = toCheck;
}
/**
* EntityDeclPool
*
*/
const NameIdPool<DTDEntityDecl>* ValidationContextImpl::getEntityDeclPool() const
{
return fEntityDeclPool;
}
const NameIdPool<DTDEntityDecl>* ValidationContextImpl::setEntityDeclPool(const NameIdPool<DTDEntityDecl>* const newEntityDeclPool)
{
// we don't own it so we return the existing one for the owner to delete
const NameIdPool<DTDEntityDecl>* tempPool = fEntityDeclPool;
fEntityDeclPool = newEntityDeclPool;
return tempPool;
}
void ValidationContextImpl::checkEntity(const XMLCh * const content) const
{
if (fEntityDeclPool)
{
const DTDEntityDecl* decl = fEntityDeclPool->getByKey(content);
if (!decl || !decl->isUnparsed())
{
ThrowXMLwithMemMgr1(InvalidDatatypeValueException
, XMLExcepts::VALUE_ENTITY_Invalid
, content
, fMemoryManager);
}
}
else
{
ThrowXMLwithMemMgr1
(
InvalidDatatypeValueException
, XMLExcepts::VALUE_ENTITY_Invalid
, content
, fMemoryManager
);
}
}
/* QName
*/
bool ValidationContextImpl::isPrefixUnknown(XMLCh* prefix) {
bool unknown = false;
if (XMLString::equals(prefix, XMLUni::fgXMLNSString)) {
return true;
}
else if (!XMLString::equals(prefix, XMLUni::fgXMLString)) {
if(fElemStack && !fElemStack->isEmpty())
fElemStack->mapPrefixToURI(prefix, unknown);
else if(fNamespaceScope)
unknown = (fNamespaceScope->getNamespaceForPrefix(prefix)==fNamespaceScope->getEmptyNamespaceId());
}
return unknown;
}
const XMLCh* ValidationContextImpl::getURIForPrefix(XMLCh* prefix) {
bool unknown = false;
unsigned int uriId = 0;
if(fElemStack)
uriId = fElemStack->mapPrefixToURI(prefix, unknown);
else if(fNamespaceScope)
{
uriId = fNamespaceScope->getNamespaceForPrefix(prefix);
unknown = uriId == fNamespaceScope->getEmptyNamespaceId();
}
if (!unknown)
return fScanner->getURIText(uriId);
return XMLUni::fgZeroLenString;
}
XERCES_CPP_NAMESPACE_END
@@ -0,0 +1,173 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* $Id: ValidationContextImpl.hpp 729944 2008-12-29 17:03:32Z amassari $
*/
#if !defined(XERCESC_INCLUDE_GUARD_VALIDATION_CONTEXTIMPL_HPP)
#define XERCESC_INCLUDE_GUARD_VALIDATION_CONTEXTIMPL_HPP
#include <xercesc/framework/ValidationContext.hpp>
XERCES_CPP_NAMESPACE_BEGIN
class ElemStack;
class NamespaceScope;
class XMLPARSER_EXPORT ValidationContextImpl : public ValidationContext
{
public :
// -----------------------------------------------------------------------
/** @name Virtual destructor for derived classes */
// -----------------------------------------------------------------------
//@{
/**
* virtual destructor
*
*/
virtual ~ValidationContextImpl();
ValidationContextImpl(MemoryManager* const memMgr = XMLPlatformUtils::fgMemoryManager);
//@}
// -----------------------------------------------------------------------
/** @name The ValidationContextImpl Interface */
// -----------------------------------------------------------------------
//@{
/**
* IDRefList
*
*/
virtual RefHashTableOf<XMLRefInfo>* getIdRefList() const;
virtual void setIdRefList(RefHashTableOf<XMLRefInfo>* const);
virtual void clearIdRefList();
virtual void addId(const XMLCh * const );
virtual void addIdRef(const XMLCh * const );
virtual void toCheckIdRefList(bool);
/**
* EntityDeclPool
*
*/
virtual const NameIdPool<DTDEntityDecl>* getEntityDeclPool() const;
virtual const NameIdPool<DTDEntityDecl>* setEntityDeclPool(const NameIdPool<DTDEntityDecl>* const);
virtual void checkEntity(const XMLCh * const ) const;
/**
* Union datatype handling
*
*/
virtual DatatypeValidator * getValidatingMemberType() const;
virtual void setValidatingMemberType(DatatypeValidator * validatingMemberType) ;
/**
* QName datatype handling
* Create default implementations for source code compatibility
*/
virtual bool isPrefixUnknown(XMLCh* prefix);
virtual void setElemStack(ElemStack* elemStack);
virtual const XMLCh* getURIForPrefix(XMLCh* prefix);
virtual void setScanner(XMLScanner* scanner);
virtual void setNamespaceScope(NamespaceScope* nsStack);
//@}
private:
// -----------------------------------------------------------------------
/** name Unimplemented copy constructor and operator= */
// -----------------------------------------------------------------------
//@{
ValidationContextImpl(const ValidationContextImpl& );
ValidationContextImpl& operator=(const ValidationContextImpl& );
//@}
// -----------------------------------------------------------------------
// Data members
//
// fIDRefList: owned/adopted
// This is a list of XMLRefInfo objects. This member lets us do all
// needed ID-IDREF balancing checks.
//
// fEntityDeclPool: referenced only
// This is a pool of EntityDecl objects, which contains all of the
// general entities that are declared in the DTD subsets, plus the
// default entities (such as &gt; &lt; ...) defined by the XML Standard.
//
// fToAddToList
// fValidatingMemberType
// The member type in a union that actually
// validated some text. Note that the validationContext does not
// own this object, and the value of getValidatingMemberType
// will not be accurate unless the type of the most recently-validated
// element/attribute is in fact a union datatype.
// fElemStack
// Need access to elemstack to look up URI's that are inscope (while validating an XML).
// fNamespaceScope
// Need access to namespace scope to look up URI's that are inscope (while loading a schema).
// -----------------------------------------------------------------------
RefHashTableOf<XMLRefInfo>* fIdRefList;
const NameIdPool<DTDEntityDecl>* fEntityDeclPool;
bool fToCheckIdRefList;
DatatypeValidator * fValidatingMemberType;
ElemStack* fElemStack;
XMLScanner* fScanner;
NamespaceScope* fNamespaceScope;
};
inline DatatypeValidator * ValidationContextImpl::getValidatingMemberType() const
{
return fValidatingMemberType;
}
inline void ValidationContextImpl::setValidatingMemberType(DatatypeValidator * validatingMemberType)
{
fValidatingMemberType = validatingMemberType;
}
inline void ValidationContextImpl::setElemStack(ElemStack* elemStack) {
fElemStack = elemStack;
}
inline void ValidationContextImpl::setScanner(XMLScanner* scanner) {
fScanner = scanner;
}
inline void ValidationContextImpl::setNamespaceScope(NamespaceScope* nsStack) {
fNamespaceScope = nsStack;
}
XERCES_CPP_NAMESPACE_END
#endif
@@ -0,0 +1,159 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* $Id: VecAttrListImpl.cpp 672273 2008-06-27 13:57:00Z borisk $
*/
// ---------------------------------------------------------------------------
// Includes
// ---------------------------------------------------------------------------
#include <xercesc/util/Janitor.hpp>
#include <xercesc/internal/VecAttrListImpl.hpp>
XERCES_CPP_NAMESPACE_BEGIN
// ---------------------------------------------------------------------------
// Constructors and Destructor
// ---------------------------------------------------------------------------
VecAttrListImpl::VecAttrListImpl() :
fAdopt(false)
, fCount(0)
, fVector(0)
{
}
VecAttrListImpl::~VecAttrListImpl()
{
//
// Note that some compilers can't deal with the fact that the pointer
// is to a const object, so we have to cast off the const'ness here!
//
if (fAdopt)
delete (RefVectorOf<XMLAttr>*)fVector;
}
// ---------------------------------------------------------------------------
// Implementation of the attribute list interface
// ---------------------------------------------------------------------------
XMLSize_t VecAttrListImpl::getLength() const
{
return fCount;
}
const XMLCh* VecAttrListImpl::getName(const XMLSize_t index) const
{
if (index >= fCount) {
return 0;
}
return fVector->elementAt(index)->getQName();
}
const XMLCh* VecAttrListImpl::getType(const XMLSize_t index) const
{
if (index >= fCount) {
return 0;
}
return XMLAttDef::getAttTypeString(fVector->elementAt(index)->getType(), fVector->getMemoryManager());
}
const XMLCh* VecAttrListImpl::getValue(const XMLSize_t index) const
{
if (index >= fCount) {
return 0;
}
return fVector->elementAt(index)->getValue();
}
const XMLCh* VecAttrListImpl::getType(const XMLCh* const name) const
{
//
// Search the vector for the attribute with the given name and return
// its type.
//
for (XMLSize_t index = 0; index < fCount; index++)
{
const XMLAttr* curElem = fVector->elementAt(index);
if (XMLString::equals(curElem->getQName(), name))
return XMLAttDef::getAttTypeString(curElem->getType(), fVector->getMemoryManager());
}
return 0;
}
const XMLCh* VecAttrListImpl::getValue(const XMLCh* const name) const
{
//
// Search the vector for the attribute with the given name and return
// its type.
//
for (XMLSize_t index = 0; index < fCount; index++)
{
const XMLAttr* curElem = fVector->elementAt(index);
if (XMLString::equals(curElem->getQName(), name))
return curElem->getValue();
}
return 0;
}
const XMLCh* VecAttrListImpl::getValue(const char* const name) const
{
// Temporarily transcode the name for lookup
XMLCh* wideName = XMLString::transcode(name, XMLPlatformUtils::fgMemoryManager);
ArrayJanitor<XMLCh> janName(wideName, XMLPlatformUtils::fgMemoryManager);
//
// Search the vector for the attribute with the given name and return
// its type.
//
for (XMLSize_t index = 0; index < fCount; index++)
{
const XMLAttr* curElem = fVector->elementAt(index);
if (XMLString::equals(curElem->getQName(), wideName))
return curElem->getValue();
}
return 0;
}
// ---------------------------------------------------------------------------
// Setter methods
// ---------------------------------------------------------------------------
void VecAttrListImpl::setVector(const RefVectorOf<XMLAttr>* const srcVec
, const XMLSize_t count
, const bool adopt)
{
//
// Delete the previous vector (if any) if we are adopting. Note that some
// compilers can't deal with the fact that the pointer is to a const
// object, so we have to cast off the const'ness here!
//
if (fAdopt)
delete (RefVectorOf<XMLAttr>*)fVector;
fAdopt = adopt;
fCount = count;
fVector = srcVec;
}
XERCES_CPP_NAMESPACE_END
@@ -0,0 +1,96 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* $Id: VecAttrListImpl.hpp 672273 2008-06-27 13:57:00Z borisk $
*/
#if !defined(XERCESC_INCLUDE_GUARD_VECATTRLISTIMPL_HPP)
#define XERCESC_INCLUDE_GUARD_VECATTRLISTIMPL_HPP
#include <xercesc/sax/AttributeList.hpp>
#include <xercesc/framework/XMLAttr.hpp>
#include <xercesc/util/RefVectorOf.hpp>
XERCES_CPP_NAMESPACE_BEGIN
class XMLPARSER_EXPORT VecAttrListImpl : public XMemory, public AttributeList
{
public :
// -----------------------------------------------------------------------
// Constructors and Destructor
// -----------------------------------------------------------------------
VecAttrListImpl();
~VecAttrListImpl();
// -----------------------------------------------------------------------
// Implementation of the attribute list interface
// -----------------------------------------------------------------------
virtual XMLSize_t getLength() const;
virtual const XMLCh* getName(const XMLSize_t index) const;
virtual const XMLCh* getType(const XMLSize_t index) const;
virtual const XMLCh* getValue(const XMLSize_t index) const;
virtual const XMLCh* getType(const XMLCh* const name) const;
virtual const XMLCh* getValue(const XMLCh* const name) const;
virtual const XMLCh* getValue(const char* const name) const;
// -----------------------------------------------------------------------
// Setter methods
// -----------------------------------------------------------------------
void setVector
(
const RefVectorOf<XMLAttr>* const srcVec
, const XMLSize_t count
, const bool adopt = false
);
private :
// -----------------------------------------------------------------------
// Unimplemented constructors and operators
// -----------------------------------------------------------------------
VecAttrListImpl(const VecAttrListImpl&);
VecAttrListImpl& operator=(const VecAttrListImpl&);
// -----------------------------------------------------------------------
// Private data members
//
// fAdopt
// Indicates whether the passed vector is to be adopted or not. If
// so, we destroy it when we are destroyed (and when a new vector is
// set!)
//
// fCount
// The count of elements in the vector that should be considered
// valid. This is an optimization to allow vector elements to be
// reused over and over but a different count of them be valid for
// each use.
//
// fVector
// The vector that provides the backing for the list.
// -----------------------------------------------------------------------
bool fAdopt;
XMLSize_t fCount;
const RefVectorOf<XMLAttr>* fVector;
};
XERCES_CPP_NAMESPACE_END
#endif
@@ -0,0 +1,249 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* $Id: VecAttributesImpl.cpp 672311 2008-06-27 16:05:01Z borisk $
*/
// ---------------------------------------------------------------------------
// Includes
// ---------------------------------------------------------------------------
#include <xercesc/util/Janitor.hpp>
#include <xercesc/internal/VecAttributesImpl.hpp>
XERCES_CPP_NAMESPACE_BEGIN
// ---------------------------------------------------------------------------
// Constructors and Destructor
// ---------------------------------------------------------------------------
VecAttributesImpl::VecAttributesImpl() :
fAdopt(false)
, fCount(0)
, fVector(0)
, fScanner(0)
{
}
VecAttributesImpl::~VecAttributesImpl()
{
//
// Note that some compilers can't deal with the fact that the pointer
// is to a const object, so we have to cast off the const'ness here!
//
if (fAdopt)
delete (RefVectorOf<XMLAttr>*)fVector;
}
// ---------------------------------------------------------------------------
// Implementation of the attribute list interface
// ---------------------------------------------------------------------------
XMLSize_t VecAttributesImpl::getLength() const
{
return fCount;
}
const XMLCh* VecAttributesImpl::getURI(const XMLSize_t index) const
{
// since this func really needs to be const, like the rest, not sure how we
// make it const and re-use the fURIBuffer member variable. we're currently
// creating a buffer each time you need a URI. there has to be a better
// way to do this...
//XMLBuffer tempBuf;
if (index >= fCount) {
return 0;
}
//fValidator->getURIText(fVector->elementAt(index)->getURIId(), tempBuf) ;
//return tempBuf.getRawBuffer() ;
return fScanner->getURIText(fVector->elementAt(index)->getURIId());
}
const XMLCh* VecAttributesImpl::getLocalName(const XMLSize_t index) const
{
if (index >= fCount) {
return 0;
}
return fVector->elementAt(index)->getName();
}
const XMLCh* VecAttributesImpl::getQName(const XMLSize_t index) const
{
if (index >= fCount) {
return 0;
}
return fVector->elementAt(index)->getQName();
}
const XMLCh* VecAttributesImpl::getType(const XMLSize_t index) const
{
if (index >= fCount) {
return 0;
}
return XMLAttDef::getAttTypeString(fVector->elementAt(index)->getType(), fVector->getMemoryManager());
}
const XMLCh* VecAttributesImpl::getValue(const XMLSize_t index) const
{
if (index >= fCount) {
return 0;
}
return fVector->elementAt(index)->getValue();
}
bool VecAttributesImpl::getIndex(const XMLCh* const uri,
const XMLCh* const localPart,
XMLSize_t& index) const
{
//
// Search the vector for the attribute with the given name and return
// its type.
//
XMLBuffer uriBuffer(1023, fVector->getMemoryManager()) ;
for (index = 0; index < fCount; index++)
{
const XMLAttr* curElem = fVector->elementAt(index);
fScanner->getURIText(curElem->getURIId(), uriBuffer) ;
if ( (XMLString::equals(curElem->getName(), localPart)) &&
(XMLString::equals(uriBuffer.getRawBuffer(), uri)) )
return true;
}
return false;
}
int VecAttributesImpl::getIndex(const XMLCh* const uri, const XMLCh* const localPart ) const
{
//
// Search the vector for the attribute with the given name and return
// its type.
//
XMLBuffer uriBuffer(1023, fVector->getMemoryManager()) ;
for (XMLSize_t index = 0; index < fCount; index++)
{
const XMLAttr* curElem = fVector->elementAt(index);
fScanner->getURIText(curElem->getURIId(), uriBuffer) ;
if ( (XMLString::equals(curElem->getName(), localPart)) &&
(XMLString::equals(uriBuffer.getRawBuffer(), uri)) )
return (int)index ;
}
return -1;
}
bool VecAttributesImpl::getIndex(const XMLCh* const qName,
XMLSize_t& index) const
{
//
// Search the vector for the attribute with the given name and return
// its type.
//
for (index = 0; index < fCount; index++)
{
const XMLAttr* curElem = fVector->elementAt(index);
if (XMLString::equals(curElem->getQName(), qName))
return true;
}
return false;
}
int VecAttributesImpl::getIndex(const XMLCh* const qName ) const
{
//
// Search the vector for the attribute with the given name and return
// its type.
//
for (XMLSize_t index = 0; index < fCount; index++)
{
const XMLAttr* curElem = fVector->elementAt(index);
if (XMLString::equals(curElem->getQName(), qName))
return (int)index ;
}
return -1;
}
const XMLCh* VecAttributesImpl::getType(const XMLCh* const uri, const XMLCh* const localPart ) const
{
XMLSize_t i;
if (getIndex(uri, localPart, i))
return getType(i);
else
return 0;
}
const XMLCh* VecAttributesImpl::getType(const XMLCh* const qName) const
{
XMLSize_t i;
if (getIndex(qName, i))
return getType(i);
else
return 0;
}
const XMLCh* VecAttributesImpl::getValue(const XMLCh* const uri, const XMLCh* const localPart ) const
{
XMLSize_t i;
if (getIndex(uri, localPart, i))
return getValue(i);
else
return 0;
}
const XMLCh* VecAttributesImpl::getValue(const XMLCh* const qName) const
{
XMLSize_t i;
if (getIndex(qName, i))
return getValue(i);
else
return 0;
}
// ---------------------------------------------------------------------------
// Setter methods
// ---------------------------------------------------------------------------
void VecAttributesImpl::setVector(const RefVectorOf<XMLAttr>* const srcVec
, const XMLSize_t count
, const XMLScanner * const scanner
, const bool adopt)
{
//
// Delete the previous vector (if any) if we are adopting. Note that some
// compilers can't deal with the fact that the pointer is to a const
// object, so we have to cast off the const'ness here!
//
if (fAdopt)
delete (RefVectorOf<XMLAttr>*)fVector;
fAdopt = adopt;
fCount = count;
fVector = srcVec;
fScanner = scanner ;
}
XERCES_CPP_NAMESPACE_END
@@ -0,0 +1,117 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* $Id: VecAttributesImpl.hpp 672311 2008-06-27 16:05:01Z borisk $
*/
#if !defined(XERCESC_INCLUDE_GUARD_VECATTRIBUTESIMPL_HPP)
#define XERCESC_INCLUDE_GUARD_VECATTRIBUTESIMPL_HPP
#include <xercesc/sax2/Attributes.hpp>
#include <xercesc/framework/XMLAttr.hpp>
#include <xercesc/util/RefVectorOf.hpp>
#include <xercesc/internal/XMLScanner.hpp>
#include <xercesc/framework/XMLBuffer.hpp>
XERCES_CPP_NAMESPACE_BEGIN
class XMLPARSER_EXPORT VecAttributesImpl : public Attributes
{
public :
// -----------------------------------------------------------------------
// Constructors and Destructor
// -----------------------------------------------------------------------
VecAttributesImpl();
~VecAttributesImpl();
// -----------------------------------------------------------------------
// Implementation of the attributes interface
// -----------------------------------------------------------------------
virtual XMLSize_t getLength() const ;
virtual const XMLCh* getURI(const XMLSize_t index) const;
virtual const XMLCh* getLocalName(const XMLSize_t index) const ;
virtual const XMLCh* getQName(const XMLSize_t index) const ;
virtual const XMLCh* getType(const XMLSize_t index) const ;
virtual const XMLCh* getValue(const XMLSize_t index) const ;
virtual bool getIndex(const XMLCh* const uri, const XMLCh* const localPart, XMLSize_t& index) const;
virtual int getIndex(const XMLCh* const uri, const XMLCh* const localPart ) const ;
virtual bool getIndex(const XMLCh* const qName, XMLSize_t& index) const;
virtual int getIndex(const XMLCh* const qName ) const ;
virtual const XMLCh* getType(const XMLCh* const uri, const XMLCh* const localPart ) const ;
virtual const XMLCh* getType(const XMLCh* const qName) const ;
virtual const XMLCh* getValue(const XMLCh* const qName) const;
virtual const XMLCh* getValue(const XMLCh* const uri, const XMLCh* const localPart ) const ;
// -----------------------------------------------------------------------
// Setter methods
// -----------------------------------------------------------------------
void setVector
(
const RefVectorOf<XMLAttr>* const srcVec
, const XMLSize_t count
, const XMLScanner * const scanner
, const bool adopt = false
);
private :
// -----------------------------------------------------------------------
// Unimplemented constructors and operators
// -----------------------------------------------------------------------
VecAttributesImpl(const VecAttributesImpl&);
VecAttributesImpl& operator=(const VecAttributesImpl&);
// -----------------------------------------------------------------------
// Private data members
//
// fAdopt
// Indicates whether the passed vector is to be adopted or not. If
// so, we destroy it when we are destroyed (and when a new vector is
// set!)
//
// fCount
// The count of elements in the vector that should be considered
// valid. This is an optimization to allow vector elements to be
// reused over and over but a different count of them be valid for
// each use.
//
// fVector
// The vector that provides the backing for the list.
//
// fScanner
// This is a pointer to the in use Scanner, so that we can resolve
// namespace URIs from UriIds
//
// fURIBuffer
// A temporary buffer which is re-used when getting namespace URI's
// -----------------------------------------------------------------------
bool fAdopt;
XMLSize_t fCount;
const RefVectorOf<XMLAttr>* fVector;
const XMLScanner * fScanner ;
};
XERCES_CPP_NAMESPACE_END
#endif // ! VECATTRIBUTESIMPL_HPP
File diff suppressed because it is too large Load Diff
+153
View File
@@ -0,0 +1,153 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* $Id: WFXMLScanner.hpp 810580 2009-09-02 15:52:22Z amassari $
*/
#if !defined(XERCESC_INCLUDE_GUARD_WFXMLSCANNER_HPP)
#define XERCESC_INCLUDE_GUARD_WFXMLSCANNER_HPP
#include <xercesc/internal/XMLScanner.hpp>
#include <xercesc/util/ValueHashTableOf.hpp>
#include <xercesc/util/ValueVectorOf.hpp>
#include <xercesc/validators/DTD/DTDElementDecl.hpp>
XERCES_CPP_NAMESPACE_BEGIN
// This is a a non-validating scanner. No DOCTYPE or XML Schema processing
// will take place.
class XMLPARSER_EXPORT WFXMLScanner : public XMLScanner
{
public :
// -----------------------------------------------------------------------
// Constructors and Destructor
// -----------------------------------------------------------------------
WFXMLScanner
(
XMLValidator* const valToAdopt
, GrammarResolver* const grammarResolver
, MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
);
WFXMLScanner
(
XMLDocumentHandler* const docHandler
, DocTypeHandler* const docTypeHandler
, XMLEntityHandler* const entityHandler
, XMLErrorReporter* const errReporter
, XMLValidator* const valToAdopt
, GrammarResolver* const grammarResolver
, MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
);
virtual ~WFXMLScanner();
// -----------------------------------------------------------------------
// XMLScanner public virtual methods
// -----------------------------------------------------------------------
virtual const XMLCh* getName() const;
virtual NameIdPool<DTDEntityDecl>* getEntityDeclPool();
virtual const NameIdPool<DTDEntityDecl>* getEntityDeclPool() const;
virtual void scanDocument
(
const InputSource& src
);
virtual bool scanNext(XMLPScanToken& toFill);
virtual Grammar* loadGrammar
(
const InputSource& src
, const short grammarType
, const bool toCache = false
);
private :
// -----------------------------------------------------------------------
// Unimplemented constructors and operators
// -----------------------------------------------------------------------
WFXMLScanner();
WFXMLScanner(const WFXMLScanner&);
WFXMLScanner& operator=(const WFXMLScanner&);
// -----------------------------------------------------------------------
// XMLScanner virtual methods
// -----------------------------------------------------------------------
virtual void scanCDSection();
virtual void scanCharData(XMLBuffer& toToUse);
virtual EntityExpRes scanEntityRef
(
const bool inAttVal
, XMLCh& firstCh
, XMLCh& secondCh
, bool& escaped
);
virtual void scanDocTypeDecl();
virtual void scanReset(const InputSource& src);
virtual void sendCharData(XMLBuffer& toSend);
virtual InputSource* resolveSystemId(const XMLCh* const sysId
,const XMLCh* const pubId);
// -----------------------------------------------------------------------
// Private helper methods
// -----------------------------------------------------------------------
void commonInit();
void cleanUp();
// -----------------------------------------------------------------------
// Private scanning methods
// -----------------------------------------------------------------------
bool scanAttValue
(
const XMLCh* const attrName
, XMLBuffer& toFill
);
bool scanContent();
void scanEndTag(bool& gotData);
bool scanStartTag(bool& gotData);
bool scanStartTagNS(bool& gotData);
// -----------------------------------------------------------------------
// Data members
//
// fEntityTable
// This the table that contains the default entity entries.
//
// fAttrNameHashList
// This contains the hash value for attribute names. It's used when
// checking for duplicate attributes.
//
// fAttrNSList
// This contains XMLAttr objects that we need to map their prefixes
// to URIs when namespace is enabled.
//
// -----------------------------------------------------------------------
unsigned int fElementIndex;
RefVectorOf<XMLElementDecl>* fElements;
ValueHashTableOf<XMLCh>* fEntityTable;
ValueVectorOf<XMLSize_t>* fAttrNameHashList;
ValueVectorOf<XMLAttr*>* fAttrNSList;
RefHashTableOf<XMLElementDecl>* fElementLookup;
};
inline const XMLCh* WFXMLScanner::getName() const
{
return XMLUni::fgWFXMLScanner;
}
XERCES_CPP_NAMESPACE_END
#endif
@@ -0,0 +1,139 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* $Id: XMLInternalErrorHandler.hpp 527149 2007-04-10 14:56:39Z amassari $
*/
#if !defined(XERCESC_INCLUDE_GUARD_XMLINTERNALERRORHANDLER_HPP)
#define XERCESC_INCLUDE_GUARD_XMLINTERNALERRORHANDLER_HPP
#include <xercesc/util/XercesDefs.hpp>
#include <xercesc/sax/ErrorHandler.hpp>
XERCES_CPP_NAMESPACE_BEGIN
class XMLInternalErrorHandler : public ErrorHandler
{
public:
// -----------------------------------------------------------------------
// Constructors and Destructor
// -----------------------------------------------------------------------
XMLInternalErrorHandler(ErrorHandler* userHandler = 0) :
fSawWarning(false),
fSawError(false),
fSawFatal(false),
fUserErrorHandler(userHandler)
{
}
~XMLInternalErrorHandler()
{
}
// -----------------------------------------------------------------------
// Implementation of the error handler interface
// -----------------------------------------------------------------------
void warning(const SAXParseException& toCatch);
void error(const SAXParseException& toCatch);
void fatalError(const SAXParseException& toCatch);
void resetErrors();
// -----------------------------------------------------------------------
// Getter methods
// -----------------------------------------------------------------------
bool getSawWarning() const;
bool getSawError() const;
bool getSawFatal() const;
// -----------------------------------------------------------------------
// Private data members
//
// fSawWarning
// This is set if we get any warning, and is queryable via a getter
// method.
//
// fSawError
// This is set if we get any errors, and is queryable via a getter
// method.
//
// fSawFatal
// This is set if we get any fatal, and is queryable via a getter
// method.
//
// fUserErrorHandler
// This is the error handler from user
// -----------------------------------------------------------------------
bool fSawWarning;
bool fSawError;
bool fSawFatal;
ErrorHandler* fUserErrorHandler;
private:
// -----------------------------------------------------------------------
// Unimplemented constructors and operators
// -----------------------------------------------------------------------
XMLInternalErrorHandler(const XMLInternalErrorHandler&);
XMLInternalErrorHandler& operator=(const XMLInternalErrorHandler&);
};
inline bool XMLInternalErrorHandler::getSawWarning() const
{
return fSawWarning;
}
inline bool XMLInternalErrorHandler::getSawError() const
{
return fSawError;
}
inline bool XMLInternalErrorHandler::getSawFatal() const
{
return fSawFatal;
}
inline void XMLInternalErrorHandler::warning(const SAXParseException& toCatch)
{
fSawWarning = true;
if (fUserErrorHandler)
fUserErrorHandler->warning(toCatch);
}
inline void XMLInternalErrorHandler::error(const SAXParseException& toCatch)
{
fSawError = true;
if (fUserErrorHandler)
fUserErrorHandler->error(toCatch);
}
inline void XMLInternalErrorHandler::fatalError(const SAXParseException& toCatch)
{
fSawFatal = true;
if (fUserErrorHandler)
fUserErrorHandler->fatalError(toCatch);
}
inline void XMLInternalErrorHandler::resetErrors()
{
fSawWarning = false;
fSawError = false;
fSawFatal = false;
}
XERCES_CPP_NAMESPACE_END
#endif
File diff suppressed because it is too large Load Diff
+790
View File
@@ -0,0 +1,790 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* $Id: XMLReader.hpp 833045 2009-11-05 13:21:27Z borisk $
*/
#if !defined(XERCESC_INCLUDE_GUARD_XMLREADER_HPP)
#define XERCESC_INCLUDE_GUARD_XMLREADER_HPP
#include <xercesc/util/XMLChar.hpp>
#include <xercesc/framework/XMLRecognizer.hpp>
#include <xercesc/framework/XMLBuffer.hpp>
#include <xercesc/util/TranscodingException.hpp>
XERCES_CPP_NAMESPACE_BEGIN
class InputSource;
class BinInputStream;
class ReaderMgr;
class XMLScanner;
class XMLTranscoder;
// ---------------------------------------------------------------------------
// Instances of this class are used to manage the content of entities. The
// scanner maintains a stack of these, one for each entity (this means entity
// in the sense of any parsed file or internal entity) currently being
// scanned. This class, given a binary input stream will handle reading in
// the data and decoding it from its external decoding into the internal
// Unicode format. Once internallized, this class provides the access
// methods to read in the data in various ways, maintains line and column
// information, and provides high performance character attribute checking
// methods.
//
// This is NOT to be derived from.
//
// ---------------------------------------------------------------------------
class XMLPARSER_EXPORT XMLReader : public XMemory
{
public:
// -----------------------------------------------------------------------
// Public types
// -----------------------------------------------------------------------
enum Types
{
Type_PE
, Type_General
};
enum Sources
{
Source_Internal
, Source_External
};
enum RefFrom
{
RefFrom_Literal
, RefFrom_NonLiteral
};
enum XMLVersion
{
XMLV1_0
, XMLV1_1
, XMLV_Unknown
};
// -----------------------------------------------------------------------
// Public, query methods
// -----------------------------------------------------------------------
bool isAllSpaces
(
const XMLCh* const toCheck
, const XMLSize_t count
) const;
bool containsWhiteSpace
(
const XMLCh* const toCheck
, const XMLSize_t count
) const;
bool isXMLLetter(const XMLCh toCheck) const;
bool isFirstNameChar(const XMLCh toCheck) const;
bool isNameChar(const XMLCh toCheck) const;
bool isPlainContentChar(const XMLCh toCheck) const;
bool isSpecialStartTagChar(const XMLCh toCheck) const;
bool isXMLChar(const XMLCh toCheck) const;
bool isWhitespace(const XMLCh toCheck) const;
bool isControlChar(const XMLCh toCheck) const;
bool isPublicIdChar(const XMLCh toCheck) const;
bool isFirstNCNameChar(const XMLCh toCheck) const;
bool isNCNameChar(const XMLCh toCheck) const;
// -----------------------------------------------------------------------
// Constructors and Destructor
// -----------------------------------------------------------------------
XMLReader
(
const XMLCh* const pubId
, const XMLCh* const sysId
, BinInputStream* const streamToAdopt
, const RefFrom from
, const Types type
, const Sources source
, const bool throwAtEnd = false
, const bool calculateSrcOfs = true
, XMLSize_t lowWaterMark = 100
, const XMLVersion xmlVersion = XMLV1_0
, MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
);
XMLReader
(
const XMLCh* const pubId
, const XMLCh* const sysId
, BinInputStream* const streamToAdopt
, const XMLCh* const encodingStr
, const RefFrom from
, const Types type
, const Sources source
, const bool throwAtEnd = false
, const bool calculateSrcOfs = true
, XMLSize_t lowWaterMark = 100
, const XMLVersion xmlVersion = XMLV1_0
, MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
);
XMLReader
(
const XMLCh* const pubId
, const XMLCh* const sysId
, BinInputStream* const streamToAdopt
, XMLRecognizer::Encodings encodingEnum
, const RefFrom from
, const Types type
, const Sources source
, const bool throwAtEnd = false
, const bool calculateSrcOfs = true
, XMLSize_t lowWaterMark = 100
, const XMLVersion xmlVersion = XMLV1_0
, MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
);
~XMLReader();
// -----------------------------------------------------------------------
// Character buffer management methods
// -----------------------------------------------------------------------
XMLSize_t charsLeftInBuffer() const;
bool refreshCharBuffer();
// -----------------------------------------------------------------------
// Scanning methods
// -----------------------------------------------------------------------
bool getName(XMLBuffer& toFill, const bool token);
bool getQName(XMLBuffer& toFill, int* colonPosition);
bool getNCName(XMLBuffer& toFill);
bool getNextChar(XMLCh& chGotten);
bool getNextCharIfNot(const XMLCh chNotToGet, XMLCh& chGotten);
void movePlainContentChars(XMLBuffer &dest);
bool getSpaces(XMLBuffer& toFill);
bool getUpToCharOrWS(XMLBuffer& toFill, const XMLCh toCheck);
bool peekNextChar(XMLCh& chGotten);
bool skipIfQuote(XMLCh& chGotten);
bool skipSpaces(bool& skippedSomething, bool inDecl = false);
bool skippedChar(const XMLCh toSkip);
bool skippedSpace();
bool skippedString(const XMLCh* const toSkip);
bool skippedStringLong(const XMLCh* toSkip);
bool peekString(const XMLCh* const toPeek);
// -----------------------------------------------------------------------
// Getter methods
// -----------------------------------------------------------------------
XMLFileLoc getColumnNumber() const;
const XMLCh* getEncodingStr() const;
XMLFileLoc getLineNumber() const;
bool getNoMoreFlag() const;
const XMLCh* getPublicId() const;
XMLSize_t getReaderNum() const;
RefFrom getRefFrom() const;
Sources getSource() const;
XMLFilePos getSrcOffset() const;
const XMLCh* getSystemId() const;
bool getThrowAtEnd() const;
Types getType() const;
// -----------------------------------------------------------------------
// Setter methods
// -----------------------------------------------------------------------
bool setEncoding
(
const XMLCh* const newEncoding
);
void setReaderNum(const XMLSize_t newNum);
void setThrowAtEnd(const bool newValue);
void setXMLVersion(const XMLVersion version);
private:
// -----------------------------------------------------------------------
// Unimplemented constructors and operators
// -----------------------------------------------------------------------
XMLReader(const XMLReader&);
XMLReader& operator=(const XMLReader&);
// ---------------------------------------------------------------------------
// Class Constants
//
// kCharBufSize
// The size of the character spool buffer that we use. Its not terribly
// large because its just getting filled with data from a raw byte
// buffer as we go along. We don't want to decode all the text at
// once before we find out that there is an error.
//
// NOTE: This is a size in characters, not bytes.
//
// kRawBufSize
// The size of the raw buffer from which raw bytes are spooled out
// as we transcode chunks of data. As it is emptied, it is filled back
// in again from the source stream.
// ---------------------------------------------------------------------------
enum Constants
{
kCharBufSize = 16 * 1024
, kRawBufSize = 48 * 1024
};
// -----------------------------------------------------------------------
// Private helper methods
// -----------------------------------------------------------------------
void checkForSwapped();
void doInitCharSizeChecks();
void doInitDecode();
XMLByte getNextRawByte
(
const bool eoiOk
);
void refreshRawBuffer();
void setTranscoder
(
const XMLCh* const newEncoding
);
XMLSize_t xcodeMoreChars
(
XMLCh* const bufToFill
, unsigned char* const charSizes
, const XMLSize_t maxChars
);
void handleEOL
(
XMLCh& curCh
, bool inDecl = false
);
// -----------------------------------------------------------------------
// Data members
//
// fCharIndex
// The index into the character buffer. When this hits fCharsAvail
// then its time to refill.
//
// fCharBuf
// A buffer that the reader manager fills up with transcoded
// characters a small amount at a time.
//
// fCharsAvail
// The characters currently available in the character buffer.
//
// fCharSizeBuf
// This buffer is an array that contains the number of source chars
// eaten to create each char in the fCharBuf buffer. So the entry
// fCharSizeBuf[x] is the number of source chars that were eaten
// to make the internalized char fCharBuf[x]. This only contains
// useful data if fSrcOfsSupported is true.
//
// fCharOfsBuf
// This buffer is an array that contains the offset in the
// fRawByteBuf buffer of each char in the fCharBuf buffer. It
// only contains useful data if fSrcOfsSupported is true.
//
// fCurCol
// fCurLine
// The current line and column that we are in within this reader's
// text.
//
// fEncoding
// This is the rough encoding setting. This enum is set during
// construction and just tells us the rough family of encoding that
// we are doing.
//
// fEncodingStr
// This is the name of the encoding we are using. It will be
// provisionally set during construction, from the auto-sensed
// encoding. But it might be overridden when the XMLDecl is finally
// seen by the scanner. It can also be forced to a particular
// encoding, in which case fForcedEncoding is set.
//
// fForcedEncoding
// If the encoding if forced then this is set and all other
// information will be ignored. This encoding will be taken as
// gospel. This is done by calling an alternate constructor.
//
// fNoMore
// This is set when the source text is exhausted. It lets us know
// quickly that no more text is available.
//
// fRawBufIndex
// The current index into the raw byte buffer. When its equal to
// fRawBytesAvail then we need to read another buffer.
//
// fRawByteBuf
// This is the raw byte buffer that is used to spool out bytes
// from into the fCharBuf buffer, as we transcode in blocks.
//
// fRawBytesAvail
// The number of bytes currently available in the raw buffer. This
// helps deal with the last buffer's worth, which will usually not
// be a full one.
//
// fLowWaterMark
// The low water mark for the raw byte buffer.
//
//
// fReaderNum
// Each reader from a particular reader manager (which means from a
// particular document) is given a unique number. The reader manager
// sets these numbers. They are used to catch things like partial
// markup errors.
//
// fRefFrom
// This flag is provided in the ctor, and tells us if we represent
// some entity being expanded inside a literal. Sometimes things
// happen differently inside and outside literals.
//
// fPublicId
// fSystemId
// These are the system and public ids of the source that this
// reader is reading.
//
// fSentTrailingSpace
// If we are a PE entity being read and we not referenced from a
// literal, then a leading and trailing space must be faked into the
// data. This lets us know we've done the trailing space already (so
// we don't just keep doing it again and again.)
//
// fSource
// Indicates whether the content this reader is spooling as already
// been internalized. This will prevent multiple processing of
// whitespace when an already internalized entity is being spooled
// out.
//
// fSpareChar
// Some encodings can create two chars in an atomic way, e.g.
// surrogate pairs. We might not be able to store both, so we store
// it here until the next buffer transcoding operation.
//
// fSrcOfsBase
// This is the base offset within the source of this entity. Values
// in the curent fCharSizeBuf array are relative to this value.
//
// fSrcOfsSupported
// This flag is set to indicate whether source byte offset info
// is supported. For intrinsic encodings, its always set since we
// can always support it. For transcoder based encodings, we ask
// the transcoder if it supports it or not.
//
// fStream
// This is the input stream that provides the data for the reader.
// Its always treated as a raw byte stream. The derived class will
// ask for buffers of text from it and will handle making some
// sense of it.
//
// fSwapped
// If the encoding is one of the ones we do intrinsically, and its
// in a different byte order from our native order, then this is
// set to remind us to byte swap it during transcoding.
//
// fThrowAtEnd
// Indicates whether the reader manager should throw an end of entity
// exception at the end of this reader instance. This is usually
// set for top level external entity references. It overrides the
// reader manager's global flag that controls throwing at the end
// of entities. Defaults to false.
//
// fTranscoder
// If the encoding is not one that we handle intrinsically, then
// we use an an external transcoder to do it. This class is an
// abstraction that allows us to use pluggable external transcoding
// services (via XMLTransService in util.)
//
// fType
// Indicates whether this reader represents a PE or not. If this
// flag is true and the fInLiteral flag is false, then we will put
// out an extra space at the end.
//
// fgCharCharsTable;
// Pointer to XMLChar table, depends on XML version
//
// fNEL
// Boolean indicates if NEL and LSEP should be recognized as NEL
//
// fXMLVersion
// Enum to indicate if this Reader is conforming to XML 1.0 or XML 1.1
// -----------------------------------------------------------------------
XMLSize_t fCharIndex;
XMLCh fCharBuf[kCharBufSize];
XMLSize_t fCharsAvail;
unsigned char fCharSizeBuf[kCharBufSize];
unsigned int fCharOfsBuf[kCharBufSize];
XMLFileLoc fCurCol;
XMLFileLoc fCurLine;
XMLRecognizer::Encodings fEncoding;
XMLCh* fEncodingStr;
bool fForcedEncoding;
bool fNoMore;
XMLCh* fPublicId;
XMLSize_t fRawBufIndex;
XMLByte fRawByteBuf[kRawBufSize];
XMLSize_t fRawBytesAvail;
XMLSize_t fLowWaterMark;
XMLSize_t fReaderNum;
RefFrom fRefFrom;
bool fSentTrailingSpace;
Sources fSource;
XMLFilePos fSrcOfsBase;
bool fSrcOfsSupported;
bool fCalculateSrcOfs;
XMLCh* fSystemId;
BinInputStream* fStream;
bool fSwapped;
bool fThrowAtEnd;
XMLTranscoder* fTranscoder;
Types fType;
XMLByte* fgCharCharsTable;
bool fNEL;
XMLVersion fXMLVersion;
MemoryManager* fMemoryManager;
};
// ---------------------------------------------------------------------------
// XMLReader: Public, query methods
// ---------------------------------------------------------------------------
inline bool XMLReader::isNameChar(const XMLCh toCheck) const
{
return ((fgCharCharsTable[toCheck] & gNameCharMask) != 0);
}
inline bool XMLReader::isNCNameChar(const XMLCh toCheck) const
{
return ((fgCharCharsTable[toCheck] & gNCNameCharMask) != 0);
}
inline bool XMLReader::isPlainContentChar(const XMLCh toCheck) const
{
return ((fgCharCharsTable[toCheck] & gPlainContentCharMask) != 0);
}
inline bool XMLReader::isFirstNameChar(const XMLCh toCheck) const
{
return ((fgCharCharsTable[toCheck] & gFirstNameCharMask) != 0);
}
inline bool XMLReader::isFirstNCNameChar(const XMLCh toCheck) const
{
return (((fgCharCharsTable[toCheck] & gFirstNameCharMask) != 0)
&& (toCheck != chColon));
}
inline bool XMLReader::isSpecialStartTagChar(const XMLCh toCheck) const
{
return ((fgCharCharsTable[toCheck] & gSpecialStartTagCharMask) != 0);
}
inline bool XMLReader::isXMLChar(const XMLCh toCheck) const
{
return ((fgCharCharsTable[toCheck] & gXMLCharMask) != 0);
}
inline bool XMLReader::isXMLLetter(const XMLCh toCheck) const
{
return (((fgCharCharsTable[toCheck] & gFirstNameCharMask) != 0)
&& (toCheck != chColon) && (toCheck != chUnderscore));
}
inline bool XMLReader::isWhitespace(const XMLCh toCheck) const
{
return ((fgCharCharsTable[toCheck] & gWhitespaceCharMask) != 0);
}
inline bool XMLReader::isControlChar(const XMLCh toCheck) const
{
return ((fgCharCharsTable[toCheck] & gControlCharMask) != 0);
}
// ---------------------------------------------------------------------------
// XMLReader: Buffer management methods
// ---------------------------------------------------------------------------
inline XMLSize_t XMLReader::charsLeftInBuffer() const
{
return fCharsAvail - fCharIndex;
}
// ---------------------------------------------------------------------------
// XMLReader: Getter methods
// ---------------------------------------------------------------------------
inline XMLFileLoc XMLReader::getColumnNumber() const
{
return fCurCol;
}
inline const XMLCh* XMLReader::getEncodingStr() const
{
return fEncodingStr;
}
inline XMLFileLoc XMLReader::getLineNumber() const
{
return fCurLine;
}
inline bool XMLReader::getNoMoreFlag() const
{
return fNoMore;
}
inline const XMLCh* XMLReader::getPublicId() const
{
return fPublicId;
}
inline XMLSize_t XMLReader::getReaderNum() const
{
return fReaderNum;
}
inline XMLReader::RefFrom XMLReader::getRefFrom() const
{
return fRefFrom;
}
inline XMLReader::Sources XMLReader::getSource() const
{
return fSource;
}
inline const XMLCh* XMLReader::getSystemId() const
{
return fSystemId;
}
inline bool XMLReader::getThrowAtEnd() const
{
return fThrowAtEnd;
}
inline XMLReader::Types XMLReader::getType() const
{
return fType;
}
// ---------------------------------------------------------------------------
// XMLReader: Setter methods
// ---------------------------------------------------------------------------
inline void XMLReader::setReaderNum(const XMLSize_t newNum)
{
fReaderNum = newNum;
}
inline void XMLReader::setThrowAtEnd(const bool newValue)
{
fThrowAtEnd = newValue;
}
inline void XMLReader::setXMLVersion(const XMLVersion version)
{
fXMLVersion = version;
if (version == XMLV1_1) {
fNEL = true;
fgCharCharsTable = XMLChar1_1::fgCharCharsTable1_1;
}
else {
fNEL = XMLChar1_0::enableNEL;
fgCharCharsTable = XMLChar1_0::fgCharCharsTable1_0;
}
}
// ---------------------------------------------------------------------------
//
// XMLReader: movePlainContentChars()
//
// Move as many plain (no special handling of any sort required) content
// characters as possible from this reader to the supplied destination buffer.
//
// This is THE hottest performance spot in the parser.
//
// ---------------------------------------------------------------------------
inline void XMLReader::movePlainContentChars(XMLBuffer &dest)
{
const XMLSize_t chunkSize = fCharsAvail - fCharIndex;
const XMLCh* cursor = &fCharBuf[fCharIndex];
XMLSize_t count=0;
for(;count<chunkSize && (fgCharCharsTable[*cursor++] & gPlainContentCharMask) != 0;++count) /*noop*/ ;
if (count!=0)
{
dest.append(&fCharBuf[fCharIndex], count);
fCharIndex += count;
fCurCol += (XMLFileLoc)count;
}
}
// ---------------------------------------------------------------------------
// XMLReader: getNextCharIfNot() method inlined for speed
// ---------------------------------------------------------------------------
inline bool XMLReader::getNextCharIfNot(const XMLCh chNotToGet, XMLCh& chGotten)
{
//
// See if there is at least a char in the buffer. Else, do the buffer
// reload logic.
//
if (fCharIndex >= fCharsAvail)
{
// If fNoMore is set, then we have nothing else to give
if (fNoMore)
return false;
// Try to refresh
if (!refreshCharBuffer())
return false;
}
// Check the next char
if (fCharBuf[fCharIndex] == chNotToGet)
return false;
// Its not the one we want to skip so bump the index
chGotten = fCharBuf[fCharIndex++];
// Handle end of line normalization and line/col member maintenance.
//
// we can have end-of-line combinations with a leading
// chCR(xD), chLF(xA), chNEL(x85), or chLineSeparator(x2028)
//
// 0000000000001101 chCR
// 0000000000001010 chLF
// 0000000010000101 chNEL
// 0010000000101000 chLineSeparator
// -----------------------
// 1101111101010000 == ~(chCR|chLF|chNEL|chLineSeparator)
//
// if the result of the logical-& operation is
// true : 'curCh' can not be chCR, chLF, chNEL or chLineSeparator
// false : 'curCh' can be chCR, chLF, chNEL or chLineSeparator
//
if ( chGotten & (XMLCh) ~(chCR|chLF|chNEL|chLineSeparator) )
{
fCurCol++;
} else
{
handleEOL(chGotten, false);
}
return true;
}
// ---------------------------------------------------------------------------
// XMLReader: getNextChar() method inlined for speed
// ---------------------------------------------------------------------------
inline bool XMLReader::getNextChar(XMLCh& chGotten)
{
//
// See if there is at least a char in the buffer. Else, do the buffer
// reload logic.
//
if (fCharIndex >= fCharsAvail)
{
// If fNoMore is set, then we have nothing else to give
if (fNoMore)
return false;
// Try to refresh
if (!refreshCharBuffer())
return false;
}
chGotten = fCharBuf[fCharIndex++];
// Handle end of line normalization and line/col member maintenance.
//
// we can have end-of-line combinations with a leading
// chCR(xD), chLF(xA), chNEL(x85), or chLineSeparator(x2028)
//
// 0000000000001101 chCR
// 0000000000001010 chLF
// 0000000010000101 chNEL
// 0010000000101000 chLineSeparator
// -----------------------
// 1101111101010000 == ~(chCR|chLF|chNEL|chLineSeparator)
//
// if the result of the logical-& operation is
// true : 'curCh' can not be chCR, chLF, chNEL or chLineSeparator
// false : 'curCh' can be chCR, chLF, chNEL or chLineSeparator
//
if ( chGotten & (XMLCh) ~(chCR|chLF|chNEL|chLineSeparator) )
{
fCurCol++;
} else
{
handleEOL(chGotten, false);
}
return true;
}
// ---------------------------------------------------------------------------
// XMLReader: peekNextChar() method inlined for speed
// ---------------------------------------------------------------------------
inline bool XMLReader::peekNextChar(XMLCh& chGotten)
{
//
// If there is something still in the buffer, get it. Else do the reload
// scenario.
//
if (fCharIndex >= fCharsAvail)
{
// Try to refresh the buffer
if (!refreshCharBuffer())
{
chGotten = chNull;
return false;
}
}
chGotten = fCharBuf[fCharIndex];
//
// Even though we are only peeking, we have to act the same as the
// normal char get method in regards to newline normalization, though
// its not as complicated as the actual character getting method's.
//
if ((chGotten == chCR || (fNEL && (chGotten == chNEL || chGotten == chLineSeparator)))
&& (fSource == Source_External))
chGotten = chLF;
return true;
}
XERCES_CPP_NAMESPACE_END
#endif
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,88 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* $Id: XMLScannerResolver.cpp 471747 2006-11-06 14:31:56Z amassari $
*/
// ---------------------------------------------------------------------------
// Includes
// ---------------------------------------------------------------------------
#include <xercesc/internal/XMLScannerResolver.hpp>
#include <xercesc/internal/WFXMLScanner.hpp>
#include <xercesc/internal/DGXMLScanner.hpp>
#include <xercesc/internal/SGXMLScanner.hpp>
#include <xercesc/internal/IGXMLScanner.hpp>
XERCES_CPP_NAMESPACE_BEGIN
// ---------------------------------------------------------------------------
// XMLScannerResolver: Public static methods
// ---------------------------------------------------------------------------
XMLScanner*
XMLScannerResolver::getDefaultScanner( XMLValidator* const valToAdopt
, GrammarResolver* const grammarResolver
, MemoryManager* const manager)
{
return new (manager) IGXMLScanner(valToAdopt, grammarResolver, manager);
}
XMLScanner*
XMLScannerResolver::resolveScanner( const XMLCh* const scannerName
, XMLValidator* const valToAdopt
, GrammarResolver* const grammarResolver
, MemoryManager* const manager)
{
if (XMLString::equals(scannerName, XMLUni::fgWFXMLScanner))
return new (manager) WFXMLScanner(valToAdopt, grammarResolver, manager);
else if (XMLString::equals(scannerName, XMLUni::fgIGXMLScanner))
return new (manager) IGXMLScanner(valToAdopt, grammarResolver, manager);
else if (XMLString::equals(scannerName, XMLUni::fgSGXMLScanner))
return new (manager) SGXMLScanner(valToAdopt, grammarResolver, manager);
else if (XMLString::equals(scannerName, XMLUni::fgDGXMLScanner))
return new (manager) DGXMLScanner(valToAdopt, grammarResolver, manager);
// REVISIT: throw an exception or return a default one?
return 0;
}
XMLScanner*
XMLScannerResolver::resolveScanner( const XMLCh* const scannerName
, XMLDocumentHandler* const docHandler
, DocTypeHandler* const docTypeHandler
, XMLEntityHandler* const entityHandler
, XMLErrorReporter* const errReporter
, XMLValidator* const valToAdopt
, GrammarResolver* const grammarResolver
, MemoryManager* const manager)
{
if (XMLString::equals(scannerName, XMLUni::fgWFXMLScanner))
return new (manager) WFXMLScanner(docHandler, docTypeHandler, entityHandler, errReporter, valToAdopt, grammarResolver, manager);
else if (XMLString::equals(scannerName, XMLUni::fgIGXMLScanner))
return new (manager) IGXMLScanner(docHandler, docTypeHandler, entityHandler, errReporter, valToAdopt, grammarResolver, manager);
else if (XMLString::equals(scannerName, XMLUni::fgSGXMLScanner))
return new (manager) SGXMLScanner(docHandler, docTypeHandler, entityHandler, errReporter, valToAdopt, grammarResolver, manager);
else if (XMLString::equals(scannerName, XMLUni::fgDGXMLScanner))
return new (manager) DGXMLScanner(docHandler, docTypeHandler, entityHandler, errReporter, valToAdopt, grammarResolver, manager);
// REVISIT: throw an exception or return a default one?
return 0;
}
XERCES_CPP_NAMESPACE_END
@@ -0,0 +1,79 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* $Id: XMLScannerResolver.hpp 527149 2007-04-10 14:56:39Z amassari $
*/
#if !defined(XERCESC_INCLUDE_GUARD_XMLSCANNERRESOLVER_HPP)
#define XERCESC_INCLUDE_GUARD_XMLSCANNERRESOLVER_HPP
#include <xercesc/internal/XMLScanner.hpp>
XERCES_CPP_NAMESPACE_BEGIN
class XMLValidator;
class XMLDocumentHandler;
class XMLErrorReporter;
class DocTypeHandler;
class XMLEntityHandler;
class XMLPARSER_EXPORT XMLScannerResolver
{
public:
// -----------------------------------------------------------------------
// Public class methods
// -----------------------------------------------------------------------
static XMLScanner* resolveScanner
(
const XMLCh* const scannerName
, XMLValidator* const valToAdopt
, GrammarResolver* const grammarResolver
, MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
);
static XMLScanner* resolveScanner
(
const XMLCh* const scannerName
, XMLDocumentHandler* const docHandler
, DocTypeHandler* const docTypeHandler
, XMLEntityHandler* const entityHandler
, XMLErrorReporter* const errReporter
, XMLValidator* const valToAdopt
, GrammarResolver* const grammarResolver
, MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
);
static XMLScanner* getDefaultScanner
(
XMLValidator* const valToAdopt
, GrammarResolver* const grammarResolver
, MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
);
private :
// -----------------------------------------------------------------------
// Unimplemented constructor and destructor
// -----------------------------------------------------------------------
XMLScannerResolver();
~XMLScannerResolver();
};
XERCES_CPP_NAMESPACE_END
#endif
+108
View File
@@ -0,0 +1,108 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* $Id: XProtoType.cpp 834826 2009-11-11 10:03:53Z borisk $
*/
// ---------------------------------------------------------------------------
// Includes
// ---------------------------------------------------------------------------
#include <xercesc/internal/XProtoType.hpp>
#include <xercesc/internal/XSerializeEngine.hpp>
#include <xercesc/util/XMLString.hpp>
XERCES_CPP_NAMESPACE_BEGIN
/***
*
* write the length of the class name
* write the class name
*
***/
void XProtoType::store(XSerializeEngine& serEng) const
{
XMLSize_t strLen = XMLString::stringLen((char*)fClassName);
serEng << (unsigned long)strLen;
serEng.write(fClassName, strLen * sizeof(XMLByte));
}
/***
*
* To verify that the content in the binary stream
* is the same as this class
*
***/
void XProtoType::load(XSerializeEngine& serEng
, XMLByte* const inName
, MemoryManager* const manager)
{
if (!inName)
{
ThrowXMLwithMemMgr(XSerializationException
, XMLExcepts::XSer_ProtoType_Null_ClassName, manager);
}
// read and check class name length
XMLSize_t inNameLen = XMLString::stringLen((char*)inName);
XMLSize_t classNameLen = 0;
serEng >> (unsigned long&)classNameLen;
if (classNameLen != inNameLen)
{
XMLCh value1[17];
XMLCh value2[17];
XMLString::sizeToText(inNameLen, value1, 16, 10, manager);
XMLString::sizeToText(classNameLen, value2, 16, 10, manager);
ThrowXMLwithMemMgr2(XSerializationException
, XMLExcepts::XSer_ProtoType_NameLen_Dif
, value1
, value2
, manager);
}
// read and check class name
XMLByte className[256];
serEng.read(className, classNameLen*sizeof(XMLByte));
className[classNameLen] = '\0';
if ( !XMLString::equals((char*)className, (char*)inName))
{
//we don't have class name exceed this length in xerces
XMLCh name1[256];
XMLCh name2[256];
XMLCh *tmp = XMLString::transcode((char*)inName, manager);
XMLString::copyNString(name1, tmp, 255);
manager->deallocate(tmp);
tmp = XMLString::transcode((char*)className, manager);
XMLString::copyNString(name2, tmp, 255);
manager->deallocate(tmp);
ThrowXMLwithMemMgr2(XSerializationException
, XMLExcepts::XSer_ProtoType_Name_Dif
, name1
, name2
, manager);
}
return;
}
XERCES_CPP_NAMESPACE_END
+93
View File
@@ -0,0 +1,93 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* $Id: XProtoType.hpp 527149 2007-04-10 14:56:39Z amassari $
*/
#if !defined(XERCESC_INCLUDE_GUARD_XPROTOTYPE_HPP)
#define XERCESC_INCLUDE_GUARD_XPROTOTYPE_HPP
#include <xercesc/util/PlatformUtils.hpp>
XERCES_CPP_NAMESPACE_BEGIN
class XSerializeEngine;
class XSerializable;
class XMLUTIL_EXPORT XProtoType
{
public:
void store(XSerializeEngine& serEng) const;
static void load(XSerializeEngine& serEng
, XMLByte* const name
, MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
);
// -------------------------------------------------------------------------------
// data
//
// fClassName:
// name of the XSerializable derivatives
//
// fCreateObject:
// pointer to the factory method (createObject())
// of the XSerializable derivatives
//
// -------------------------------------------------------------------------------
XMLByte* fClassName;
XSerializable* (*fCreateObject)(MemoryManager*);
};
#define DECL_XPROTOTYPE(class_name) \
static XProtoType class##class_name; \
static XSerializable* createObject(MemoryManager* manager);
/***
* For non-abstract class
***/
#define IMPL_XPROTOTYPE_TOCREATE(class_name) \
IMPL_XPROTOTYPE_INSTANCE(class_name) \
XSerializable* class_name::createObject(MemoryManager* manager) \
{return new (manager) class_name(manager);}
/***
* For abstract class
***/
#define IMPL_XPROTOTYPE_NOCREATE(class_name) \
IMPL_XPROTOTYPE_INSTANCE(class_name) \
XSerializable* class_name::createObject(MemoryManager*) \
{return 0;}
/***
* Helper Macro
***/
#define XPROTOTYPE_CLASS(class_name) ((XProtoType*)(&class_name::class##class_name))
#define IMPL_XPROTOTYPE_INSTANCE(class_name) \
XProtoType class_name::class##class_name = \
{(XMLByte*) #class_name, class_name::createObject };
XERCES_CPP_NAMESPACE_END
#endif
+725
View File
@@ -0,0 +1,725 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* $Id: XSAXMLScanner.cpp 833045 2009-11-05 13:21:27Z borisk $
*/
// ---------------------------------------------------------------------------
// Includes
// ---------------------------------------------------------------------------
#include <xercesc/internal/XSAXMLScanner.hpp>
#include <xercesc/sax/InputSource.hpp>
#include <xercesc/framework/XMLEntityHandler.hpp>
#include <xercesc/framework/XMLDocumentHandler.hpp>
#include <xercesc/framework/psvi/XSAnnotation.hpp>
#include <xercesc/validators/schema/SchemaValidator.hpp>
XERCES_CPP_NAMESPACE_BEGIN
// ---------------------------------------------------------------------------
// XSAXMLScanner: Constructors and Destructor
// ---------------------------------------------------------------------------
XSAXMLScanner::XSAXMLScanner( GrammarResolver* const grammarResolver
, XMLStringPool* const uriStringPool
, SchemaGrammar* const xsaGrammar
, MemoryManager* const manager) :
SGXMLScanner(0, grammarResolver, manager)
{
fSchemaGrammar = xsaGrammar;
setURIStringPool(uriStringPool);
}
XSAXMLScanner::~XSAXMLScanner()
{
}
// ---------------------------------------------------------------------------
// XSAXMLScanner: SGXMLScanner virtual methods
// ---------------------------------------------------------------------------
// This method will kick off the scanning of the primary content of the
void XSAXMLScanner::scanEndTag(bool& gotData)
{
// Assume we will still have data until proven otherwise. It will only
// ever be false if this is the end of the root element.
gotData = true;
// Check if the element stack is empty. If so, then this is an unbalanced
// element (i.e. more ends than starts, perhaps because of bad text
// causing one to be skipped.)
if (fElemStack.isEmpty())
{
emitError(XMLErrs::MoreEndThanStartTags);
fReaderMgr.skipPastChar(chCloseAngle);
ThrowXMLwithMemMgr(RuntimeException, XMLExcepts::Scan_UnbalancedStartEnd, fMemoryManager);
}
// Pop the stack of the element we are supposed to be ending. Remember
// that we don't own this. The stack just keeps them and reuses them.
unsigned int uriId = fElemStack.getCurrentURI();
// Make sure that its the end of the element that we expect
const XMLCh *elemName = fElemStack.getCurrentSchemaElemName();
const ElemStack::StackElem* topElem = fElemStack.popTop();
if (!fReaderMgr.skippedStringLong(elemName))
{
emitError
(
XMLErrs::ExpectedEndOfTagX, elemName
);
fReaderMgr.skipPastChar(chCloseAngle);
return;
}
// See if it was the root element, to avoid multiple calls below
const bool isRoot = fElemStack.isEmpty();
// Make sure we are back on the same reader as where we started
if (topElem->fReaderNum != fReaderMgr.getCurrentReaderNum())
emitError(XMLErrs::PartialTagMarkupError);
// Skip optional whitespace
fReaderMgr.skipPastSpaces();
// Make sure we find the closing bracket
if (!fReaderMgr.skippedChar(chCloseAngle))
{
emitError
(
XMLErrs::UnterminatedEndTag, topElem->fThisElement->getFullName()
);
}
// If validation is enabled, then lets pass him the list of children and
// this element and let him validate it.
if (fValidate)
{
XMLSize_t failure;
bool res = fValidator->checkContent
(
topElem->fThisElement
, topElem->fChildren
, topElem->fChildCount
, &failure
);
if (!res)
{
// One of the elements is not valid for the content. NOTE that
// if no children were provided but the content model requires
// them, it comes back with a zero value. But we cannot use that
// to index the child array in this case, and have to put out a
// special message.
if (!topElem->fChildCount)
{
fValidator->emitError
(
XMLValid::EmptyNotValidForContent
, topElem->fThisElement->getFormattedContentModel()
);
}
else if (failure >= topElem->fChildCount)
{
fValidator->emitError
(
XMLValid::NotEnoughElemsForCM
, topElem->fThisElement->getFormattedContentModel()
);
}
else
{
fValidator->emitError
(
XMLValid::ElementNotValidForContent
, topElem->fChildren[failure]->getRawName()
, topElem->fThisElement->getFormattedContentModel()
);
}
}
}
// now we can reset the datatype buffer, since the
// application has had a chance to copy the characters somewhere else
((SchemaValidator *)fValidator)->clearDatatypeBuffer();
// If we have a doc handler, tell it about the end tag
if (fDocHandler)
{
if (topElem->fPrefixColonPos != -1)
fPrefixBuf.set(elemName, topElem->fPrefixColonPos);
else
fPrefixBuf.reset();
fDocHandler->endElement
(
*topElem->fThisElement
, uriId
, isRoot
, fPrefixBuf.getRawBuffer()
);
}
// If this was the root, then done with content
gotData = !isRoot;
if (gotData) {
// Restore the grammar
fGrammar = fElemStack.getCurrentGrammar();
fGrammarType = fGrammar->getGrammarType();
fValidator->setGrammar(fGrammar);
// Restore the validation flag
fValidate = fElemStack.getValidationFlag();
}
}
bool XSAXMLScanner::scanStartTag(bool& gotData)
{
// Assume we will still have data until proven otherwise. It will only
// ever be false if this is the root and its empty.
gotData = true;
// Reset element content
fContent.reset();
// The current position is after the open bracket, so we need to read in
// in the element name.
int prefixColonPos;
if (!fReaderMgr.getQName(fQNameBuf, &prefixColonPos))
{
if (fQNameBuf.isEmpty())
emitError(XMLErrs::ExpectedElementName);
else
emitError(XMLErrs::InvalidElementName, fQNameBuf.getRawBuffer());
fReaderMgr.skipToChar(chOpenAngle);
return false;
}
// See if its the root element
const bool isRoot = fElemStack.isEmpty();
// Skip any whitespace after the name
fReaderMgr.skipPastSpaces();
// First we have to do the rawest attribute scan. We don't do any
// normalization of them at all, since we don't know yet what type they
// might be (since we need the element decl in order to do that.)
const XMLCh* qnameRawBuf = fQNameBuf.getRawBuffer();
bool isEmpty;
XMLSize_t attCount = rawAttrScan(qnameRawBuf, *fRawAttrList, isEmpty);
// save the contentleafname and currentscope before addlevel, for later use
ContentLeafNameTypeVector* cv = 0;
XMLContentModel* cm = 0;
unsigned int currentScope = Grammar::TOP_LEVEL_SCOPE;
bool laxThisOne = false;
if (!isRoot)
{
// schema validator will have correct type if validating
SchemaElementDecl* tempElement = (SchemaElementDecl*)
fElemStack.topElement()->fThisElement;
SchemaElementDecl::ModelTypes modelType = tempElement->getModelType();
ComplexTypeInfo *currType = 0;
if (fValidate)
{
currType = ((SchemaValidator*)fValidator)->getCurrentTypeInfo();
if (currType)
modelType = (SchemaElementDecl::ModelTypes)currType->getContentType();
else // something must have gone wrong
modelType = SchemaElementDecl::Any;
}
else {
currType = tempElement->getComplexTypeInfo();
}
if ((modelType == SchemaElementDecl::Mixed_Simple)
|| (modelType == SchemaElementDecl::Mixed_Complex)
|| (modelType == SchemaElementDecl::Children))
{
cm = currType->getContentModel();
cv = cm->getContentLeafNameTypeVector();
currentScope = fElemStack.getCurrentScope();
}
else if (modelType == SchemaElementDecl::Any) {
laxThisOne = true;
}
}
// Now, since we might have to update the namespace map for this element,
// but we don't have the element decl yet, we just tell the element stack
// to expand up to get ready.
XMLSize_t elemDepth = fElemStack.addLevel();
fElemStack.setValidationFlag(fValidate);
fElemStack.setPrefixColonPos(prefixColonPos);
// Make an initial pass through the list and find any xmlns attributes or
// schema attributes.
if (attCount)
scanRawAttrListforNameSpaces(attCount);
// Resolve the qualified name to a URI and name so that we can look up
// the element decl for this element. We have now update the prefix to
// namespace map so we should get the correct element now.
unsigned int uriId = resolveQNameWithColon
(
qnameRawBuf, fPrefixBuf, ElemStack::Mode_Element, prefixColonPos
);
//if schema, check if we should lax or skip the validation of this element
bool parentValidation = fValidate;
if (cv) {
QName element(fPrefixBuf.getRawBuffer(), &qnameRawBuf[prefixColonPos + 1], uriId, fMemoryManager);
// elementDepth will be > 0, as cv is only constructed if element is not
// root.
laxThisOne = laxElementValidation(&element, cv, cm, elemDepth - 1);
}
// Look up the element now in the grammar. This will get us back a
// generic element decl object. We tell him to fault one in if he does
// not find it.
bool wasAdded = false;
const XMLCh* nameRawBuf = &qnameRawBuf[prefixColonPos + 1];
XMLElementDecl* elemDecl = fGrammar->getElemDecl
(
uriId, nameRawBuf, qnameRawBuf, currentScope
);
if (!elemDecl)
{
// URI is different, so we try to switch grammar
if (uriId != fURIStringPool->getId(fGrammar->getTargetNamespace())) {
switchGrammar(getURIText(uriId), laxThisOne);
}
// look for a global element declaration
elemDecl = fGrammar->getElemDecl(
uriId, nameRawBuf, qnameRawBuf, Grammar::TOP_LEVEL_SCOPE
);
if (!elemDecl)
{
// if still not found, look in list of undeclared elements
elemDecl = fElemNonDeclPool->getByKey(
nameRawBuf, uriId, (int)Grammar::TOP_LEVEL_SCOPE);
if (!elemDecl)
{
elemDecl = new (fMemoryManager) SchemaElementDecl
(
fPrefixBuf.getRawBuffer(), nameRawBuf, uriId
, SchemaElementDecl::Any, Grammar::TOP_LEVEL_SCOPE
, fMemoryManager
);
elemDecl->setId (fElemNonDeclPool->put(
(void*)elemDecl->getBaseName(),
uriId,
(int)Grammar::TOP_LEVEL_SCOPE,
(SchemaElementDecl*)elemDecl));
wasAdded = true;
}
}
}
// We do something different here according to whether we found the
// element or not.
bool bXsiTypeSet= (fValidator)?((SchemaValidator*)fValidator)->getIsXsiTypeSet():false;
if (wasAdded || !elemDecl->isDeclared())
{
if (laxThisOne && !bXsiTypeSet) {
fValidate = false;
fElemStack.setValidationFlag(fValidate);
}
// If validating then emit an error
if (fValidate)
{
// This is to tell the reuse Validator that this element was
// faulted-in, was not an element in the grammar pool originally
elemDecl->setCreateReason(XMLElementDecl::JustFaultIn);
if(!bXsiTypeSet)
fValidator->emitError
(
XMLValid::ElementNotDefined, elemDecl->getFullName()
);
}
}
// Now we can update the element stack to set the current element
// decl. We expanded the stack above, but couldn't store the element
// decl because we didn't know it yet.
fElemStack.setElement(elemDecl, fReaderMgr.getCurrentReaderNum());
fElemStack.setCurrentURI(uriId);
if (isRoot) {
fRootElemName = XMLString::replicate(qnameRawBuf, fMemoryManager);
}
// Validate the element
if (fValidate) {
fValidator->validateElement(elemDecl);
}
// squirrel away the element's QName, so that we can do an efficient
// end-tag match
fElemStack.setCurrentSchemaElemName(fQNameBuf.getRawBuffer());
ComplexTypeInfo* typeinfo = (fValidate)
? ((SchemaValidator*)fValidator)->getCurrentTypeInfo()
: ((SchemaElementDecl*) elemDecl)->getComplexTypeInfo();
if (typeinfo)
{
currentScope = typeinfo->getScopeDefined();
// switch grammar if the typeinfo has a different grammar
XMLCh* typeName = typeinfo->getTypeName();
int comma = XMLString::indexOf(typeName, chComma);
if (comma > 0)
{
XMLBufBid bbPrefix(&fBufMgr);
XMLBuffer& prefixBuf = bbPrefix.getBuffer();
prefixBuf.append(typeName, comma);
switchGrammar(prefixBuf.getRawBuffer(), laxThisOne);
}
}
fElemStack.setCurrentScope(currentScope);
// Set element next state
if (elemDepth >= fElemStateSize) {
resizeElemState();
}
fElemState[elemDepth] = 0;
fElemLoopState[elemDepth] = 0;
fElemStack.setCurrentGrammar(fGrammar);
// If this is the first element and we are validating, check the root
// element.
if (!isRoot && parentValidation) {
fElemStack.addChild(elemDecl->getElementName(), true);
}
// Now lets get the fAttrList filled in. This involves faulting in any
// defaulted and fixed attributes and normalizing the values of any that
// we got explicitly.
//
// We update the attCount value with the total number of attributes, but
// it goes in with the number of values we got during the raw scan of
// explictly provided attrs above.
attCount = buildAttList(*fRawAttrList, attCount, elemDecl, *fAttrList);
if(attCount)
{
// clean up after ourselves:
// clear the map used to detect duplicate attributes
fUndeclaredAttrRegistry->removeAll();
}
// Since the element may have default values, call start tag now regardless if it is empty or not
// If we have a document handler, then tell it about this start tag
if (fDocHandler)
{
fDocHandler->startElement
(
*elemDecl, uriId, fPrefixBuf.getRawBuffer(), *fAttrList
, attCount, false, isRoot
);
} // may be where we output something...
// If empty, validate content right now if we are validating and then
// pop the element stack top. Else, we have to update the current stack
// top's namespace mapping elements.
if (isEmpty)
{
// Pop the element stack back off since it'll never be used now
fElemStack.popTop();
// If validating, then insure that its legal to have no content
if (fValidate)
{
XMLSize_t failure;
bool res = fValidator->checkContent(elemDecl, 0, 0, &failure);
if (!res)
{
// REVISIT: in the case of xsi:type, this may
// return the wrong string...
fValidator->emitError
(
XMLValid::ElementNotValidForContent
, elemDecl->getFullName()
, elemDecl->getFormattedContentModel()
);
}
}
// If we have a doc handler, tell it about the end tag
if (fDocHandler)
{
fDocHandler->endElement
(
*elemDecl, uriId, isRoot, fPrefixBuf.getRawBuffer()
);
}
// If the elem stack is empty, then it was an empty root
if (isRoot) {
gotData = false;
}
else
{
// Restore the grammar
fGrammar = fElemStack.getCurrentGrammar();
fGrammarType = fGrammar->getGrammarType();
fValidator->setGrammar(fGrammar);
// Restore the validation flag
fValidate = fElemStack.getValidationFlag();
}
}
return true;
}
// ---------------------------------------------------------------------------
// XSAXMLScanner: XMLScanner virtual methods
// ---------------------------------------------------------------------------
// This method will reset the scanner data structures, and related plugged
// in stuff, for a new scan session. We get the input source for the primary
// XML entity, create the reader for it, and push it on the stack so that
// upon successful return from here we are ready to go.
void XSAXMLScanner::scanReset(const InputSource& src)
{
fGrammar = fSchemaGrammar;
fGrammarType = Grammar::SchemaGrammarType;
fRootGrammar = fSchemaGrammar;
fValidator->setGrammar(fGrammar);
// Reset validation
fValidate = true;
// And for all installed handlers, send reset events. This gives them
// a chance to flush any cached data.
if (fDocHandler)
fDocHandler->resetDocument();
if (fEntityHandler)
fEntityHandler->resetEntities();
if (fErrorReporter)
fErrorReporter->resetErrors();
// Clear out the id reference list
resetValidationContext();
// Reset the Root Element Name
if (fRootElemName) {
fMemoryManager->deallocate(fRootElemName);//delete [] fRootElemName;
}
fRootElemName = 0;
// Reset the element stack, and give it the latest ids for the special
// URIs it has to know about.
fElemStack.reset
(
fEmptyNamespaceId, fUnknownNamespaceId, fXMLNamespaceId, fXMLNSNamespaceId
);
if (!fSchemaNamespaceId)
fSchemaNamespaceId = fURIStringPool->addOrFind(SchemaSymbols::fgURI_XSI);
// Reset some status flags
fInException = false;
fStandalone = false;
fErrorCount = 0;
fHasNoDTD = true;
fSeeXsi = false;
fDoNamespaces = true;
fDoSchema = true;
// Reset the validators
fSchemaValidator->reset();
fSchemaValidator->setErrorReporter(fErrorReporter);
fSchemaValidator->setExitOnFirstFatal(fExitOnFirstFatal);
fSchemaValidator->setGrammarResolver(fGrammarResolver);
// Handle the creation of the XML reader object for this input source.
// This will provide us with transcoding and basic lexing services.
XMLReader* newReader = fReaderMgr.createReader
(
src
, true
, XMLReader::RefFrom_NonLiteral
, XMLReader::Type_General
, XMLReader::Source_External
, fCalculateSrcOfs
, fLowWaterMark
);
if (!newReader) {
if (src.getIssueFatalErrorIfNotFound())
ThrowXMLwithMemMgr1(RuntimeException, XMLExcepts::Scan_CouldNotOpenSource, src.getSystemId(), fMemoryManager);
else
ThrowXMLwithMemMgr1(RuntimeException, XMLExcepts::Scan_CouldNotOpenSource_Warning, src.getSystemId(), fMemoryManager);
}
// Push this read onto the reader manager
fReaderMgr.pushReader(newReader, 0);
// and reset security-related things if necessary:
if(fSecurityManager != 0)
{
fEntityExpansionLimit = fSecurityManager->getEntityExpansionLimit();
fEntityExpansionCount = 0;
}
fElemCount = 0;
if (fUIntPoolRowTotal >= 32)
{ // 8 KB tied up with validating attributes...
fAttDefRegistry->removeAll();
recreateUIntPool();
}
else
{
// note that this will implicitly reset the values of the hashtables,
// though their buckets will still be tied up
resetUIntPool();
}
fUndeclaredAttrRegistry->removeAll();
}
void XSAXMLScanner::scanRawAttrListforNameSpaces(XMLSize_t attCount)
{
// Make an initial pass through the list and find any xmlns attributes or
// schema attributes.
// When we find one, send it off to be used to update the element stack's
// namespace mappings.
XMLSize_t index = 0;
for (index = 0; index < attCount; index++)
{
// each attribute has the prefix:suffix="value"
const KVStringPair* curPair = fRawAttrList->elementAt(index);
const XMLCh* rawPtr = curPair->getKey();
// If either the key begins with "xmlns:" or its just plain
// "xmlns", then use it to update the map.
if (!XMLString::compareNString(rawPtr, XMLUni::fgXMLNSColonString, 6)
|| XMLString::equals(rawPtr, XMLUni::fgXMLNSString))
{
const XMLCh* valuePtr = curPair->getValue();
updateNSMap(rawPtr, valuePtr, fRawAttrColonList[index]);
// if the schema URI is seen in the the valuePtr, set the boolean seeXsi
if (XMLString::equals(valuePtr, SchemaSymbols::fgURI_XSI)) {
fSeeXsi = true;
}
}
}
// walk through the list again to deal with "xsi:...."
if (fSeeXsi)
{
// Schema Xsi Type yyyy (e.g. xsi:type="yyyyy")
XMLBufBid bbXsi(&fBufMgr);
XMLBuffer& fXsiType = bbXsi.getBuffer();
QName attName(fMemoryManager);
for (index = 0; index < attCount; index++)
{
// each attribute has the prefix:suffix="value"
const KVStringPair* curPair = fRawAttrList->elementAt(index);
const XMLCh* rawPtr = curPair->getKey();
attName.setName(rawPtr, fEmptyNamespaceId);
const XMLCh* prefPtr = attName.getPrefix();
// if schema URI has been seen, scan for the schema location and uri
// and resolve the schema grammar; or scan for schema type
if (resolvePrefix(prefPtr, ElemStack::Mode_Attribute) == fSchemaNamespaceId) {
const XMLCh* valuePtr = curPair->getValue();
const XMLCh* suffPtr = attName.getLocalPart();
if (XMLString::equals(suffPtr, SchemaSymbols::fgXSI_TYPE))
{
// normalize the attribute according to schema whitespace facet
DatatypeValidator* tempDV = DatatypeValidatorFactory::getBuiltInRegistry()->get(SchemaSymbols::fgDT_QNAME);
((SchemaValidator*) fValidator)->normalizeWhiteSpace(tempDV, valuePtr, fXsiType, true);
}
else if (XMLString::equals(suffPtr, SchemaSymbols::fgATT_NILL))
{
// normalize the attribute according to schema whitespace facet
XMLBuffer& fXsiNil = fBufMgr.bidOnBuffer();
DatatypeValidator* tempDV = DatatypeValidatorFactory::getBuiltInRegistry()->get(SchemaSymbols::fgDT_BOOLEAN);
((SchemaValidator*) fValidator)->normalizeWhiteSpace(tempDV, valuePtr, fXsiNil, true);
if(XMLString::equals(fXsiNil.getRawBuffer(), SchemaSymbols::fgATTVAL_TRUE))
((SchemaValidator*)fValidator)->setNillable(true);
else if(XMLString::equals(fXsiNil.getRawBuffer(), SchemaSymbols::fgATTVAL_FALSE))
((SchemaValidator*)fValidator)->setNillable(false);
else
emitError(XMLErrs::InvalidAttValue, fXsiNil.getRawBuffer(), valuePtr);
fBufMgr.releaseBuffer(fXsiNil);
}
}
}
if (!fXsiType.isEmpty())
{
int colonPos = -1;
unsigned int uriId = resolveQName
(
fXsiType.getRawBuffer(), fPrefixBuf, ElemStack::Mode_Element, colonPos
);
((SchemaValidator*)fValidator)->setXsiType(fPrefixBuf.getRawBuffer(), fXsiType.getRawBuffer() + colonPos + 1, uriId);
}
}
}
void XSAXMLScanner::switchGrammar( const XMLCh* const uriStr
, bool laxValidate)
{
Grammar* tempGrammar = 0;
if (XMLString::equals(uriStr, SchemaSymbols::fgURI_SCHEMAFORSCHEMA)) {
tempGrammar = fSchemaGrammar;
}
else {
tempGrammar = fGrammarResolver->getGrammar(uriStr);
}
if (tempGrammar && tempGrammar->getGrammarType() == Grammar::SchemaGrammarType)
{
fGrammar = tempGrammar;
fGrammarType = Grammar::SchemaGrammarType;
fValidator->setGrammar(fGrammar);
}
else if(!laxValidate) {
fValidator->emitError(XMLValid::GrammarNotFound, uriStr);
}
}
XERCES_CPP_NAMESPACE_END
@@ -0,0 +1,98 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* $Id: XSAXMLScanner.hpp 676911 2008-07-15 13:27:32Z amassari $
*/
#if !defined(XERCESC_INCLUDE_GUARD_XSAXMLSCANNER_HPP)
#define XERCESC_INCLUDE_GUARD_XSAXMLSCANNER_HPP
#include <xercesc/internal/SGXMLScanner.hpp>
XERCES_CPP_NAMESPACE_BEGIN
//
// This is a scanner class, which processes/validates contents of XML Schema
// Annotations. It's intended for internal use only.
//
class XMLPARSER_EXPORT XSAXMLScanner : public SGXMLScanner
{
public :
// -----------------------------------------------------------------------
// Destructor
// -----------------------------------------------------------------------
virtual ~XSAXMLScanner();
// -----------------------------------------------------------------------
// XMLScanner public virtual methods
// -----------------------------------------------------------------------
virtual const XMLCh* getName() const;
protected:
// -----------------------------------------------------------------------
// Constructors
// -----------------------------------------------------------------------
/**
* The grammar representing the XML Schema annotation (xsaGrammar) is
* passed in by the caller. The scanner will own it and is responsible
* for deleting it.
*/
XSAXMLScanner
(
GrammarResolver* const grammarResolver
, XMLStringPool* const uriStringPool
, SchemaGrammar* const xsaGrammar
, MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
);
friend class TraverseSchema;
// -----------------------------------------------------------------------
// XMLScanner virtual methods
// -----------------------------------------------------------------------
virtual void scanReset(const InputSource& src);
// -----------------------------------------------------------------------
// SGXMLScanner virtual methods
// -----------------------------------------------------------------------
virtual bool scanStartTag(bool& gotData);
virtual void scanEndTag(bool& gotData);
private :
// -----------------------------------------------------------------------
// Unimplemented constructors and operators
// -----------------------------------------------------------------------
XSAXMLScanner();
XSAXMLScanner(const XSAXMLScanner&);
XSAXMLScanner& operator=(const XSAXMLScanner&);
// -----------------------------------------------------------------------
// Private helper methods
// -----------------------------------------------------------------------
void scanRawAttrListforNameSpaces(XMLSize_t attCount);
void switchGrammar(const XMLCh* const newGrammarNameSpace, bool laxValidate);
};
inline const XMLCh* XSAXMLScanner::getName() const
{
return XMLUni::fgXSAXMLScanner;
}
XERCES_CPP_NAMESPACE_END
#endif
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,237 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* $Id: XSObjectFactory.hpp 678409 2008-07-21 13:08:10Z borisk $
*/
#if !defined(XERCESC_INCLUDE_GUARD_XSOBJECTFACTORY_HPP)
#define XERCESC_INCLUDE_GUARD_XSOBJECTFACTORY_HPP
#include <xercesc/framework/psvi/XSConstants.hpp>
#include <xercesc/util/RefHashTableOf.hpp>
XERCES_CPP_NAMESPACE_BEGIN
class XSObject;
class XSAttributeUse;
class XSAttributeDeclaration;
class XSModel;
class XSElementDeclaration;
class XSSimpleTypeDefinition;
class XSComplexTypeDefinition;
class XSModelGroupDefinition;
class XSAttributeGroupDefinition;
class XSWildcard;
class XSParticle;
class XSAnnotation;
class XSNamespaceItem;
class XSNotationDeclaration;
class SchemaAttDef;
class SchemaElementDecl;
class DatatypeValidator;
class ContentSpecNode;
class ComplexTypeInfo;
class XercesGroupInfo;
class XercesAttGroupInfo;
class XSIDCDefinition;
class IdentityConstraint;
class XMLNotationDecl;
/**
* Factory class to create various XSObject(s)
* Used by XSModel
*/
class XMLPARSER_EXPORT XSObjectFactory : public XMemory
{
public:
// -----------------------------------------------------------------------
// Constructors and Destructor
// -----------------------------------------------------------------------
XSObjectFactory(MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager);
~XSObjectFactory();
private:
// -----------------------------------------------------------------------
// Unimplemented constructors and destructor
// -----------------------------------------------------------------------
XSObjectFactory(const XSObjectFactory&);
XSObjectFactory& operator=(const XSObjectFactory&);
// -----------------------------------------------------------------------
// factory methods
// -----------------------------------------------------------------------
XSParticle* createModelGroupParticle
(
const ContentSpecNode* const node
, XSModel* const xsModel
);
XSAttributeDeclaration* addOrFind
(
SchemaAttDef* const attDef
, XSModel* const xsModel
, XSComplexTypeDefinition* const enclosingTypeDef = 0
);
XSSimpleTypeDefinition* addOrFind
(
DatatypeValidator* const validator
, XSModel* const xsModel
, bool isAnySimpleType = false
);
XSElementDeclaration* addOrFind
(
SchemaElementDecl* const elemDecl
, XSModel* const xsModel
, XSComplexTypeDefinition* const enclosingTypeDef = 0
);
XSComplexTypeDefinition* addOrFind
(
ComplexTypeInfo* const typeInfo
, XSModel* const xsModel
);
XSIDCDefinition* addOrFind
(
IdentityConstraint* const ic
, XSModel* const xsModel
);
XSNotationDeclaration* addOrFind
(
XMLNotationDecl* const notDecl
, XSModel* const xsModel
);
XSAttributeUse* createXSAttributeUse
(
XSAttributeDeclaration* const xsAttDecl
, XSModel* const xsModel
);
XSWildcard* createXSWildcard
(
SchemaAttDef* const attDef
, XSModel* const xsModel
);
XSWildcard* createXSWildcard
(
const ContentSpecNode* const rootNode
, XSModel* const xsModel
);
XSModelGroupDefinition* createXSModelGroupDefinition
(
XercesGroupInfo* const groupInfo
, XSModel* const xsModel
);
XSAttributeGroupDefinition* createXSAttGroupDefinition
(
XercesAttGroupInfo* const attGroupInfo
, XSModel* const xsModel
);
// -----------------------------------------------------------------------
// Helper methods
// -----------------------------------------------------------------------
// creates a particle corresponding to an element
XSParticle* createElementParticle
(
const ContentSpecNode* const rootNode
, XSModel* const xsModel
);
// creates a particle corresponding to a wildcard
XSParticle* createWildcardParticle
(
const ContentSpecNode* const rootNode
, XSModel* const xsModel
);
XSAnnotation* getAnnotationFromModel
(
XSModel* const xsModel
, const void* const key
);
void buildAllParticles
(
const ContentSpecNode* const rootNode
, XSParticleList* const particleList
, XSModel* const xsModel
);
void buildChoiceSequenceParticles
(
const ContentSpecNode* const rootNode
, XSParticleList* const particleList
, XSModel* const xsModel
);
void putObjectInMap
(
void* key
, XSObject* const object
);
XSObject* getObjectFromMap
(
void* key
);
void processFacets
(
DatatypeValidator* const dv
, XSModel* const xsModel
, XSSimpleTypeDefinition* const xsST
);
void processAttUse
(
SchemaAttDef* const attDef
, XSAttributeUse* const xsAttUse
);
bool isMultiValueFacetDefined(DatatypeValidator* const dv);
// make XSModel our friend
friend class XSModel;
// -----------------------------------------------------------------------
// Private Data Members
//
// fMemoryManager
// The memory manager used to create various XSObject(s).
// -----------------------------------------------------------------------
MemoryManager* fMemoryManager;
RefHashTableOf<XSObject, PtrHasher>* fXercesToXSMap;
RefVectorOf<XSObject>* fDeleteVector;
};
inline XSObject* XSObjectFactory::getObjectFromMap(void* key)
{
return fXercesToXSMap->get(key);
}
XERCES_CPP_NAMESPACE_END
#endif
+117
View File
@@ -0,0 +1,117 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* $Id: XSerializable.hpp 527149 2007-04-10 14:56:39Z amassari $
*/
#if !defined(XERCESC_INCLUDE_GUARD_XSERIALIZABLE_HPP)
#define XERCESC_INCLUDE_GUARD_XSERIALIZABLE_HPP
#include <xercesc/internal/XSerializeEngine.hpp>
#include <xercesc/internal/XProtoType.hpp>
XERCES_CPP_NAMESPACE_BEGIN
class XMLUTIL_EXPORT XSerializable
{
public :
// -----------------------------------------------------------------------
// Constructors and Destructor
// -----------------------------------------------------------------------
virtual ~XSerializable() {} ;
// -----------------------------------------------------------------------
// Serialization Interface
// -----------------------------------------------------------------------
virtual bool isSerializable() const = 0;
virtual void serialize(XSerializeEngine& ) = 0;
virtual XProtoType* getProtoType() const = 0;
protected:
XSerializable() {}
XSerializable(const XSerializable& ) {}
private:
// -----------------------------------------------------------------------
// Unimplemented assignment operator
// -----------------------------------------------------------------------
XSerializable& operator=(const XSerializable&);
};
inline void XSerializable::serialize(XSerializeEngine& )
{
}
/***
* Macro to be included in XSerializable derivatives'
* declaration's public section
***/
#define DECL_XSERIALIZABLE(class_name) \
public: \
\
DECL_XPROTOTYPE(class_name) \
\
virtual bool isSerializable() const ; \
virtual XProtoType* getProtoType() const; \
virtual void serialize(XSerializeEngine&); \
\
inline friend XSerializeEngine& operator>>(XSerializeEngine& serEng \
, class_name*& objPtr) \
{objPtr = (class_name*) serEng.read(XPROTOTYPE_CLASS(class_name)); \
return serEng; \
};
/***
* Macro to be included in the implementation file
* of XSerializable derivatives' which is instantiable
***/
#define IMPL_XSERIALIZABLE_TOCREATE(class_name) \
IMPL_XPROTOTYPE_TOCREATE(class_name) \
IMPL_XSERIAL(class_name)
/***
* Macro to be included in the implementation file
* of XSerializable derivatives' which is UN-instantiable
***/
#define IMPL_XSERIALIZABLE_NOCREATE(class_name) \
IMPL_XPROTOTYPE_NOCREATE(class_name) \
IMPL_XSERIAL(class_name)
/***
* Helper Macro
***/
#define IMPL_XSERIAL(class_name) \
bool class_name::isSerializable() const \
{return true; } \
XProtoType* class_name::getProtoType() const \
{return XPROTOTYPE_CLASS(class_name); }
#define IS_EQUIVALENT(lptr, rptr) \
if (lptr == rptr) \
return true; \
if (( lptr && !rptr) || (!lptr && rptr)) \
return false;
XERCES_CPP_NAMESPACE_END
#endif
@@ -0,0 +1,34 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* $Id: XSerializationException.hpp 527149 2007-04-10 14:56:39Z amassari $
*/
#if !defined(XERCESC_INCLUDE_GUARD_XSERIALIZATION_EXCEPTION_HPP)
#define XERCESC_INCLUDE_GUARD_XSERIALIZATION_EXCEPTION_HPP
#include <xercesc/util/XercesDefs.hpp>
#include <xercesc/util/XMLException.hpp>
XERCES_CPP_NAMESPACE_BEGIN
MakeXMLException(XSerializationException, XMLUTIL_EXPORT)
XERCES_CPP_NAMESPACE_END
#endif
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,841 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* $Id: XSerializeEngine.hpp 679296 2008-07-24 08:13:42Z borisk $
*/
#if !defined(XERCESC_INCLUDE_GUARD_XSERIALIZE_ENGINE_HPP)
#define XERCESC_INCLUDE_GUARD_XSERIALIZE_ENGINE_HPP
#include <xercesc/util/RefHashTableOf.hpp>
#include <xercesc/util/ValueVectorOf.hpp>
#include <xercesc/util/XMLExceptMsgs.hpp>
#include <xercesc/internal/XSerializationException.hpp>
XERCES_CPP_NAMESPACE_BEGIN
class XSerializable;
class XProtoType;
class MemoryManager;
class XSerializedObjectId;
class BinOutputStream;
class BinInputStream;
class XMLGrammarPool;
class XMLGrammarPoolImpl;
class XMLStringPool;
class XMLUTIL_EXPORT XSerializeEngine
{
public:
enum { mode_Store
, mode_Load
};
static const bool toReadBufferLen;
typedef unsigned int XSerializedObjectId_t;
/***
*
* Destructor
*
***/
~XSerializeEngine();
/***
*
* Constructor for de-serialization(loading)
*
* Application needs to make sure that the instance of
* BinInputStream, persists beyond the life of this
* SerializeEngine.
*
* Param
* inStream input stream
* gramPool Grammar Pool
* bufSize the size of the internal buffer
*
***/
XSerializeEngine(BinInputStream* inStream
, XMLGrammarPool* const gramPool
, XMLSize_t bufSize = 8192 );
/***
*
* Constructor for serialization(storing)
*
* Application needs to make sure that the instance of
* BinOutputStream, persists beyond the life of this
* SerializeEngine.
*
* Param
* outStream output stream
* gramPool Grammar Pool
* bufSize the size of the internal buffer
*
***/
XSerializeEngine(BinOutputStream* outStream
, XMLGrammarPool* const gramPool
, XMLSize_t bufSize = 8192 );
/***
*
* When serialization, flush out the internal buffer
*
* Return:
*
***/
void flush();
/***
*
* Checking if the serialize engine is doing serialization(storing)
*
* Return: true, if it is
* false, otherwise
*
***/
inline bool isStoring() const;
/***
*
* Checking if the serialize engine is doing de-serialization(loading)
*
* Return: true, if it is
* false, otherwise
*
***/
inline bool isLoading() const;
/***
*
* Get the GrammarPool
*
* Return: XMLGrammarPool
*
***/
XMLGrammarPool* getGrammarPool() const;
/***
*
* Get the StringPool
*
* Return: XMLStringPool
*
***/
XMLStringPool* getStringPool() const;
/***
*
* Get the embeded Memory Manager
*
* Return: MemoryManager
*
***/
MemoryManager* getMemoryManager() const;
/***
*
* Get the storer level (the level of the serialize engine
* which created the binary stream that this serialize engine
* is loading).
*
* The level returned is meaningful only when
* the engine isLoading.
*
* Return: level
*
***/
inline unsigned int getStorerLevel() const;
/***
*
* Write object to the internal buffer.
*
* Param
* objectToWrite: the object to be serialized
*
* Return:
*
***/
void write(XSerializable* const objectToWrite);
/***
*
* Write prototype info to the internal buffer.
*
* Param
* protoType: instance of prototype
*
* Return:
*
***/
void write(XProtoType* const protoType);
/***
*
* Write a stream of XMLByte to the internal buffer.
*
* Param
* toWrite: the stream of XMLByte to write
* writeLen: the length of the stream
*
* Return:
*
***/
void write(const XMLByte* const toWrite
, XMLSize_t writeLen);
/***
*
* Write a stream of XMLCh to the internal buffer.
*
* Param
* toWrite: the stream of XMLCh to write
* writeLen: the length of the stream
*
* Return:
*
***/
void write(const XMLCh* const toWrite
, XMLSize_t writeLen);
/***
*
* Write a stream of XMLCh to the internal buffer.
*
* Write the bufferLen first if requested, then the length
* of the stream followed by the stream.
*
* Param
* toWrite: the stream of XMLCh to write
* bufferLen: the maximum size of the buffer
* toWriteBufLen: specify if the bufferLen need to be written or not
*
* Return:
*
***/
void writeString(const XMLCh* const toWrite
, const XMLSize_t bufferLen = 0
, bool toWriteBufLen = false);
/***
*
* Write a stream of XMLByte to the internal buffer.
*
* Write the bufferLen first if requested, then the length
* of the stream followed by the stream.
*
* Param
* toWrite: the stream of XMLByte to write
* bufferLen: the maximum size of the buffer
* toWriteBufLen: specify if the bufferLen need to be written or not
*
* Return:
*
***/
void writeString(const XMLByte* const toWrite
, const XMLSize_t bufferLen = 0
, bool toWriteBufLen = false);
static const bool toWriteBufferLen;
/***
*
* Read/Create object from the internal buffer.
*
* Param
* protoType: an instance of prototype of the object anticipated
*
* Return: to object read/created
*
***/
XSerializable* read(XProtoType* const protoType);
/***
*
* Read prototype object from the internal buffer.
* Verify if the same prototype object found in buffer.
*
* Param
* protoType: an instance of prototype of the object anticipated
* objTag: the object Tag to an existing object
*
* Return: true : if matching found
* false : otherwise
*
***/
bool read(XProtoType* const protoType
, XSerializedObjectId_t* objTag);
/***
*
* Read XMLByte stream from the internal buffer.
*
* Param
* toRead: the buffer to hold the XMLByte stream
* readLen: the length of the XMLByte to read in
*
* Return:
*
***/
void read(XMLByte* const toRead
, XMLSize_t readLen);
/***
*
* Read XMLCh stream from the internal buffer.
*
* Param
* toRead: the buffer to hold the XMLCh stream
* readLen: the length of the XMLCh to read in
*
* Return:
*
***/
void read(XMLCh* const toRead
, XMLSize_t readLen);
/***
*
* Read a stream of XMLCh from the internal buffer.
*
* Read the bufferLen first if requested, then the length
* of the stream followed by the stream.
*
* Param
* toRead: the pointer to the buffer to hold the XMLCh stream
* bufferLen: the size of the buffer created
* dataLen: the length of the stream
* toReadBufLen: specify if the bufferLen need to be read or not
*
* Return:
*
***/
void readString(XMLCh*& toRead
, XMLSize_t& bufferLen
, XMLSize_t& dataLen
, bool toReadBufLen = false);
/***
*
* Read a stream of XMLCh from the internal buffer.
*
* Read the bufferLen first if requested, then the length
* of the stream followed by the stream.
*
* Param
* toRead: the pointer to the buffer to hold the XMLCh stream
* bufferLen: the size of the buffer created
*
* Return:
*
***/
inline void readString(XMLCh*& toRead
, XMLSize_t& bufferLen);
/***
*
* Read a stream of XMLCh from the internal buffer.
*
* Param
* toRead: the pointer to the buffer to hold the XMLCh stream
*
* Return:
*
***/
inline void readString(XMLCh*& toRead);
/***
*
* Read a stream of XMLByte from the internal buffer.
*
* Read the bufferLen first if requested, then the length
* of the stream followed by the stream.
*
* Param
* toRead: the pointer to the buffer to hold the XMLByte stream
* bufferLen: the size of the buffer created
* dataLen: the length of the stream
* toReadBufLen: specify if the bufferLen need to be read or not
*
* Return:
*
***/
void readString(XMLByte*& toRead
, XMLSize_t& bufferLen
, XMLSize_t& dataLen
, bool toReadBufLen = false);
/***
*
* Read a stream of XMLByte from the internal buffer.
*
* Read the bufferLen first if requested, then the length
* of the stream followed by the stream.
*
* Param
* toRead: the pointer to the buffer to hold the XMLByte stream
* bufferLen: the size of the buffer created
*
* Return:
*
***/
inline void readString(XMLByte*& toRead
, XMLSize_t& bufferLen);
/***
*
* Read a stream of XMLByte from the internal buffer.
*
* Read the bufferLen first if requested, then the length
* of the stream followed by the stream.
*
* Param
* toRead: the pointer to the buffer to hold the XMLByte stream
* bufferLen: the size of the buffer created
* dataLen: the length of the stream
* toReadBufLen: specify if the bufferLen need to be read or not
*
* Return:
*
***/
inline void readString(XMLByte*& toRead);
/***
*
* Check if the template object has been stored or not
*
* Param
* objectPtr: the template object pointer
*
* Return: true : the object has NOT been stored yet
* false : otherwise
*
***/
bool needToStoreObject(void* const templateObjectToWrite);
/***
*
* Check if the template object has been loaded or not
*
* Param
* objectPtr: the address of the template object pointer
*
* Return: true : the object has NOT been loaded yet
* false : otherwise
*
***/
bool needToLoadObject(void** templateObjectToRead);
/***
*
* In the case of needToLoadObject() return true, the client
* application needs to instantiate an expected template object, and
* register the address to the engine.
*
* Param
* objectPtr: the template object pointer newly instantiated
*
* Return:
*
***/
void registerObject(void* const templateObjectToRegister);
/***
*
* Insertion operator for serializable classes
*
***/
friend XSerializeEngine& operator<<(XSerializeEngine&
, XSerializable* const );
/***
*
* Insertion operators for
* . basic Xerces data types
* . built-in types
*
***/
XSerializeEngine& operator<<(XMLByte);
XSerializeEngine& operator<<(XMLCh);
XSerializeEngine& operator<<(char);
XSerializeEngine& operator<<(short);
XSerializeEngine& operator<<(int);
XSerializeEngine& operator<<(unsigned int);
XSerializeEngine& operator<<(long);
XSerializeEngine& operator<<(unsigned long);
XSerializeEngine& operator<<(float);
XSerializeEngine& operator<<(double);
XSerializeEngine& operator<<(bool);
// These cannot be done as operators since on some platforms they
// may collide with int/long types.
//
void writeSize (XMLSize_t);
void writeInt64 (XMLInt64);
void writeUInt64 (XMLUInt64);
/***
*
* Extraction operators for
* . basic Xerces data types
* . built-in types
*
***/
XSerializeEngine& operator>>(XMLByte&);
XSerializeEngine& operator>>(XMLCh&);
XSerializeEngine& operator>>(char&);
XSerializeEngine& operator>>(short&);
XSerializeEngine& operator>>(int&);
XSerializeEngine& operator>>(unsigned int&);
XSerializeEngine& operator>>(long&);
XSerializeEngine& operator>>(unsigned long&);
XSerializeEngine& operator>>(float&);
XSerializeEngine& operator>>(double&);
XSerializeEngine& operator>>(bool&);
void readSize (XMLSize_t&);
void readInt64 (XMLInt64&);
void readUInt64 (XMLUInt64&);
/***
*
* Getters
*
***/
inline
XMLSize_t getBufSize() const;
inline
XMLSize_t getBufCur() const;
inline
XMLSize_t getBufCurAccumulated() const;
inline
unsigned long getBufCount() const;
void trace(char*) const;
private:
// -----------------------------------------------------------------------
// Unimplemented constructors and operators
// -----------------------------------------------------------------------
XSerializeEngine();
XSerializeEngine(const XSerializeEngine&);
XSerializeEngine& operator=(const XSerializeEngine&);
/***
*
* Store Pool Opertions
*
***/
XSerializedObjectId_t lookupStorePool(void* const objectPtr) const;
void addStorePool(void* const objectPtr);
/***
*
* Load Pool Opertions
*
***/
XSerializable* lookupLoadPool(XSerializedObjectId_t objectTag) const;
void addLoadPool(void* const objectPtr);
/***
*
* Intenal Buffer Operations
*
***/
inline void checkAndFillBuffer(XMLSize_t bytesNeedToRead);
inline void checkAndFlushBuffer(XMLSize_t bytesNeedToWrite);
void fillBuffer();
void flushBuffer();
void pumpCount();
inline void resetBuffer();
/***
*
* Helper
*
***/
inline void ensureStoring() const;
inline void ensureLoading() const;
inline void ensureStoreBuffer() const;
inline void ensureLoadBuffer() const;
inline void ensurePointer(void* const) const;
inline void Assert(bool toEval
, const XMLExcepts::Codes toThrow) const;
inline XMLSize_t calBytesNeeded(XMLSize_t) const;
inline XMLSize_t alignAdjust(XMLSize_t) const;
inline void alignBufCur(XMLSize_t);
// Make XTemplateSerializer friend of XSerializeEngine so that
// we can call lookupStorePool and lookupLoadPool in the case of
// annotations.
friend class XTemplateSerializer;
// -------------------------------------------------------------------------------
// data
//
// fStoreLoad:
// Indicator: storing(serialization) or loading(de-serialization)
//
// fStorerLevel:
// The level of the serialize engine which created the binary
// stream that this serialize engine is loading
//
// It is set by GrammarPool when loading
//
// fGrammarPool:
// Thw owning GrammarPool which instantiate this SerializeEngine
// instance
//
// fInputStream:
// Binary stream to read from (de-serialization), provided
// by client application, not owned.
//
// fOutputStream:
// Binary stream to write to (serialization), provided
// by client application, not owned.
//
// fBufSize:
// The size of the internal buffer
//
// fBufStart/fBufEnd:
//
// The internal buffer.
// fBufEnd:
// one beyond the last valid cell
// fBufEnd === (fBufStart + fBufSize)
//
// fBufCur:
// The cursor of the buffer
//
// fBufLoadMax:
// Indicating the end of the valid content in the buffer
//
// fStorePool:
// Object collection for storing
//
// fLoadPool:
// Object collection for loading
//
// fMapCount:
// -------------------------------------------------------------------------------
const short fStoreLoad;
unsigned int fStorerLevel;
XMLGrammarPool* const fGrammarPool;
BinInputStream* const fInputStream;
BinOutputStream* const fOutputStream;
unsigned long fBufCount;
//buffer
const XMLSize_t fBufSize;
XMLByte* const fBufStart;
XMLByte* const fBufEnd;
XMLByte* fBufCur;
XMLByte* fBufLoadMax;
/***
* Map for storing object
*
* key: XSerializable*
* XProtoType*
*
* value: XMLInteger*, owned
*
***/
RefHashTableOf<XSerializedObjectId, PtrHasher>* fStorePool;
/***
* Vector for loading object, objects are NOT owned
*
* data: XSerializable*
* XProtoType*
*
***/
ValueVectorOf<void*>* fLoadPool;
/***
* object counter
***/
XSerializedObjectId_t fObjectCount;
//to allow grammar pool to set storer level when loading
friend class XMLGrammarPoolImpl;
};
inline bool XSerializeEngine::isStoring() const
{
return (fStoreLoad == mode_Store);
}
inline bool XSerializeEngine::isLoading() const
{
return (fStoreLoad == mode_Load);
}
inline XSerializeEngine& operator<<(XSerializeEngine& serEng
, XSerializable* const serObj)
{
serEng.write(serObj);
return serEng;
}
inline void XSerializeEngine::ensureStoring() const
{
Assert(isStoring(), XMLExcepts::XSer_Storing_Violation);
}
inline void XSerializeEngine::ensureLoading() const
{
Assert(isLoading(), XMLExcepts::XSer_Loading_Violation);
}
inline void XSerializeEngine::Assert(bool toEval
, const XMLExcepts::Codes toThrow) const
{
if (!toEval)
{
ThrowXMLwithMemMgr(XSerializationException, toThrow, getMemoryManager());
}
}
inline void XSerializeEngine::readString(XMLCh*& toRead
, XMLSize_t& bufferLen)
{
XMLSize_t dummyDataLen;
readString(toRead, bufferLen, dummyDataLen);
}
inline void XSerializeEngine::readString(XMLCh*& toRead)
{
XMLSize_t dummyBufferLen;
XMLSize_t dummyDataLen;
readString(toRead, dummyBufferLen, dummyDataLen);
}
inline void XSerializeEngine::readString(XMLByte*& toRead
, XMLSize_t& bufferLen)
{
XMLSize_t dummyDataLen;
readString(toRead, bufferLen, dummyDataLen);
}
inline void XSerializeEngine::readString(XMLByte*& toRead)
{
XMLSize_t dummyBufferLen;
XMLSize_t dummyDataLen;
readString(toRead, dummyBufferLen, dummyDataLen);
}
inline
XMLSize_t XSerializeEngine::getBufSize() const
{
return fBufSize;
}
inline
XMLSize_t XSerializeEngine::getBufCur() const
{
return (fBufCur-fBufStart);
}
inline
XMLSize_t XSerializeEngine::getBufCurAccumulated() const
{
return (fBufCount - (isStoring() ? 0: 1)) * fBufSize + (fBufCur-fBufStart);
}
inline
unsigned long XSerializeEngine::getBufCount() const
{
return fBufCount;
}
inline
unsigned int XSerializeEngine::getStorerLevel() const
{
return fStorerLevel;
}
/***
* Ought to be nested class
***/
class XSerializedObjectId : public XMemory
{
public:
~XSerializedObjectId(){};
private:
inline XSerializedObjectId(XSerializeEngine::XSerializedObjectId_t val):
fData(val) { };
inline XSerializeEngine::XSerializedObjectId_t getValue() const {return fData; };
friend class XSerializeEngine;
private:
// -----------------------------------------------------------------------
// Unimplemented constructors and operators
// -----------------------------------------------------------------------
XSerializedObjectId();
XSerializedObjectId(const XSerializedObjectId&);
XSerializedObjectId& operator=(const XSerializedObjectId&);
XSerializeEngine::XSerializedObjectId_t fData;
};
XERCES_CPP_NAMESPACE_END
#endif
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,365 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* $Id: XTemplateSerializer.hpp 678409 2008-07-21 13:08:10Z borisk $
*/
#if !defined(XERCESC_INCLUDE_GUARD_XTEMPLATE_SERIALIZER_HPP)
#define XERCESC_INCLUDE_GUARD_XTEMPLATE_SERIALIZER_HPP
#include <xercesc/util/ValueVectorOf.hpp>
#include <xercesc/util/RefArrayVectorOf.hpp>
#include <xercesc/util/RefVectorOf.hpp>
#include <xercesc/util/RefHashTableOf.hpp>
#include <xercesc/util/RefHash2KeysTableOf.hpp>
#include <xercesc/util/RefHash3KeysIdPool.hpp>
#include <xercesc/util/NameIdPool.hpp>
#include <xercesc/framework/XMLNotationDecl.hpp>
#include <xercesc/framework/XMLRefInfo.hpp>
#include <xercesc/util/XMLNumber.hpp>
#include <xercesc/validators/common/ContentSpecNode.hpp>
#include <xercesc/validators/DTD/DTDAttDef.hpp>
#include <xercesc/validators/DTD/DTDElementDecl.hpp>
#include <xercesc/validators/DTD/DTDEntityDecl.hpp>
#include <xercesc/validators/schema/SchemaAttDef.hpp>
#include <xercesc/validators/schema/SchemaElementDecl.hpp>
#include <xercesc/validators/schema/XercesGroupInfo.hpp>
#include <xercesc/validators/schema/XercesAttGroupInfo.hpp>
#include <xercesc/validators/schema/SchemaGrammar.hpp>
#include <xercesc/validators/schema/identity/IC_Field.hpp>
#include <xercesc/validators/schema/identity/IdentityConstraint.hpp>
#include <xercesc/validators/schema/identity/XercesXPath.hpp>
#include <xercesc/framework/psvi/XSAnnotation.hpp>
XERCES_CPP_NAMESPACE_BEGIN
class XMLUTIL_EXPORT XTemplateSerializer
{
public:
/**********************************************************
*
* ValueVectorOf
*
* SchemaElementDecl*
* unsigned int
*
***********************************************************/
static void storeObject(ValueVectorOf<SchemaElementDecl*>* const tempObjToWrite
, XSerializeEngine& serEng);
static void loadObject(ValueVectorOf<SchemaElementDecl*>** tempObjToRead
, int initSize
, bool toCallDestructor
, XSerializeEngine& serEng);
static void storeObject(ValueVectorOf<unsigned int>* const tempObjToWrite
, XSerializeEngine& serEng);
static void loadObject(ValueVectorOf<unsigned int>** tempObjToRead
, int initSize
, bool toCallDestructor
, XSerializeEngine& serEng);
/**********************************************************
*
* RefArrayVectorOf
*
* XMLCh
*
***********************************************************/
static void storeObject(RefArrayVectorOf<XMLCh>* const tempObjToWrite
, XSerializeEngine& serEng);
static void loadObject(RefArrayVectorOf<XMLCh>** tempObjToRead
, int initSize
, bool toAdopt
, XSerializeEngine& serEng);
/**********************************************************
*
* RefVectorOf
*
* SchemaAttDef
* SchemaElementDecl
* ContentSpecNode
* IC_Field
* DatatypeValidator
* IdentityConstraint
* XMLNumber
* XercesLocationPath
* XercesStep
*
***********************************************************/
static void storeObject(RefVectorOf<SchemaAttDef>* const tempObjToWrite
, XSerializeEngine& serEng);
static void loadObject(RefVectorOf<SchemaAttDef>** tempObjToRead
, int initSize
, bool toAdopt
, XSerializeEngine& serEng);
static void storeObject(RefVectorOf<SchemaElementDecl>* const tempObjToWrite
, XSerializeEngine& serEng);
static void loadObject(RefVectorOf<SchemaElementDecl>** tempObjToRead
, int initSize
, bool toAdopt
, XSerializeEngine& serEng);
static void storeObject(RefVectorOf<ContentSpecNode>* const tempObjToWrite
, XSerializeEngine& serEng);
static void loadObject(RefVectorOf<ContentSpecNode>** tempObjToRead
, int initSize
, bool toAdopt
, XSerializeEngine& serEng);
static void storeObject(RefVectorOf<IC_Field>* const tempObjToWrite
, XSerializeEngine& serEng);
static void loadObject(RefVectorOf<IC_Field>** tempObjToRead
, int initSize
, bool toAdopt
, XSerializeEngine& serEng);
static void storeObject(RefVectorOf<DatatypeValidator>* const tempObjToWrite
, XSerializeEngine& serEng);
static void loadObject(RefVectorOf<DatatypeValidator>** tempObjToRead
, int initSize
, bool toAdopt
, XSerializeEngine& serEng);
static void storeObject(RefVectorOf<IdentityConstraint>* const tempObjToWrite
, XSerializeEngine& serEng);
static void loadObject(RefVectorOf<IdentityConstraint>** tempObjToRead
, int initSize
, bool toAdopt
, XSerializeEngine& serEng);
static void storeObject(RefVectorOf<XMLNumber>* const tempObjToWrite
, XSerializeEngine& serEng);
static void loadObject(RefVectorOf<XMLNumber>** tempObjToRead
, int initSize
, bool toAdopt
, XMLNumber::NumberType numType
, XSerializeEngine& serEng);
static void storeObject(RefVectorOf<XercesLocationPath>* const tempObjToWrite
, XSerializeEngine& serEng);
static void loadObject(RefVectorOf<XercesLocationPath>** tempObjToRead
, int initSize
, bool toAdopt
, XSerializeEngine& serEng);
static void storeObject(RefVectorOf<XercesStep>* const tempObjToWrite
, XSerializeEngine& serEng);
static void loadObject(RefVectorOf<XercesStep>** tempObjToRead
, int initSize
, bool toAdopt
, XSerializeEngine& serEng);
/**********************************************************
*
* RefHashTableOf
*
* KVStringPair
* XMLAttDef
* DTDAttDef
* ComplexTypeInfo
* XercesGroupInfo
* XercesAttGroupInfo
* XMLRefInfo
* DatatypeValidator
* Grammar
* XSAnnotation
*
***********************************************************/
static void storeObject(RefHashTableOf<KVStringPair>* const tempObjToWrite
, XSerializeEngine& serEng);
static void loadObject(RefHashTableOf<KVStringPair>** tempObjToRead
, int initSize
, bool toAdopt
, XSerializeEngine& serEng);
static void storeObject(RefHashTableOf<XMLAttDef>* const tempObjToWrite
, XSerializeEngine& serEng);
static void loadObject(RefHashTableOf<XMLAttDef>** tempObjToRead
, int initSize
, bool toAdopt
, XSerializeEngine& serEng);
static void storeObject(RefHashTableOf<DTDAttDef>* const tempObjToWrite
, XSerializeEngine& serEng);
static void loadObject(RefHashTableOf<DTDAttDef>** tempObjToRead
, int initSize
, bool toAdopt
, XSerializeEngine& serEng);
static void storeObject(RefHashTableOf<ComplexTypeInfo>* const tempObjToWrite
, XSerializeEngine& serEng);
static void loadObject(RefHashTableOf<ComplexTypeInfo>** tempObjToRead
, int initSize
, bool toAdopt
, XSerializeEngine& serEng);
static void storeObject(RefHashTableOf<XercesGroupInfo>* const tempObjToWrite
, XSerializeEngine& serEng);
static void loadObject(RefHashTableOf<XercesGroupInfo>** tempObjToRead
, int initSize
, bool toAdopt
, XSerializeEngine& serEng);
static void storeObject(RefHashTableOf<XercesAttGroupInfo>* const tempObjToWrite
, XSerializeEngine& serEng);
static void loadObject(RefHashTableOf<XercesAttGroupInfo>** tempObjToRead
, int initSize
, bool toAdopt
, XSerializeEngine& serEng);
static void storeObject(RefHashTableOf<XMLRefInfo>* const tempObjToWrite
, XSerializeEngine& serEng);
static void loadObject(RefHashTableOf<XMLRefInfo>** tempObjToRead
, int initSize
, bool toAdopt
, XSerializeEngine& serEng);
static void storeObject(RefHashTableOf<DatatypeValidator>* const tempObjToWrite
, XSerializeEngine& serEng);
static void loadObject(RefHashTableOf<DatatypeValidator>** tempObjToRead
, int initSize
, bool toAdopt
, XSerializeEngine& serEng);
static void storeObject(RefHashTableOf<Grammar>* const tempObjToWrite
, XSerializeEngine& serEng);
static void loadObject(RefHashTableOf<Grammar>** tempObjToRead
, int initSize
, bool toAdopt
, XSerializeEngine& serEng);
static void storeObject(RefHashTableOf<XSAnnotation, PtrHasher>* const tempObjToWrite
, XSerializeEngine& serEng);
static void loadObject(RefHashTableOf<XSAnnotation, PtrHasher>** tempObjToRead
, int initSize
, bool toAdopt
, XSerializeEngine& serEng);
/**********************************************************
*
* RefHash2KeysTableOf
*
* SchemaAttDef
* ElemVector
*
***********************************************************/
static void storeObject(RefHash2KeysTableOf<SchemaAttDef>* const tempObjToWrite
, XSerializeEngine& serEng);
static void loadObject(RefHash2KeysTableOf<SchemaAttDef>** tempObjToRead
, int initSize
, bool toAdopt
, XSerializeEngine& serEng);
static void storeObject(RefHash2KeysTableOf<ElemVector>* const tempObjToWrite
, XSerializeEngine& serEng);
static void loadObject(RefHash2KeysTableOf<ElemVector>** tempObjToRead
, int initSize
, bool toAdopt
, XSerializeEngine& serEng);
/**********************************************************
*
* RefHash3KeysIdPool
*
* SchemaElementDecl
*
***********************************************************/
static void storeObject(RefHash3KeysIdPool<SchemaElementDecl>* const tempObjToWrite
, XSerializeEngine& serEng);
static void loadObject(RefHash3KeysIdPool<SchemaElementDecl>** tempObjToRead
, int initSize
, bool toAdopt
, int initSize2
, XSerializeEngine& serEng);
/**********************************************************
*
* NameIdPool
*
* DTDElementDecl
* DTDEntityDecl
* XMLNotationDecl
*
***********************************************************/
static void storeObject(NameIdPool<DTDElementDecl>* const tempObjToWrite
, XSerializeEngine& serEng);
static void loadObject(NameIdPool<DTDElementDecl>** tempObjToRead
, int initSize
, int initSize2
, XSerializeEngine& serEng);
static void storeObject(NameIdPool<DTDEntityDecl>* const tempObjToWrite
, XSerializeEngine& serEng);
static void loadObject(NameIdPool<DTDEntityDecl>** tempObjToRead
, int initSize
, int initSize2
, XSerializeEngine& serEng);
static void storeObject(NameIdPool<XMLNotationDecl>* const tempObjToWrite
, XSerializeEngine& serEng);
static void loadObject(NameIdPool<XMLNotationDecl>** tempObjToRead
, int initSize
, int initSize2
, XSerializeEngine& serEng);
private:
// -----------------------------------------------------------------------
// Unimplemented constructors and operators
// -----------------------------------------------------------------------
~XTemplateSerializer();
XTemplateSerializer();
XTemplateSerializer(const XTemplateSerializer&);
XTemplateSerializer& operator=(const XTemplateSerializer&);
};
XERCES_CPP_NAMESPACE_END
#endif