[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

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

Subject: Re: [xsl] Xpath vs xslt vs jaxb within java context
From: "Eliot Kimber ekimber@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 8 Feb 2016 17:35:08 -0000

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).



Eliot Kimber, Owner
Contrext, LLC

From:  "Mailing Lists Mail daktapaal@xxxxxxxxx"
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 ..

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
> the 'basement' to the 'last mile9.
> Chair: James Fuller, MarkLogic
> Monday August 1, 2016
> Bethesda North Marriott Hotel & Conference Center, Bethesda, MD, USA
> In today's world 'application9 often means 'web application9. Most web
> applications are messy. The current web application stack changes rapidly;
> frameworks go in and out of favor; the standards evolve; JavaScript
> At the same time, mission critical applications are built on top of 3big
> data2. 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 3stable innovation2 of mission-critical information
> resources while handling new requirements, changing data models, and
> mitigating the churn of constantly changing requirements.
> Tell us how you use XML infrastructure behind a web-based interface. We
> success stories and tales of disappointments; Hopes for the future and
> for how to get there; Tools, techniques, approaches, and philosophies that
> underlie integration of XML and the Web.
> All papers are peer-reviewed  we pride ourselves that you will seldom get
> more thorough, skeptical, or helpful review than the one provided by
> reviewers.
> Email: info@xxxxxxxxxxxx for help, advice, or encouragement about a
> submission. Wonder if your idea will fit in at the symposium? Ask us!
> if the technical level of your presentation is appropriate for the
> 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.
> - 15 March 2016  Peer review applications due
> - 22 April 2016  Paper submissions due
> - 21 May 2016  Speakers notified
> - 8 July 2016  Final papers due
> - 1 August 2016  XML In, Web Out:
>           International Symposium on sub rosa XML
> - 2-5 August 2016  Balisage: The Markup Conference
> For more information: info@xxxxxxxxxxxx or +1 301 315 9631
> <tel:%2B1%20301%20315%209631>
> 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
> <tel:%2B1%20301%20315%209631>
> ======================================================================
XSL-List info and archive <http://www.mulberrytech.com/xsl/xsl-list>
EasyUnsubscribe <-list/1278982> (by
email <> )

Current Thread