XML Parser for Java 1.1.16

com.ibm.xml.parser
Class StylesheetPI

java.lang.Object
  |
  +--com.ibm.xml.parser.Child
        |
        +--com.ibm.xml.parser.TXPI
              |
              +--com.ibm.xml.parser.StylesheetPI
Direct Known Subclasses:
TreeFactory.TreeStylesheetPI

public class StylesheetPI
extends TXPI

The StyleSheetPI class provides specific support for the stylesheet processing instruction (PI).

A stylesheet PI is formatted as:

 
 <?xml:stylesheet type="..." href="..."?> or
 <?xml:alternate-stylesheet type="..." href="..."?>

Refer to Associating stylesheets with XML documents for details.

Version:
Revision: 28 1.9 src/com/ibm/xml/parser/StylesheetPI.java, xml4jsrc, xml4j-jtcsv, xml4j_1_1_16
See Also:
TXPI, Serialized Form

Field Summary
static java.lang.String S_ALTSTYLESHEET
          "alternate-stylesheet".
static java.lang.String S_STYLESHEET
          "stylesheet".
static java.lang.String S_TEXTCSS
          "text/css".
static java.lang.String S_XMLALTSTYLESHEET
          "xml:alternate-stylesheet".
static java.lang.String S_XMLSTYLESHEET
          "xml:stylesheet".
 
Fields inherited from class com.ibm.xml.parser.Child
ATTDEF, ATTLIST, ELEMENT_DECL, NAME_ATTDEF, NAME_ATTLIST, NAME_CDATA, NAME_COMMENT, NAME_DOCFRAGMENT, NAME_DOCUMENT, NAME_ELEMENT_DECL, NAME_PSEUDONODE, NAME_TEXT, PSEUDONODE
 
Constructor Summary
StylesheetPI(java.lang.String hrefURI)
          Cascading Style Sheet (CSS) stylesheet PI constructor.
StylesheetPI(java.lang.String type, java.lang.String hrefURI, java.lang.String title)
          XML and XML-alternate stylesheet PI constructor.
StylesheetPI(java.lang.String name, java.lang.String type, java.lang.String hrefURI, java.lang.String title)
          Generic constructor.
StylesheetPI(java.lang.String name, java.lang.String data, java.lang.String type, java.lang.String hrefURI, java.lang.String title)
          Generic constructor.
 
Method Summary
 java.lang.Object clone()
          Clone this stylesheet PI Node using the appropriate factory.
 java.lang.String getHref()
          Returns the stylesheet URI (the value of the href= attribute) which defines where to retrieve the stylesheet.
 java.lang.String getTitle()
          Returns the stylesheet title (the value of the title= attribute).
 java.lang.String getType()
          Returns the stylesheet type (the value of the type= attribute) which defines the stylesheet as xml:stylesheet, xml:alternate-stylesheet, or text/css.
 
Methods inherited from class com.ibm.xml.parser.TXPI
acceptPost, acceptPre, equals, getData, getName, getNodeName, getNodeType, getNodeValue, getTarget, getText, setData, setNodeValue, setTarget
 
Methods inherited from class com.ibm.xml.parser.Child
appendChild, clearDigest, cloneNode, getAttributes, getChildNodes, getDigest, getFactory, getFirstChild, getFirstWithoutReference, getLastChild, getLastWithoutReference, getNextSibling, getNextWithoutReference, getOwnerDocument, getParentNode, getParentWithoutReference, getPreviousSibling, getPreviousWithoutReference, getUserData, hasChildNodes, insertBefore, makeXPointer, print, print, removeChild, replaceChild, searchAncestors, searchAncestors, setFactory, setUserData, toXMLString, toXMLString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

S_XMLSTYLESHEET

public static final java.lang.String S_XMLSTYLESHEET
"xml:stylesheet".

S_XMLALTSTYLESHEET

public static final java.lang.String S_XMLALTSTYLESHEET
"xml:alternate-stylesheet".

S_STYLESHEET

public static final java.lang.String S_STYLESHEET
"stylesheet".

S_ALTSTYLESHEET

public static final java.lang.String S_ALTSTYLESHEET
"alternate-stylesheet".

S_TEXTCSS

public static final java.lang.String S_TEXTCSS
"text/css".
Constructor Detail

StylesheetPI

public StylesheetPI(java.lang.String hrefURI)
Cascading Style Sheet (CSS) stylesheet PI constructor.
Parameters:
hrefURI - The value of the href= attribute.

StylesheetPI

public StylesheetPI(java.lang.String type,
                    java.lang.String hrefURI,
                    java.lang.String title)
XML and XML-alternate stylesheet PI constructor.
Parameters:
type - The value of the type= attribute.
hrefURI - The value of the href= attribute.
title - The value of the title= attribute, or null.

StylesheetPI

public StylesheetPI(java.lang.String name,
                    java.lang.String type,
                    java.lang.String hrefURI,
                    java.lang.String title)
Generic constructor.
Parameters:
name - The first token following the markup (e.g. "xml:stylesheet").
type - The value of the type= attribute.
hrefURI - The value of the href= attribute.
title - The value of the title= attribute, or null.

StylesheetPI

public StylesheetPI(java.lang.String name,
                    java.lang.String data,
                    java.lang.String type,
                    java.lang.String hrefURI,
                    java.lang.String title)
             throws LibraryException
Generic constructor.
Parameters:
name - The first token following the markup (e.g. "xml:stylesheet").
data - From the character immediately after name to the character immediately preceding the ?>.
type - The value of the type= attribute.
hrefURI - The value of the href= attribute.
title - The value of the title= attribute, or null.
Throws:
LibraryException - Thrown if an invalid stylesheet declaration is detected.
Method Detail

clone

public java.lang.Object clone()
Clone this stylesheet PI Node using the appropriate factory.

This method is defined by Child.

Returns:
Cloned stylesheet PI Node.
Overrides:
clone in class TXPI
See Also:
Child.clone()

getType

public java.lang.String getType()
Returns the stylesheet type (the value of the type= attribute) which defines the stylesheet as xml:stylesheet, xml:alternate-stylesheet, or text/css.
Returns:
The value of the type= attribute.

getHref

public java.lang.String getHref()
Returns the stylesheet URI (the value of the href= attribute) which defines where to retrieve the stylesheet.
Returns:
The value of the href= attribute.

getTitle

public java.lang.String getTitle()
Returns the stylesheet title (the value of the title= attribute).
Returns:
The value of the title= attribute, or null if no title.

XML Parser for Java 1.1.16