This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes scope of XSL ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "scope of XSL ?" Watch "scope of XSL ?" New topic
Author

scope of XSL ?

Priyadarshini Anand
Greenhorn

Joined: Jun 02, 2004
Posts: 22
Hello ,


Hello,

I am new in XML & XSL.I have a problem in my project.The simplified form of my problem is :

If there is a directory "A" containing A.xml, I need to display it using XSL.I want to display all the subdirectories and files in "A".How will i write XSl.Is it possible in XSL.I need urgent help.Thanks,

Priya

if u understood above proble pl have a look below :


exact problem is as follows ::



I have a XML file in a directory 'A' displayed by XSL file.Now, this XSL file should be capable of

1. displaying the name of all the subdirectories of A that contain a xml file with the same name as the subdirectory has.
2. displaying all the XML files in directory A that contain node<passcount> and <failcount> anywhere in XML.

How should i approach,document() function should help but i am not geting how to use it in this case.pl help me.

[ June 10, 2004: Message edited by: Priyadarshini Anand ]
[ June 10, 2004: Message edited by: Priyadarshini Anand ]
Balaji Loganathan
author and deputy
Bartender

Joined: Jul 13, 2001
Posts: 3150
Originally posted by Priyadarshini Anand:
Hello ,
If there is a directory "A" containing A.xml, I need to display it using XSL.I want to display all the subdirectories and files in "A".

If i understood correctly, do you want to
1.Retrieve the list of XML files in the directory "A"
2.Display each XML file with XSL using XSL.???
XSLT is not meant for accessing the local system details, or its not possible with XSL to access the directory and list down the xml files for furhter processing. Not a good approach/idea.
Having said that, both XALAN-j and XT for java have extension funtion which allow you to do java related method calls. For example you can display date/time in XSL using the extension feature of Xalan-j.


Spritle Software Blogs
Priyadarshini Anand
Greenhorn

Joined: Jun 02, 2004
Posts: 22
Thanks, for the information.What I need to study to achieve the purpose i want to solve? How to integrate java &XSl & XML.Some online material..topics specifically for the problem ???

Thanks Priya
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Originally posted by Priyadarshini Anand:
How to integrate java &XSl & XML.

http://www.javaalmanac.com/egs/javax.xml.transform/BasicXsl.html


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Arun Prasath
Ranch Hand

Joined: Sep 17, 2003
Posts: 192
For displaying the subdirectories in a specific folder, you can use java to find the set of folders and pass them as a parameter to xsl processor (Xalan or Saxon). Both the processors has "extensions" feature which you can use it.
This URL might help.


SCJP 1.4, SCDJWS , SCJA<br />I can do ALL things through CHRIST who strengthens me.
 
Consider Paul's rocket mass heater.
 
subject: scope of XSL ?
 
Similar Threads
how to find subdirectories and files in a directory using XSL
distinct child nodes ??
How to integrate XSL and java
xslt/search xml document
xml / xsl not accessible on netscape & mozilla