Post-Processing of XSLT-Transformation

"Kai Weber" <[email protected]> Fri, 11 May 2007 19:53:45 +0200
Newsgroups gmane.text.xml.sax.general
Message-ID <[email protected]>
Hi,

I am not subscribed to the list (haven't found a subscribe-link) so please =
answer with CC: to me.

I transform a XML document with XSLT but have to do some processing afterwa=
rds on some nodes, too. I have to call a Java function which I can not easi=
ly call from XSLT because it needs a context (PageContext) to do it's work.

So, where should I start? Taking the result as a String and doing something=
 with Regex parsing would be ok, but I think because I have the Result as a=
 SAXResult I could do some post-processing more efficient and convienient?

File xmlFile =3D new File(args[0]);
File xsltFile =3D new File(args[1]);

Source xmlSource =3D new StreamSource(xmlFile);
Source xsltSource =3D new StreamSource(xsltFile);

TransformerFactory transFact =3D TransformerFactory.newInstance();
Transformer trans =3D transFact.newTransformer(xsltSource);
SAXResult result =3D new SAXResult();
trans.transform(xmlSource, result);

// do some post processing and write result to disk:
// Find all nodes <link id=3D"123"/> and convert them
// with coolFunction(pageContext, "123") to
// <a href=3D"http://mydomain">Title</a>

Regards, Kai

Gr=FC=DFe,
 =

Kai Weber
 =

_______________________________________________
 =

Kai Weber
mediaworx berlin AG
 =

Fon (0 30) 2 75 80 - 255
Fax (0 30) 2 75 80 - 200

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
List: [email protected]
See:  http://www.saxproject.org
https://lists.sourceforge.net/lists/listinfo/sax-users