xsl-list
[Top] [All Lists]

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

2016-02-08 11:35:17
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(_at_)gmail(_dot_)com"
<xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com>
Reply-To:  xsl-list <xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>
Date:  Monday, February 8, 2016 at 11:15 AM
To:  xsl-list <xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>
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(_at_)mulberrytech(_dot_)com"
<xsl-list-service(_at_)lists(_dot_)mulberrytech(_dot_)com> 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 mile¹.

Chair: James Fuller, MarkLogic
Monday August 1, 2016
Bethesda North Marriott Hotel & Conference Center, Bethesda, MD, USA


THE SYMPOSIUM

In today's world 'application¹ often means 'web application¹. 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 ³big
data². 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 ³stable innovation² 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 ? 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(_at_)balisage(_dot_)net 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 ? 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(_at_)balisage(_dot_)net 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(_at_)balisage(_dot_)net
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 <> )
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--
<Prev in Thread] Current Thread [Next in Thread>