axw.xsl
Includes
AspectX Weaver
This stylesheet weaves the annotated base code.
There is a rule for every possible combination of the following elements:
- srcML element
- advice type
- codeModifier type (subelement of advice)
"srcML element name"_"advice type"_"code modifier type".xsl
- function srcML element
- begin advice
- code fragment codeModifier
CVS Id:
axw.xsl 138 2005-07-27 09:14:07Z ibirrer
Author:
ibirrer
Copyright:
2004, P&P Software GmbH
Parameters Summary
The default indentation that should be used for the weaving process
If set to true, intermediate woven results are saved in the temp directory
Match Templates Summary
No short description available
Default template for annotated code
Named Templates Summary
This template takes a block and adds the text given in the beginning of this block
This template takes a block and adds the text given at the end of this block
This template takes a block and adds the text given in the beginning of this block
This template takes a block and adds the text given at the end of this block
Functions Summary
Returns the string containing all text() nodes from the given sequence of codeModifiers
Adds indentation to an element
Parameters Detail
The default indentation that should be used for the weaving process
Use 	 for tabs,   for spaces.
If set to true, intermediate woven results are saved in the temp directory
Match Templates Detail
Deciding if a file should be woven or not.
If the XML source file does not contain any annotation (advice elements), it
is copied to the output without any changes.
If the XML source file contains one or more advice elements, it is woven by calling the 'weaveFile'
template.
No short description available
Parameters:
indent -
Default template for not annotated code.
This template is called for all srcML elements, which do not have an advice as
a subelement. It just copies the element and applies templates for its subelements.
Default template for annotated code
If no weaver rule is defined for any
annotated srcML, this template is called,
aborts the program and outputs an error message.
Default template for advices.
Advices are copied manually by the weaving rules.
Therefore they shoud not be copied auotmatically. This template ensures
that advices are not copied.
Named Templates Detail
This template takes a block and adds the text given in the beginning of this block
Parameters:
node-set block - The block to add the text to
node-set advice - The advice to be woven
This template takes a block and adds the text given at the end of this block
Parameters:
node-set block - The block to add the text to
advice -
This template takes a block and adds the text given in the beginning of this block
Parameters:
node-set block - The block to add the text to
elements -
indent -
This template takes a block and adds the text given at the end of this block
Parameters:
node-set block - The block to add the text to
elements -
indent -
Weaves a srmML file.
This template can be called recursively by itself. It applies the weaving rules
to the argument
$file, as long as there are advice elements left in it. If no more advices are
found, the woven file is sent to the output (using xsl:copy-of).Parameters:
node-set file - A srcML file.
Functions Detail
Returns the string containing all text() nodes from the given sequence of codeModifiers
The markup with codeModifier and text elements is transformed to newlines.
Parameters:
node-set codeModifiers - Sequence of codeModifier elements
Adds indentation to an element
Parameters:
string element - The text the indentation should be added to.
string indent - String that is used for indentation.