Skip to Content.
Sympa Menu

xom-interest - [XOM-interest] XSLTransform class API

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Dmitry Katsubo <dma_k AT mail.ru>
  • To: XOM API for Processing XML with Java <xom-interest AT lists.ibiblio.org>
  • Subject: [XOM-interest] XSLTransform class API
  • Date: Thu, 16 Sep 2010 21:01:51 +0200

Dear XOM developers!

I've come across few questions concerning nu.xom.xslt.XSLTransform. I
will be very pleased, if someone can provide any feedback / opinion. All
below is just my opinion, which may differ from majority's:

* Having XSLTransform(Source source) constructor private is too
restrictive. One may wish to pass XSLT template as InputStream without
pre-building it as XOM document model. I don't see any good reason, why
there is only nu.xom.Document constructor.

* It looks like XSLTransform class itself has only one added value:
handling of exceptions. More over in this very example XOM is throwing
checked exception while in the rest of the library unchecked are preferred.

* Having XOMResult/XOMSource classes public adds flexibility to XOM, as
one can use them separately from XSLTransform.

* Returning Nodes as result of transformation is a bit odd (I took
extract from tutorial [1]):

Nodes output = transform.transform(input);
Document result = XSLTransform.toDocument(output);

I fully agree that result should be a list of nodes, but I think
returning DocumentFragment better matches the return result type. Maybe
it wouldn't be simple then...

Thank you for any comments in advance!

[1] http://www.xom.nu/tutorial.xhtml#d0e1875
[2] https://lists.ibiblio.org/sympa/arc/xom-interest/2005-May/002272.html

--
With best regards,
Dmitry




Archive powered by MHonArc 2.6.24.

Top of Page