gnu.xml.pipeline
Class XIncludeFilter
- ContentHandler, DeclHandler, DTDHandler, EventConsumer, LexicalHandler, Locator
Filter to process an XPointer-free subset of
XInclude, supporting its
use as a kind of replacement for parsed general entities.
XInclude works much like the
#include
of C/C++ but
works for XML documents as well as unparsed text files.
Restrictions from the 17-Sept-2002 CR draft of XInclude are as follows:
- URIs must not include fragment identifiers.
The CR specifies support for XPointer element() fragment IDs,
which is not currently implemented here.
- xi:fallback handling of resource errors is not
currently supported.
- DTDs are not supported in included files, since the SAX DTD events
must have completely preceded any included file.
The CR explicitly allows the DTD related portions of the infoset to
grow as an effect of including XML documents.
- xml:base fixup isn't done.
XML documents that are included will normally be processed using
the default SAX namespace rules, meaning that prefix information may
be discarded. This may be changed with
setSavingPrefixes()
.
You are strongly advised to do this.
Note that XInclude allows highly incompatible implementations, which
are specialized to handle application-specific infoset extensions. Some
such implementations can be implemented by subclassing this one, but
they may only be substituted in applications at "user option".
TBD: "IURI" handling.
void | characters(ch[] , int start, int length) - SAX2: passes this callback to the next consumer, if any
|
void | comment(ch[] , int start, int length) - SAX2: passes this callback to the next consumer, if any
|
void | endCDATA() - SAX2: passes this callback to the next consumer, if any
|
void | endDocument() - SAX2: passes this callback to the next consumer, if any
|
void | endElement(String uri, String localName, String qName) - SAX2: passes this callback to the next consumer, if any
|
void | endEntity(String name) - SAX2: passes this callback to the next consumer, if any.
|
void | endPrefixMapping(String prefix) - SAX2: passes this callback to the next consumer, if any
|
void | externalEntityDecl(String name, String publicId, String systemId) - SAX2: passes this callback to the next consumer, if any
|
int | getColumnNumber() - Used for proxy locator; do not call directly.
|
int | getLineNumber() - Used for proxy locator; do not call directly.
|
String | getPublicId() - Used for proxy locator; do not call directly.
|
String | getSystemId() - Used for proxy locator; do not call directly.
|
void | ignorableWhitespace(ch[] , int start, int length) - SAX2: passes this callback to the next consumer, if any
|
boolean | isSavingPrefixes() - Returns the flag controlling the setting of the SAX2
namespace-prefixes flag when parsing included documents.
|
void | processingInstruction(String target, String value) - SAX2: passes this callback to the next consumer, if any
|
void | setDocumentLocator(Locator locator) - Passes "this" down the filter chain as a proxy locator.
|
void | setSavingPrefixes(boolean flag) - Assigns the flag controlling the setting of the SAX2
namespace-prefixes flag.
|
void | skippedEntity(String name) - SAX2: passes this callback to the next consumer, if any
|
void | startCDATA() - SAX2: passes this callback to the next consumer, if any
|
void | startDocument() - SAX2: passes this callback to the next consumer, if any
|
void | startElement(String uri, String localName, String qName, Attributes atts) - SAX2: passes this callback to the next consumer, if any
|
void | startEntity(String name) - SAX2: passes this callback to the next consumer, if any.
|
void | startPrefixMapping(String prefix, String uri) - SAX2: passes this callback to the next consumer, if any
|
attributeDecl , bind , chainTo , characters , comment , elementDecl , endCDATA , endDTD , endDocument , endElement , endEntity , endPrefixMapping , externalEntityDecl , getContentHandler , getDTDHandler , getDocumentLocator , getErrorHandler , getNext , getProperty , ignorableWhitespace , internalEntityDecl , notationDecl , processingInstruction , setContentHandler , setDTDHandler , setDocumentLocator , setErrorHandler , setProperty , skippedEntity , startCDATA , startDTD , startDocument , startElement , startEntity , startPrefixMapping , unparsedEntityDecl |
clone , equals , extends Object> getClass , finalize , hashCode , notify , notifyAll , toString , wait , wait , wait |
isSavingPrefixes
public boolean isSavingPrefixes()
Returns the flag controlling the setting of the SAX2
namespace-prefixes flag when parsing included documents.
The default value is the SAX2 default (false), which discards
information that can be useful.
setSavingPrefixes
public void setSavingPrefixes(boolean flag)
Assigns the flag controlling the setting of the SAX2
namespace-prefixes flag.
XIncludeFilter.java --
Copyright (C) 2001,2002 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version.