de.dante.extex.interpreter.primitives.file.xslt
Class InputXslt
java.lang.Object
de.dante.extex.interpreter.type.AbstractCode
de.dante.extex.interpreter.primitives.file.AbstractFileCode
de.dante.extex.interpreter.primitives.file.xslt.InputXslt
- All Implemented Interfaces:
- Code, Configurable, Localizable, java.io.Serializable
- public class InputXslt
- extends AbstractFileCode
This class provides an implementation for the primitive
\inputXSLT
. It transform a XML file with a
XSLT transformation.
It use \javadef
.
The Primitive \inputXSLT
The primitive \inputXSLT takes as argument two file names.
The first one is a XML file, the second one is a XSLT file.
After the transformation the result is taken as input stream for
the tokenizer.
If the file can not be opened for reading then an error is raised.
Syntax
The formal description of this primitive is the following:
〈inputXSLT〉
→ \inputXSLT 〈xml-file name〉
〈xsl-file name〉
Examples
\inputXSLT{file.name.xml}{file.name.xsl}
- Version:
- $Revision: 1.2 $
- Author:
- Michael Niedermair
- See Also:
- Serialized Form
Constructor Summary |
InputXslt(java.lang.String codeName)
Create a new object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
InputXslt
public InputXslt(java.lang.String codeName)
- Create a new object.
- Parameters:
codeName
- the CodeName
execute
public void execute(Flags prefix,
Context context,
TokenSource source,
Typesetter typesetter)
throws InterpreterException
- Description copied from interface:
Code
- This method takes the first token and executes it. The result is placed
on the stack. This operation might have side effects. To execute a token
it might be necessary to consume further tokens.
- Specified by:
execute
in interface Code
- Overrides:
execute
in class AbstractCode
- Throws:
InterpreterException
- See Also:
AbstractCode.execute(
de.dante.extex.interpreter.Flags,
de.dante.extex.interpreter.context.Context,
de.dante.extex.interpreter.TokenSource,
de.dante.extex.typesetter.Typesetter)
scanFileName
protected java.lang.String scanFileName(Context context,
TokenSource source)
throws InterpreterException
- scan the filename between
{
and }
.
- Overrides:
scanFileName
in class AbstractFileCode
- Parameters:
context
- the contextsource
- the source for new tokens
- Returns:
- the file name as string
- Throws:
InterpreterException
- in case of an error- See Also:
AbstractFileCode.scanFileName(
de.dante.extex.interpreter.context.Context,
de.dante.extex.interpreter.TokenSource)