* xmlSAX2InternalSubset: * @ctx: the user data (XML parser context) * @name: the root element name * @ExternalID: the external ID * @SystemID: the SYSTEM ID (e.g. filename or URL) * * Callback on internal subset declaration. */
| 238 | * Callback on internal subset declaration. |
| 239 | */ |
| 240 | void |
| 241 | xmlSAX2InternalSubset(void *ctx, const xmlChar *name, |
| 242 | const xmlChar *ExternalID, const xmlChar *SystemID) |
| 243 | { |
| 244 | xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx; |
| 245 | xmlDtdPtr dtd; |
| 246 | if (ctx == NULL) return; |
| 247 | |
| 248 | if (ctxt->myDoc == NULL) |
| 249 | return; |
| 250 | dtd = xmlGetIntSubset(ctxt->myDoc); |
| 251 | if (dtd != NULL) { |
| 252 | if (ctxt->html) |
| 253 | return; |
| 254 | xmlUnlinkNode((xmlNodePtr) dtd); |
| 255 | xmlFreeDtd(dtd); |
| 256 | ctxt->myDoc->intSubset = NULL; |
| 257 | } |
| 258 | ctxt->myDoc->intSubset = |
| 259 | xmlCreateIntSubset(ctxt->myDoc, name, ExternalID, SystemID); |
| 260 | if (ctxt->myDoc->intSubset == NULL) |
| 261 | xmlSAX2ErrMemory(ctxt); |
| 262 | } |
| 263 | |
| 264 | /** |
| 265 | * xmlSAX2ExternalSubset: |