|
|
|
|
@ -63,6 +63,7 @@ public class FichaAptidaoCreator implements FichaAptidaoConstants
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public byte[] createFO( HashMap<String,String> values )
|
|
|
|
|
throws Exception
|
|
|
|
|
{
|
|
|
|
|
StringBuilder buff = new StringBuilder( "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<FichaAptidao>\n" );
|
|
|
|
|
|
|
|
|
|
@ -85,18 +86,10 @@ public class FichaAptidaoCreator implements FichaAptidaoConstants
|
|
|
|
|
|
|
|
|
|
ByteArrayOutputStream out = new ByteArrayOutputStream();
|
|
|
|
|
InputStream xmlIn = new ByteArrayInputStream( xml.getBytes() );
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
InputStream xslStream = getClass().getClassLoader().getResourceAsStream( "siprp/ficha/ficha_aptidao.xsl" );
|
|
|
|
|
fopCreator.createFOfromXML( xmlIn, xslStream, out );
|
|
|
|
|
// System.out.println( "FO created" );
|
|
|
|
|
}
|
|
|
|
|
catch( Exception ex )
|
|
|
|
|
{
|
|
|
|
|
ex.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
System.out.println( "FO str sz: " + out.size() );
|
|
|
|
|
InputStream xslStream = getClass().getClassLoader().getResourceAsStream( "siprp/ficha/ficha_aptidao.xsl" );
|
|
|
|
|
fopCreator.createFOfromXML( xmlIn, xslStream, out );
|
|
|
|
|
// System.out.println( "FO created" );
|
|
|
|
|
|
|
|
|
|
return out.toByteArray();
|
|
|
|
|
}
|
|
|
|
|
|