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