Contents | Package | Class | Tree | Deprecated | Index | Help | XML for Java
PREV | NEXT | SHOW LISTS | HIDE LISTS |

# Class com.ibm.xml.parser.StylesheetPI

    java.lang.Object
        |
        +----com.ibm.xml.parser.Child
                |
                +----com.ibm.xml.parser.TXPI
                        |
                        +----com.ibm.xml.parser.StylesheetPI

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:
  1.1
See Also:
  TXPI

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, DOCUMENTTYPE, ELEMENTDEFINITION, ENTITY, GENERALREFERENCE, NOTATION, 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
clone, getData, getName, getNodeType, getNSLocalName, getNSName, getText, getUniversalName, setData, setName, setNSLocalName, setNSName

Methods inherited from class com.ibm.xml.parser.Child
clearDigest, clone, getChildNodes, getDigest, getFactory, getFirstChild, getNextSibling, getParentNode, getPreviousSibling, getText, hasChildNodes, insertBefore, makeXPointer, print, print, removeChild, replaceChild, searchAncestors, searchAncestors, setFactory, toString, toString

Methods inherited from class java.lang.Object
clone, 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:
    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.

Contents | Package | Class | Tree | Deprecated | Index | Help |
PREV | NEXT | SHOW LISTS | HIDE LISTS |