 |
BOOK: XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition ISBN: 978-0-470-19274-0
 | This is the forum to discuss the Wrox book XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition by Michael Kay; ISBN: 9780470192740 |
|
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition ISBN: 978-0-470-19274-0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

March 25th, 2010, 12:37 AM
|
|
Authorized User
|
|
Join Date: Mar 2010
Posts: 28
Thanks: 3
Thanked 0 Times in 0 Posts
|
|
Fetching the values from XML file
Respected sir,
I have different different file for a single XSL style-sheet. In that XML file on information is vary every time.
Now, I have to fetch this value in my style-sheet and accordingly that information is display in the browser.
In my XML file one value is Band Information. This value is different for different XML files.
I want to fetch this value. What should i do?
Please suggest.
Thanks,
Dhrumil Shah
|
|

March 25th, 2010, 05:00 AM
|
 |
Wrox Author
|
|
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
|
|
Sorry, I don't understand your difficulty. What you are describing is what every XSLT user does. You're asking a question like "How do I write a program?".
Perhaps showing us what you have now and how it needs to be extended might be useful.
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
|
|

March 29th, 2010, 02:45 PM
|
|
Authorized User
|
|
Join Date: Mar 2010
Posts: 28
Thanks: 3
Thanked 0 Times in 0 Posts
|
|
Fetching the values from XML file
Respected Sir,
Here is my XML file.
<?xml version="1.0"?>
<?xml-stylesheet href='newCSS.XSL' type='text/xsl'?>
<Definition>
<sen_id> "LISS-3" </sen_id>
<pro_id> "L3ALWAR005" </pro_id>
<sub_id> " " </sub_id>
<orbit_no> "000000"</orbit_no>
<path_no> "095" </path_no>
<row_no> "052" </row_no>
<no_of_bands> "2" </no_of_bands>
<band_combi> "2345" </band_combi>
</Definition>
In this XML file you can see no_of_bands tag. This value is different in other XML file.
Now, I have one XSLT file. I am using that same XSLT file for all the XML files. But the problem is that the value of no_of_bands is different like some times is seems to be 3 or 4.
So my question is that how the XSLT file find how much no_of_bands it has to consider.
And my another question is that how can we put Recursive Loop (similar to for loop in C or C++) in the XSLT file for displaying values.
Regards/Thanks,
Dhrumil Shah
|
|

March 29th, 2010, 02:55 PM
|
 |
Wrox Author
|
|
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
|
|
Sorry, I don't understand the problem. It's perfectly normal to use the same XSLT file with multiple XML files, and for the different XML files to have different content. Why is this a problem? (The problem is partly your English, I'm afraid: the sentence "So my question is that how the XSLT file find how much no_of_bands it has to consider." doesn't really make much sense.)
As for your other question, it would be better to ask it on a separate thread, and to illustrate what you want to achieve by showing the input XML and the desired output.
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
|
|

March 29th, 2010, 03:04 PM
|
|
Authorized User
|
|
Join Date: Mar 2010
Posts: 28
Thanks: 3
Thanked 0 Times in 0 Posts
|
|
Okie sir, thanks for your guidance..
|
|

March 30th, 2010, 07:52 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2007
Posts: 477
Thanks: 10
Thanked 19 Times in 18 Posts
|
|
Your first question sounds really basic. Maybe if you show us what you want the output to be, we can be more helpful.
__________________
-------------------------
Whatever you can do or dream you can, begin it. Boldness has genius, power and magic in it. Begin it now.
-Johann von Goethe
When Two Hearts Race... Both Win.
-Dove Chocolate Wrapper
Chroniclemaster1, Founder of www.EarthChronicle.com
A Growing History of our Planet, by our Planet, for our Planet.
|
|
 |