void TestParser::elementDecl(const  DTDElementDecl&     decl
                            , const bool                isIgnored)
{
    if (fOutputType == OutputType_Debug)
    {
        XERCES_STD_QUALIFIER cout << "Got ELEMENT DECL:\n    "
             << "Name: " << StrX(decl.getFullName());

        if (isIgnored)
            XERCES_STD_QUALIFIER cout << " (Ignored)";

        XERCES_STD_QUALIFIER cout << ", Content: "
             << StrX(decl.getFormattedContentModel())
             << "\n    SrcOfs: " << fScanner->getSrcOffset()
             << "\n" << XERCES_STD_QUALIFIER endl;
    }
     else if (fOutputType != OutputType_None)
    {
        if (fInExtSubset)
            return;

        if (fIntDTDOutput)
        {
            XERCES_STD_QUALIFIER cout << "<!ELEMENT " << StrX(decl.getFullName()) << " "
                 << StrX(decl.getFormattedContentModel())
                 << ">";
        }
    }
}
示例#2
0
void NsSAX2Reader::elementDecl(const DTDElementDecl& elemDecl,
				const_bool isIgnored)
{
	if (fReadingIntSubset) {
		fSubset.append(chOpenAngle);
		fSubset.append(chBang);
		fSubset.append(XMLUni::fgElemString);
		fSubset.append(chSpace);
		fSubset.append(elemDecl.getFullName());

		//get the ContentSpec information
		const XMLCh* contentModel =
			elemDecl.getFormattedContentModel();
		if (contentModel != 0) {
			fSubset.append(chSpace);
			fSubset.append(contentModel);
		}
		fSubset.append(chCloseAngle);
	}
}