Skip to Main Content
SAX2
book

SAX2

by David Brownell
January 2002
Intermediate to advanced content levelIntermediate to advanced
240 pages
6h 58m
English
O'Reilly Media, Inc.
Content preview from SAX2

Processing Instruction Information Items

Processing instructions (PIs) are used within XML documents to capture information that doesn’t necessarily fit into the nested structure found elsewhere. Such data doesn’t need to relate to processing tasks, although that’s one historical use for such constructs.

Property

Callbacks

Explanation

[target]

ContentHandler.processingInstruction(), target parameter

[content]

ContentHandler.processingInstruction(), target parameter

[base URI]

computed using xml:base

In the absence of xml:base attributes, this property is normally the value that Locator.getSystemId() exposes during the processingInstruction() callback.

[notation]

See the section on Notation Information Items. Tracking notations is the responsibility of applications.

[parent]

When startElement() is invoked with no matching endElement(), the parent is the current element. Between calls to LexicalHandler.startDTD() and LexicalHandler.endDTD(), the parent is the Document Type Declaration. Otherwise, the document itself is the parent.

Some applications use a convention that PI target names are matched against notation declarations, and the notations’ public (or system) IDs are used to deduce the meaning behind a given PI. For example, such an ID might indicate a particular tool to use on receipt of a document (preferably redirecting through a table to facilitate useful security constraints). This is purely a convention, but it’s recognized by the ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Special Edition Using XML, Second Edition

Special Edition Using XML, Second Edition

- et al. David Gulbransen

Publisher Resources

ISBN: 0596002378Supplemental ContentCatalog PageErrata