de.dante.extex.interpreter.primitives.file.xslt
Class InputXslt

java.lang.Object
  extended byde.dante.extex.interpreter.type.AbstractCode
      extended byde.dante.extex.interpreter.primitives.file.AbstractFileCode
          extended byde.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

Field Summary
 
Fields inherited from class de.dante.extex.interpreter.primitives.file.AbstractFileCode
MAX_IN_FILE_NO, MAX_OUT_FILE_NO
 
Fields inherited from class de.dante.extex.interpreter.type.AbstractCode
serialVersionUID
 
Constructor Summary
InputXslt(java.lang.String codeName)
          Create a new object.
 
Method Summary
 void execute(Flags prefix, Context context, TokenSource source, Typesetter typesetter)
          This method takes the first token and executes it.
protected  java.lang.String scanFileName(Context context, TokenSource source)
          scan the filename between { and }.
 
Methods inherited from class de.dante.extex.interpreter.primitives.file.AbstractFileCode
configure, getEncoding, scanInFileKey, scanOutFileKey
 
Methods inherited from class de.dante.extex.interpreter.type.AbstractCode
enableLocalization, getLocalizer, getName, isIf, isOuter, printable, printableControlSequence, readResolve, setName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InputXslt

public InputXslt(java.lang.String codeName)
Create a new object.

Parameters:
codeName - the CodeName
Method Detail

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 context
source - 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)