unit_add_declaration.xsl
Weaving Rule that adds a declaration to a unit.
CVS Id:
Author:
ibirrer
Copyright:
2004, P&P Software GmbH
Match Templates Summary
Default copy template for adding declarations before a function definiton
src:comment[following-sibling::*[position() = 1 and self::src:function]][1] (param: node-set advicemode: weaving_unit_add_declaration_function) - source
If a function has a comment attached, the declaration is added before the comment
This template adds the declaration before the first function that occurs in the source file
src:unit[ax:advice[@type='add' and position() = 1]/ax:codeModifier[@type='declaration']] (mode: weaving) - source
Adds a declaration to the first possible location of the following choices:
Match Templates Detail
Default copy template for adding declarations before a function definiton
Parameters:
node-set advice - The advice element which will be used for weaving the unit.
src:comment[following-sibling::*[position() = 1 and self::src:function]][1] (param: node-set advicemode: weaving_unit_add_declaration_function) - source
If a function has a comment attached, the declaration is added before the comment
Parameters:
node-set advice - The advice element which will be used for weaving the unit.
This template adds the declaration before the first function that occurs in the source file
Parameters:
node-set advice - The advice element which will be used for weaving the unit.
src:unit[ax:advice[@type='add' and position() = 1]/ax:codeModifier[@type='declaration']] (mode: weaving) - source
Adds a declaration to the first possible location of the following choices: