jd.xml.xslt.parser
Class AttributeIterator

java.lang.Object
  extended byjd.xml.xslt.parser.AttributeIterator

class AttributeIterator
extends Object

An iterator class for the attributes of an xsl element.


Constructor Summary
AttributeIterator(PatternParser patternParser, XsltParseContext context, XPathNode[] attributes, boolean isStylesheetElem)
          Create an empty AttributeIterator.
 
Method Summary
 XPathNode getAttribute()
          Return the current attribute.
 boolean getBoolean(String trueValue, String falseValue, boolean defaultValue)
          Return the value of the current attribute as a boolean.
 char getChar()
          Return the value of the current attribute as an boolean.
 String getExpandedName()
          Return an expanded name which has qname equals to the current attribute value.
 String[] getExpandedNames()
          Return a list of expanded names from the whitespace separated list of qnames equal to the current attribute value.
 Expression getExpression()
          Return the value of the current attribute as a parsed expression.
 String getName()
          Return the name of the current attribute.
 Pattern getPattern()
          Return the value of the current attribute as a parsed pattern.
 String getValue()
          Return the value of the current attribute.
 boolean match(String localName)
          Test if the local name of the current attribute matches the given name.
 boolean next()
          Advance to the next attribute.
 void reportInvalidAttribute()
          An invalid attribute was detected.
 void reportInvalidAttributeValue()
          An invalid attribute was detected.
 void start()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttributeIterator

public AttributeIterator(PatternParser patternParser,
                         XsltParseContext context,
                         XPathNode[] attributes,
                         boolean isStylesheetElem)
Create an empty AttributeIterator.

Method Detail

start

public void start()

next

public boolean next()
Advance to the next attribute. Non xsl attributes are ignored silently.


getAttribute

public XPathNode getAttribute()
Return the current attribute.


getName

public String getName()
Return the name of the current attribute.


match

public boolean match(String localName)
Test if the local name of the current attribute matches the given name.


getValue

public String getValue()
Return the value of the current attribute.


getBoolean

public boolean getBoolean(String trueValue,
                          String falseValue,
                          boolean defaultValue)
                   throws XsltParseException
Return the value of the current attribute as a boolean.

Parameters:
trueValue - the string representing boolean true
falseValue - the string representing boolean false
defaultValue - returned when neither trueValue or falseValue are recognized but forwards compatible processing is enabled
Throws:
jd.xml.xstl.parser.XsltException - thrown if the string value does not equal the given variants.
XsltParseException

getChar

public char getChar()
             throws XsltParseException
Return the value of the current attribute as an boolean.

Throws:
XsltParseException - thrown if the length of the attribute value is not 1

getExpandedName

public String getExpandedName()
                       throws XsltParseException
Return an expanded name which has qname equals to the current attribute value.

Throws:
XsltParseException

getExpandedNames

public String[] getExpandedNames()
                          throws XsltParseException
Return a list of expanded names from the whitespace separated list of qnames equal to the current attribute value.

Throws:
XsltParseException

getExpression

public Expression getExpression()
                         throws XsltParseException
Return the value of the current attribute as a parsed expression.

Throws:
XsltParseException - thrown if expression could not be parsed

getPattern

public Pattern getPattern()
                   throws XsltParseException
Return the value of the current attribute as a parsed pattern.

Throws:
XsltParseException - thrown if pattern could not be parsed

reportInvalidAttribute

public void reportInvalidAttribute()
                            throws XsltParseException
An invalid attribute was detected. If not forward compatible processing mode is enabled an exception is thrown

Throws:
XsltParseException

reportInvalidAttributeValue

public void reportInvalidAttributeValue()
                                 throws XsltParseException
An invalid attribute was detected. If not forward compatible processing mode is enabled an exception is thrown

Throws:
XsltParseException