include yslt.yml2 tstylesheet { include ./textutils.ysl2 template "/" { | package org.pEp.jniadapter; | | public class pEpException extends Exception { } apply "namespace/enum[@name='pEp_status']", 0; } function "exception" { param "name"; document "org/pEp/jniadapter/{$name}.java", "text" { | package org.pEp.jniadapter; | | class «$name» extends pEpException { } } } template "enum" for "*[text()!=0]" call "exception" with "name" call "CamelCase" with "text", "name(.)"; }