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

RE: How to include the name of a xml document in the c

Subject: RE: How to include the name of a xml document in the content of a tag.
From: "Rua Costas, Beatriz" <bruac@xxxxxxxxxxx>
Date: Wed, 24 Oct 2001 10:13:32 +0200
beatriz rua costas
I am using the next java code:

TransformerFactory tFactory = TransformerFactory.newInstance();
Transformer transformer = tFactory.newTransformer(new
StreamSource(XSLFile));
transformer.transform(new StreamSource(XMLFile), new StreamResult(fOutPut));

How can I pass the xml filename in as a parameter to the transform?

Lots of thanks for your help.

				Beatriz

> -----Mensaje original-----
> De:	Chris Bayes [SMTP:chris@xxxxxxxxxxx]
> Enviado el:	martes 23 de octubre de 2001 20:39
> Para:	xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Asunto:	RE:  How to include the name of a xml document in the
> content of a tag.
> 
> Beatriz,
> Depending on how you are doing the transform the easiest way to do it is
> to pass the filename in as a parameter to the transform. Then add
> <xsl:param name="filename" select="noFileNamePassedToStylesheet" />
> To your stylesheet
> 
> Ciao Chris
> 
> XML/XSL Portal
> http://www.bayes.co.uk/xml
> 
> 
> > -----Original Message-----
> > From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx 
> > [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of 
> > Rua Costas, Beatriz
> > Sent: 23 October 2001 17:50
> > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> > Subject:  How to include the name of a xml document in 
> > the content of a tag.
> > 
> > 
> > 	Hello everyone,
> > I am using a xsl document to do several transformations in xml files. 
> > I would like to include in the xml document the name of the 
> > file like the content of a tag.
> > 
> > E.g.: 
> > 
> > Original XML (before XSL Transformation):
> > 
> > <?xml version="1.0" encoding="ISO8859-1" ?>
> > <CATALOG>
> >   <CD>
> >     <TITLE>Empire Burlesque</TITLE>
> >     <ARTIST>Bob Dylan</ARTIST>
> >     <COUNTRY>USA</COUNTRY>
> >     <COMPANY>Columbia</COMPANY>
> >     <PRICE>10.90</PRICE>
> >     <YEAR>1985</YEAR>
> >   </CD>
> > .
> > .
> > .
> > 
> > Final XML (after XSL Transformation):
> > 
> > <?xml version="1.0" encoding="ISO8859-1" ?>
> > <CATALOG>
> >   <CD>
> >     <DOC>The_name_of_the_xml_document</DOC>
> >     <TITLE>Empire Burlesque</TITLE>
> >     <ARTIST>Bob Dylan</ARTIST>
> >     <COUNTRY>USA</COUNTRY>
> >     <COMPANY>Columbia</COMPANY>
> >     <PRICE>10.90</PRICE>
> >     <YEAR>1985</YEAR>
> >   </CD>
> > .
> > .
> > .
> > 
> > Is there any easy way to get the name of the xml document 
> > using a xsl file?
> > 
> > Thank you.
> > 
> > 	Beatriz 
> > 
> >  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> > 
> > 
> 
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.