Re: [xsl] Xpath vs xslt vs jaxb within java context

Subject: Re: [xsl] Xpath vs xslt vs jaxb within java context
From: "Alan Painter alan.painter@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 9 Feb 2016 08:03:07 -0000
A technique that I sometimes use with saxonica is to pass a java object as
a transformation parameter and make extension function calls on the object
for populating the object with values from the source document or
documents.

This is, of course, breaking the immutable and functional contract in XSLT.
But it does work in saxonica and is a different way of getting XML
information into a POJO.
On Feb 8, 2016 6:35 PM, "Eliot Kimber ekimber@xxxxxxxxxxxx" <
xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:

> I may do all of those things within the same application. It depends on
> what you're trying to do at the moment.
>
> If you're using Saxon, for example, it's about as easy to apply an XPath
> to a DOM as it is to apply an XSLT transform or XQuery to a
> yet-to-be-parsed XML document.
>
> For example, if you have an XML document and you need to extract stuff
> from it, you can parse it to a DOM then use the DOM API to interrogate it.
> But that can get tedious quickly.
>
> I tend to find it easier and clearer in my code to construct the DOM and
> then use Saxon to apply XPath expressions to it using the Saxon API.
>
> If you need to literally transform the XML into another form then it's
> easy to apply an XSLT. For some tasks can be clearer to delegate the heavy
> lifting to XSLT to produce a new result DOM optimized for what you need
> then use normal DOM access to get what you need.
>
> JAXB can be useful for make XML data that directly supports your
> application (e.g., configuration files) without the overhead of DOM or
> Xpath. But in general JAXB will not be useful for operating on arbitrary
> XML or making Java business objects from XML because it's translation from
> XML to objects is too literal. I find it more effective to hand-code my
> business objects and use XML as just one of many possible data sources for
> constructing them (JSON or YAML might be better serialization options, for
> example).
>
> Cheers,
>
> Eliot
>
> ----
> Eliot Kimber, Owner
> Contrext, LLC
> http://contrext.com
>
> From: "Mailing Lists Mail daktapaal@xxxxxxxxx" <
> xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
> Reply-To: xsl-list <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
> Date: Monday, February 8, 2016 at 11:15 AM
> To: xsl-list <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
> Subject: [xsl] Xpath vs xslt vs jaxb within java context
>
> Dear all,
> I work in a java development environment where I am often challenged about
> what us the right technology to use.
> hould I use jaxb on the xml and get the information that I want using the
> java objects ...
> ## should I use xpath API to get the information that I want
> ## should I call in an xslt file for getting what I want ?
>
> Are there any guidelines on when to use what ? What are best practices ..
> what are the arguments for and against these approaches ? All your
> experiences will count for me .. any information on performances ,
> efficiency etc is what I am looking for ..
>
> Thanks.
> Dak
> On Feb 2, 2016 11:43 AM, "Tommie Usdin btusdin@xxxxxxxxxxxxxxxx" <
> xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
>
> XML In, Web Out:
> International Symposium on sub rosa XML
>
> A Balisage pre-conference symposium
> http://www.balisage.net/XML-In-Web-Out/
>
> Come explore how the XML technology stack enables Great Web Applications
> from the 'basement' to the 'last mileb.
>
> Chair: James Fuller, MarkLogic
> Monday August 1, 2016
> Bethesda North Marriott Hotel & Conference Center, Bethesda, MD, USA
>
>
> THE SYMPOSIUM
>
> In today's world 'applicationb often means 'web applicationb. Most web
> applications are messy. The current web application stack changes rapidly;
> frameworks go in and out of favor; the standards evolve; JavaScript
changes.
>
> At the same time, mission critical applications are built on top of bbig
> datab. We have large volumes of often volatile data that must be
accessed,
> distilled, summarized, and transformed for delivery to the web.
>
> Enterprises desperately need to provide stable, scalable, and sustainable
> infrastructure to meet the needs of modern applications. More and more
> organizations are using an XML infrastructure. Appropriately-designed XML
> applications can enable bstable innovationb of mission-critical
information
> resources while handling new requirements, changing data models, and
> mitigating the churn of constantly changing requirements.
>
>
> CALL FOR PARTICIPATION
>
> Tell us how you use XML infrastructure behind a web-based interface. We
> seek success stories and tales of disappointments; Hopes for the future and
> plans for how to get there; Tools, techniques, approaches, and philosophies
> that underlie integration of XML and the Web.
>
> All papers are peer-reviewed b we pride ourselves that you will seldom
get
> a more thorough, skeptical, or helpful review than the one provided by
> Balisage reviewers.
>
>
> WHERE TO GET HELP
>
> Email: info@xxxxxxxxxxxx for help, advice, or encouragement about a
> symposium submission. Wonder if your idea will fit in at the symposium? Ask
> us! Unsure if the technical level of your presentation is appropriate for
> the symposium participants? We'll be happy to discuss it with you! Need
> help making your paper into XML as required for submission? Speak up; we'll
> find someone to help.
>
>
> KEY DATES
>
> - 15 March 2016 b Peer review applications due
> - 22 April 2016 b Paper submissions due
> - 21 May 2016 b Speakers notified
> - 8 July 2016 b Final papers due
> - 1 August 2016 b XML In, Web Out:
>           International Symposium on sub rosa XML
> - 2b5 August 2016 b Balisage: The Markup Conference
>
> For more information: info@xxxxxxxxxxxx or +1 301 315 9631
>
> Balisage: The Markup Conference
> There is Nothing As Practical As A Good Theory
>
> ======================================================================
> Balisage: The Markup Conference 2016          mailto:info@xxxxxxxxxxxx
> August 2-5, 2016                               http://www.balisage.net
> Preconference Symposium: August 1, 2016                +1 301 315 9631
> ======================================================================
>
>
> XSL-List info and archive <http://www.mulberrytech.com/xsl/xsl-list>
> EasyUnsubscribe <http://-list/1278982> (by email)
> XSL-List info and archive <http://www.mulberrytech.com/xsl/xsl-list>
> EasyUnsubscribe <-list/552232> (by
> email <>)

Current Thread