Package gnu.kawa.xslt
Class XslTranslator
- java.lang.Object
-
- java.io.Reader
-
- gnu.text.Lexer
-
- gnu.kawa.xslt.XslTranslator
-
- All Implemented Interfaces:
Consumer,Closeable,Appendable,AutoCloseable,Readable,Consumer<Object>,DoubleConsumer,IntConsumer,LongConsumer
public class XslTranslator extends Lexer implements Consumer
Translate an XSLT stylesheet to a Kawa Expression tree.
-
-
Field Summary
-
Fields inherited from class gnu.text.Lexer
port, tentative, tokenBuffer, tokenBufferLength
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Consumerappend(char v)Consumerappend(CharSequence csq)Consumerappend(CharSequence csq, int start, int end)voidendAttribute()End of an attribute or end of an actual parameter.voidendDocument()voidendElement()voiderror(char kind, String message)ExpressiongetExpression()booleanignoring()True if consumer is ignoring rest of element.static StringisXslTag(Object type)voidparse(Compilation comp)StringpopMatchingAttribute(String ns, String name, int start)voidstartAttribute(Object attrType)Write a attribute for the current element.voidstartDocument()voidstartDocument(ModuleExp mexp)voidstartElement(Object type)voidwrite(char[] buf, int off, int len)voidwrite(int v)voidwrite(CharSequence str, int start, int length)voidwrite(String str)voidwriteBoolean(boolean v)voidwriteDouble(double v)voidwriteFloat(float v)voidwriteInt(int v)voidwriteLong(long v)voidwriteObject(Object v)-
Methods inherited from class gnu.text.Lexer
checkErrors, checkNext, clearErrors, close, eofError, eofError, error, error, fatal, getColumnNumber, getErrors, getLineNumber, getMessages, getName, getPort, isInteractive, isTentative, mark, peek, popNesting, pushNesting, read, read, readCodePoint, readDelimited, readDigits, readDigitsInBuffer, readIntDigits, readOptionalExponent, readUnicodeChar, reset, seenErrors, setInteractive, setMessages, setTentative, skip, skip_quick, tokenBufferAppend, tokenBufferString, unread, unread, unread_quick
-
Methods inherited from class java.io.Reader
mark, markSupported, nullReader, read, read, ready, skip, transferTo
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.function.DoubleConsumer
andThen
-
Methods inherited from interface java.util.function.IntConsumer
andThen
-
Methods inherited from interface java.util.function.LongConsumer
andThen
-
-
-
-
Method Detail
-
startElement
public void startElement(Object type)
- Specified by:
startElementin interfaceConsumer
-
startAttribute
public void startAttribute(Object attrType)
Description copied from interface:ConsumerWrite a attribute for the current element. This is only allowed immediately after a startElement.- Specified by:
startAttributein interfaceConsumer
-
endAttribute
public void endAttribute()
Description copied from interface:ConsumerEnd of an attribute or end of an actual parameter. The former use matches a startAttribute; the latter may not, and can be used to separate parameters in a parameter list. This double duty suggsts the method should at least be re-named.- Specified by:
endAttributein interfaceConsumer
-
endElement
public void endElement()
- Specified by:
endElementin interfaceConsumer
-
append
public Consumer append(char v)
- Specified by:
appendin interfaceAppendable- Specified by:
appendin interfaceConsumer
-
append
public Consumer append(CharSequence csq)
- Specified by:
appendin interfaceAppendable- Specified by:
appendin interfaceConsumer
-
append
public Consumer append(CharSequence csq, int start, int end)
- Specified by:
appendin interfaceAppendable- Specified by:
appendin interfaceConsumer
-
writeBoolean
public void writeBoolean(boolean v)
- Specified by:
writeBooleanin interfaceConsumer
-
writeFloat
public void writeFloat(float v)
- Specified by:
writeFloatin interfaceConsumer
-
writeDouble
public void writeDouble(double v)
- Specified by:
writeDoublein interfaceConsumer
-
startDocument
public void startDocument()
- Specified by:
startDocumentin interfaceConsumer
-
startDocument
public void startDocument(ModuleExp mexp)
-
endDocument
public void endDocument()
- Specified by:
endDocumentin interfaceConsumer
-
writeObject
public void writeObject(Object v)
- Specified by:
writeObjectin interfaceConsumer
-
write
public void write(CharSequence str, int start, int length)
-
ignoring
public boolean ignoring()
Description copied from interface:ConsumerTrue if consumer is ignoring rest of element. The producer can use this information to skip ahead.
-
getExpression
public Expression getExpression()
-
parse
public void parse(Compilation comp) throws IOException
- Throws:
IOException
-
-