TemplatesHandler
Stay organized with collections
Save and categorize content based on your preferences.
A SAX ContentHandler that may be used to process SAX
parse events (parsing transformation instructions) into a Templates object.
Note that TemplatesHandler does not need to implement LexicalHandler.
Public Method Summary
abstract
String
|
getSystemId()
Get the base ID (URI or system ID) from where relative
URLs will be resolved.
|
abstract
Templates
|
getTemplates()
When a TemplatesHandler object is used as a ContentHandler
for the parsing of transformation instructions, it creates a Templates object,
which the caller can get once the SAX events have been completed.
|
abstract
void
|
setSystemId( String systemID)
Set the base ID (URI or system ID) for the Templates object
created by this builder.
|
Inherited Method Summary
From interface
org.xml.sax.ContentHandler
abstract
void
|
characters(char[] ch, int start, int length)
Receive notification of character data.
|
abstract
void
|
endDocument()
Receive notification of the end of a document.
|
abstract
void
|
|
abstract
void
|
|
abstract
void
|
ignorableWhitespace(char[] ch, int start, int length)
Receive notification of ignorable whitespace in element content.
|
abstract
void
|
|
abstract
void
|
|
abstract
void
|
|
abstract
void
|
startDocument()
Receive notification of the beginning of a document.
|
abstract
void
|
|
abstract
void
|
|
Public Methods
public
abstract
String
getSystemId
()
Get the base ID (URI or system ID) from where relative
URLs will be resolved.
public
abstract
Templates
getTemplates
()
When a TemplatesHandler object is used as a ContentHandler
for the parsing of transformation instructions, it creates a Templates object,
which the caller can get once the SAX events have been completed.
Returns
- The Templates object that was created during
the SAX event process, or null if no Templates object has
been created.
public
abstract
void
setSystemId
(String systemID)
Set the base ID (URI or system ID) for the Templates object
created by this builder. This must be set in order to
resolve relative URIs in the stylesheet. This must be
called before the startDocument event.
Parameters
systemID |
Base URI for this stylesheet.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-07-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-07-10 UTC."],[[["\u003cp\u003e\u003ccode\u003eTemplatesHandler\u003c/code\u003e is a SAX \u003ccode\u003eContentHandler\u003c/code\u003e used to process SAX events and create a \u003ccode\u003eTemplates\u003c/code\u003e object.\u003c/p\u003e\n"],["\u003cp\u003eIt provides methods to set and get the base ID (system ID) for resolving relative URLs within the stylesheet.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003egetTemplates()\u003c/code\u003e method allows retrieval of the \u003ccode\u003eTemplates\u003c/code\u003e object generated after processing SAX events.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eTemplatesHandler\u003c/code\u003e inherits methods from \u003ccode\u003eorg.xml.sax.ContentHandler\u003c/code\u003e to handle various XML parsing events, like element starts and ends, character data, etc.\u003c/p\u003e\n"]]],[],null,["public interface **TemplatesHandler** implements [ContentHandler](../../../../../reference/org/xml/sax/ContentHandler.html) \nA SAX ContentHandler that may be used to process SAX\nparse events (parsing transformation instructions) into a Templates object.\n\nNote that TemplatesHandler does not need to implement LexicalHandler.\n\n\u003cbr /\u003e\n\nPublic Method Summary\n\n|-----------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [String](../../../../../reference/java/lang/String.html) | [getSystemId](../../../../../reference/javax/xml/transform/sax/TemplatesHandler.html#getSystemId())() Get the base ID (URI or system ID) from where relative URLs will be resolved. |\n| abstract [Templates](../../../../../reference/javax/xml/transform/Templates.html) | [getTemplates](../../../../../reference/javax/xml/transform/sax/TemplatesHandler.html#getTemplates())() When a TemplatesHandler object is used as a ContentHandler for the parsing of transformation instructions, it creates a Templates object, which the caller can get once the SAX events have been completed. |\n| abstract void | [setSystemId](../../../../../reference/javax/xml/transform/sax/TemplatesHandler.html#setSystemId(java.lang.String))([String](../../../../../reference/java/lang/String.html) systemID) Set the base ID (URI or system ID) for the Templates object created by this builder. |\n\nInherited Method Summary \nFrom interface [org.xml.sax.ContentHandler](../../../../../reference/org/xml/sax/ContentHandler.html) \n\n|---------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract void | [characters](../../../../../reference/org/xml/sax/ContentHandler.html#characters(char[],%20int,%20int))(char\\[\\] ch, int start, int length) Receive notification of character data. |\n| abstract void | [endDocument](../../../../../reference/org/xml/sax/ContentHandler.html#endDocument())() Receive notification of the end of a document. |\n| abstract void | [endElement](../../../../../reference/org/xml/sax/ContentHandler.html#endElement(java.lang.String,%20java.lang.String,%20java.lang.String))([String](../../../../../reference/java/lang/String.html) uri, [String](../../../../../reference/java/lang/String.html) localName, [String](../../../../../reference/java/lang/String.html) qName) Receive notification of the end of an element. |\n| abstract void | [endPrefixMapping](../../../../../reference/org/xml/sax/ContentHandler.html#endPrefixMapping(java.lang.String))([String](../../../../../reference/java/lang/String.html) prefix) End the scope of a prefix-URI mapping. |\n| abstract void | [ignorableWhitespace](../../../../../reference/org/xml/sax/ContentHandler.html#ignorableWhitespace(char[],%20int,%20int))(char\\[\\] ch, int start, int length) Receive notification of ignorable whitespace in element content. |\n| abstract void | [processingInstruction](../../../../../reference/org/xml/sax/ContentHandler.html#processingInstruction(java.lang.String,%20java.lang.String))([String](../../../../../reference/java/lang/String.html) target, [String](../../../../../reference/java/lang/String.html) data) Receive notification of a processing instruction. |\n| abstract void | [setDocumentLocator](../../../../../reference/org/xml/sax/ContentHandler.html#setDocumentLocator(org.xml.sax.Locator))([Locator](../../../../../reference/org/xml/sax/Locator.html) locator) Receive an object for locating the origin of SAX document events. |\n| abstract void | [skippedEntity](../../../../../reference/org/xml/sax/ContentHandler.html#skippedEntity(java.lang.String))([String](../../../../../reference/java/lang/String.html) name) Receive notification of a skipped entity. |\n| abstract void | [startDocument](../../../../../reference/org/xml/sax/ContentHandler.html#startDocument())() Receive notification of the beginning of a document. |\n| abstract void | [startElement](../../../../../reference/org/xml/sax/ContentHandler.html#startElement(java.lang.String,%20java.lang.String,%20java.lang.String,%20org.xml.sax.Attributes))([String](../../../../../reference/java/lang/String.html) uri, [String](../../../../../reference/java/lang/String.html) localName, [String](../../../../../reference/java/lang/String.html) qName, [Attributes](../../../../../reference/org/xml/sax/Attributes.html) atts) Receive notification of the beginning of an element. |\n| abstract void | [startPrefixMapping](../../../../../reference/org/xml/sax/ContentHandler.html#startPrefixMapping(java.lang.String,%20java.lang.String))([String](../../../../../reference/java/lang/String.html) prefix, [String](../../../../../reference/java/lang/String.html) uri) Begin the scope of a prefix-URI Namespace mapping. |\n\nPublic Methods \n\npublic abstract [String](../../../../../reference/java/lang/String.html)\n**getSystemId**\n() \nGet the base ID (URI or system ID) from where relative\nURLs will be resolved. \n\nReturns\n\n- The systemID that was set with [setSystemId(String)](../../../../../reference/javax/xml/transform/sax/TemplatesHandler.html#setSystemId(java.lang.String)). \n\npublic abstract [Templates](../../../../../reference/javax/xml/transform/Templates.html)\n**getTemplates**\n() \nWhen a TemplatesHandler object is used as a ContentHandler\nfor the parsing of transformation instructions, it creates a Templates object,\nwhich the caller can get once the SAX events have been completed. \n\nReturns\n\n- The Templates object that was created during the SAX event process, or null if no Templates object has been created. \n\npublic abstract void\n**setSystemId**\n([String](../../../../../reference/java/lang/String.html) systemID) \nSet the base ID (URI or system ID) for the Templates object\ncreated by this builder. This must be set in order to\nresolve relative URIs in the stylesheet. This must be\ncalled before the startDocument event. \n\nParameters\n\n| systemID | Base URI for this stylesheet. |\n|----------|-------------------------------|"]]