[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Hiding XML to an application (serialization?)

Subject: Re: Hiding XML to an application (serialization?)
From: Andrew Franz <afranz0@xxxxxxxxxxxxxxxx>
Date: Wed, 22 Jun 2005 07:55:38 +1000
andrew franz
Angel Gavin wrote:

Hi,

I have an application that consists of two components, say A and B.
Component A is a kind of monitoring and control system. It reads application
configuration files (in XML; customer requirement), keeps these files
updated (e.g., updating values on user request) and call component B with
(relevant) configuration parameters. The point is that we want to keep
component A as much independent as possible from the XML "vocabulary" used
in configuration files. In doing so, changes in file definition (e.g., new
parameters) will not (ideally) affect component A. Component A is going to
be developed by a third party, and the idea behind this is that we do not
want to request a change in A in case we discover we have to add, say, a new
configuration parameter.

Lessons learnt in the past show that changing A is (irremediably) more
frequent than expected. I think we can manage configuration files quite well
by defining a set of XSLT scripts to do the dirty work (we would assume this
activity), and then component A would only have to know which is the script
to be executed, its input parameters and input/output XML files. Perhaps
this solution is quite twisted, but it is supposed to work, isn't it? Any
hint will be much appreciated.

Concerning the second part of the problem (calling B with relevant
configuration data), the good news are that we develop this component (and
its interfaces) but I am afraid that:

- B cannot read data from files
- My colleagues in charge of the "B thing" do not want to receive data in
XML. For sure there is a good reason for that (dunno!), but at the end the
problem is the same. I feel a bit stupid playing around with this, but the
point is that we want A to be independent of XML file structure, passing
data to B in a "non-XML fashion" (the XSLT trick above will not work).



Try http://cocoon.apache.org/


The sitemap would look something like the following (for CSV output):
   <map:match pattern="*.csv">
       <map:generate src="a.xml" />
       <map:transform src="sql2csv.xsl" />
       <map:serialize type="csv" />
   </map:match>

where the CSV serialzer is defined as:
<map:serializer name="csv" mime-type="application/x-csv" src="org.apache.cocoon.serialization.TextSerializer">
<encoding>UTF-8</encoding>
<omit-xml-declaration>yes</omit-xml-declaration>
</map:serializer>


Other output types such as XLS, PDF, HTML, etc are possible simply by changing the final translation step (multiple possible) and serializer.

Warning: Once you start using Cocoon you'll find a whole lot of new problems to solve!

I've been reading something about serialization. I do not know if this will
be of help or not (far from being an expert on this; I have never used this
stuff in my life). Any ideas?

I know it sounds weird, but any help on this will be much appreciated
(including that it is impossible to implement; it will allow me to save many
time trying to convince my colleagues :)  )

Many many many thanks in advance,
Angel



______________________
Este mensaje, y en su caso, cualquier fichero anexo al mismo,
puede contener informacion clasificada por su emisor como confidencial
en el marco de su Sistema de Gestion de Seguridad de la Informacion siendo para uso exclusivo del destinatario, quedando prohibida su divulgacion copia o distribucion a terceros sin la autorizacion expresa del remitente. Si Vd. ha recibido este mensaje erroneamente, se ruega lo notifique al remitente y proceda a su borrado. Gracias por su colaboracion.
______________________
This message including any attachments may contain confidential information, according to our Information Security Management System,
and intended solely for a specific individual to whom they are addressed.
Any unauthorised copy, disclosure or distribution of this message
is strictly forbidden. If you have received this transmission in error,
please notify the sender immediately and delete it.
______________________

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.