Geeks With Blogs
Tanveer Ibn Haresh
Suppose You have a XML File Jungle.xml.

<?xml version="1.0"?>

<project>
  <title>The Xpath project</title>
<problems>
    <problem>
      <title>Initial problem</title>
      <description>We have to learn something about Location Path</description>
      <difficulty level="5">This problem should not be too hard</difficulty>
    </problem>
    <solutions>
      <item val="low">Buy a XSLT book</item>
      <item val="low">Find an XSLT website</item>
      <item val="high">Register for a XSLT course and do exercices</item>
    </solutions>
    <problem>
      <title>Next problem</title>
      <description>We have to learn something about predicates</description>
      <difficulty level="6">This problem is a bit more difficult</difficulty>
    </problem>
    <solutions>
      <item val="low">Buy a XSLT book</item>
      <item val="medium">Read the specification and do some exercises</item>
      <item val="high">Register for a XPath course and do exercices</item>
    </solutions>
  </problems>
</project>

You have an XSLT file called Jungle.xslt file.

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                version="1.0">

  <xsl:output method="html"/>

  <xsl:template match="/project">
    <html>
      <body bgcolor="#FFFFFF">
        <h1><xsl:value-of select="title" /></h1>
        Here are the titles of our problems: <ul>
        <xsl:apply-templates select="problems/problem" />
      </ul>
      </body>
    </html>
  </xsl:template>

<xsl:template match="problems/problem">
  <li><xsl:value-of select="title" /></li>
</xsl:template>

</xsl:stylesheet>

So how do you refer this xslt file in the xml file? Simple just add this one line under the <?xml version Tag just like this..

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="Jungle.xslt"?>

Now Open the xml file in IE without this stylesheet reference added and with added.You will see the difference. Posted on Tuesday, February 17, 2009 11:46 AM XML,XSLT,XPath | Back to top

Related Posts on Geeks With Blogs Matching Categories

Comments on this post: How to refer a XSLT file in a XML Dcoment

# replica purses
Requesting Gravatar...
Hi !!! we'll use the overload that takes in the name of a View that it could be transfomed into the latest version that is available in the market.
Regards,
Left by sdfa@gmail.com on Jul 25, 2009 2:44 AM

# replicawatches
Requesting Gravatar...
http://www.wholesale-retailer.com/


And it is not just replica Jaeger LeCoultre watches. We have every known brand of watches available as the best replicas ?and a few that you might not yet have heard of! Apart from the Jaeger LeCoultre Replica Watches range, you will find exceptional Rolex , Breitling, Cartier, Patek Philippe, Audemars Piguet, Vacheron Constantin and other internationally famous brands on sale right now.
Another USP of the site would be the no hidden fee policy. We firmly believe that whatever we show our customer should be final and there should be no add ons on the billing page, leading to a sour taste in the customer experience of shopping. We simply want to offer you the best deal possible!
Left by fashion on Sep 12, 2009 3:40 AM

# re: How to refer a XSLT file in a XML Dcoment
Requesting Gravatar...
http://www.dearwatches.com/breitling-montbrillant-working-chronograph-with-blue-dial-p-3977.html
Top quality Japanese Quartz Working Chronograph Movement

Fully Functional Working Chronograph (Stopwatch)

Solid 316 Stainless Steel Case

Solid 316 Stainless Steel Strap
Left by jake on Oct 20, 2009 6:54 AM

# re: How to refer a XSLT file in a XML Dcoment
Requesting Gravatar...
http://www.placeboots.com/UGG-Handbags/
As we all know that, Uggs Australia boots, prevailing all over the world, is crazily pursued by women, especially those young girls. Girls became fans of these short Uggs that Ugg short boots became the must-have-shoes in their wardrobe. Long ago, short Ugg looks so ugly with broad shape so that some people even thought of boycotting them from the fashion industry. But gradually UGG Classic Cardy gain a huge popularity and become trendsetting footwear in the haute couture
Left by Classic Cardy on Nov 03, 2009 10:21 AM

# re: How to refer a XSLT file in a XML Dcoment
Requesting Gravatar...
http://www.christianlouboutinbuy.net
this is such a great look in a top that will definitely switch up your everyday look. Cheap christian louboutin shoes womens christian louboutin pump banding and unfinished edging at the arm openings makes this shirt feel homemade and as if it has been worn for years. These cheap christian louboutin shoes looks in will make it easy for you to embrace your inner love child without losing your chic edge.
Left by cheap Christian Louboutin on Nov 24, 2009 9:32 AM

# re: How to refer a XSLT file in a XML Dcoment
Requesting Gravatar...
[url=http://www.wholesale-retailer.com/UGG-Boots/] UGG Layback Slipper [/url] UGG Classic Short
Left by xx on Jan 13, 2010 6:57 AM

# re: How to refer a XSLT file in a XML Dcoment
Requesting Gravatar...
I've tried this example and it's work right!
Left by Natural gas garage heater on Jan 23, 2010 2:30 PM

# re: How to refer a XSLT file in a XML Dcoment
Requesting Gravatar...
100128SLLLZ she wonders to herself if ghd pink mk4 her home, a plantation called Tara, is still standing, or if it was "also ghd kiss pink gone with the wind which had swept through Georgia". More generally, the title has been ghd gold mk4 interpreted as referring to the entire way of life ghd mk4 of the antebellum South as having "Gone with the Wind". The prologue of the movie refers to the old way of life in the South as "gone with the wind."http://www.collectionghd.com/products_new.html
Left by ghd gold mk4 on Jan 28, 2010 11:14 AM

# re: How to refer a XSLT file in a XML Dcoment
Requesting Gravatar...
100128SLLLZ she wonders to herself if ghd pink mk4 her home, a plantation called Tara, is still standing, or if it was "also ghd kiss pink gone with the wind which had swept through Georgia". More generally, the title has been ghd gold mk4 interpreted as referring to the entire way of life ghd mk4 of the antebellum South as having "Gone with the Wind". The prologue of the movie refers to the old way of life in the South as "gone with the wind." http://www.collectionghd.com/products_new.html
Left by ghd gold mk4 on Jan 28, 2010 11:15 AM

# re: How to refer a XSLT file in a XML Dcoment
Requesting Gravatar...
100128SLLLZ she wonders to herself if ghd pink mk4 her home, a plantation called Tara, is still standing, or if it was "also ghd kiss pink gone with the wind which had swept through Georgia". More generally,
Left by ghd gold mk4 on Jan 28, 2010 11:16 AM

# ugg classic cardy
Requesting Gravatar...
he ugg classic cardy combine a classic prep argyle pattern and cozy ugg bailey button sweater knit for coolest, comfiest, casual look. a merino wool blend silhouette made to look like your favorite sweater featuring a soft ugg classic cardyfoam insole covered with genuine boots
Left by crochet ugg boots on Jan 28, 2010 11:21 AM

# re: How to refer a XSLT file in a XML Dcoment
Requesting Gravatar...
The Miro service allows you to watch Link TV programs and videos from other content partners full screen.

Left by TVLinks on Feb 10, 2010 3:34 AM

# re: How to refer a XSLT file in a XML Dcoment
Requesting Gravatar...
The person or institution that bought or sold the currency has no plan to actually take delivery of the currency in the end.Rather,they were solely speculating on the movement of that particular currency.
Left by frwc royal trader review on Feb 11, 2010 1:15 AM

# re: How to refer a XSLT file in a XML Dcoment
Requesting Gravatar...
I believe it can be configured to add metadata as an IPTC header.On my linux box I used kimdaba which is pretty cool. You can annotate with people, location and keywords... it stores the annotations in xml which could be rdf'ized quite easily
Left by Spielautomaten Casino on Mar 27, 2010 5:38 AM

# re: How to refer a XSLT file in a XML Dcoment
Requesting Gravatar...
Christian Louboutin Evening

discount Christian Louboutin

[url=http://www.longineswatches.org/]replica watch[/url]
Left by sdfas on Apr 22, 2010 7:33 PM

# re: How to refer a XSLT file in a XML Dcoment
Requesting Gravatar...
Left by Replica Jewelry on Jun 12, 2010 10:56 PM

# re: How to refer a XSLT file in a XML Dcoment
Requesting Gravatar...
Any woman replica watches loves the color pink and
Left by handbags on Jun 13, 2010 8:24 PM

# re: How to refer a XSLT file in a XML Dcoment
Requesting Gravatar...
Thanks for this. It certainly clears a few things up for me.
Left by stock picks on Aug 01, 2010 9:24 PM

# re: How to refer a XSLT file in a XML Dcoment
Requesting Gravatar...
i wonder if that works with every xml document, maybe some can tell me? Ok guys see you i continue playing poker with my friends, bye.
Left by Poker ohne Download on Sep 05, 2010 11:09 AM

# re: How to refer a XSLT file in a XML Dcoment
Requesting Gravatar...
Its great that I found information about XSLT file in a XML Dcoment. Its great.
Left by Dermology Skin Care on Nov 13, 2010 7:31 AM

# re: How to refer a XSLT file in a XML Dcoment
Requesting Gravatar...
Thanks for the post it was nice. I read your other post as well all were good. I really appreciate the author.
Left by Fast loans on Dec 09, 2010 4:22 AM

# re: How to refer a XSLT file in a XML Dcoment
Requesting Gravatar...
This was a really nice blog that you made here. Please keep up the good work and I look forward to more of your excellent posts.
Left by Forex Trading on Dec 09, 2010 11:18 AM

# re: How to refer a XSLT file in a XML Dcoment
Requesting Gravatar...
This is very interesting, informative and technical article. I am very impressed with your blog post.
Left by same day payday loans on Dec 23, 2010 1:34 AM

# re: How to refer a XSLT file in a XML Dcoment
Requesting Gravatar...
ttp://www.marrychelsea.com/ Quinceanera Dresses http:// www.dress49.com Quinceanera Dresses http://www.marrychelsea.com/ Evening Dresses
Left by saron on Jan 02, 2011 3:31 PM

# re: How to refer a XSLT file in a XML Dcoment
Requesting Gravatar...
orted directly from deIsgner jewelry online sto
Left by ll on Jan 03, 2011 9:30 PM

# re: How to refer a XSLT file in a XML Dcoment
Requesting Gravatar...
I happy see your website. Hope you have a good day.
Left by Chiang Mai Trips on Jan 07, 2011 1:39 AM

# re: How to refer a XSLT file in a XML Dcoment
Requesting Gravatar...
Keep up your good work.Thanks for sharing this wonderful piece of information.It is a great post for the people to get the proper information.
Left by Fast Pay Day Loan Application on Jan 14, 2011 11:34 PM

# re: How to refer a XSLT file in a XML Dcoment
Requesting Gravatar...
Pretty good post. I simply came across your site and wanted to say that I have genuinely enjoyed reading your blog posts. Any ways I'll be subscribing for your feed and I hope you post again soon.
Left by new herpes treatment on Jan 29, 2011 12:06 AM

# wart
Requesting Gravatar...
The article is nice and its pleasant to read.I have known very important things over here which i have not known before.
Left by best wart remover on Jan 31, 2011 2:26 AM

# re: How to refer a XSLT file in a XML Dcoment
Requesting Gravatar...
Some of the points you have raised will assist me greatly. I like the way you have structured your site, it is super and very easy to follow. I have bookmarked you and will be back regularly.
Left by Casinò del web on Feb 10, 2011 3:26 AM

# re: How to refer a XSLT file in a XML Dcoment
Requesting Gravatar...
I like your post and all you share with us is up to date and quite informative, i would like to bookmark the page so I can come here again to read you, as you have done a wonderful job.
Left by holmes filter on Feb 14, 2011 8:12 AM

# re: How to refer a XSLT file in a XML Dcoment
Requesting Gravatar...
You deserve the best and I know this will just add to your very proud accomplishments in your already beautiful and deserving blessed life. I wish you all the best and again. Thanks a lot..
Left by trendy girls clothes on Mar 07, 2011 8:31 PM

# re: How to refer a XSLT file in a XML Dcoment
Requesting Gravatar...
Nice information, valuable and excellent design, as share good stuff with good ideas and concepts, lots of great information and inspiration, both of which I need,thanks for all the enthusiasm to offer such helpful information here.
Left by Document imaging software on Mar 08, 2011 2:03 AM

# re: How to refer a XSLT file in a XML Dcoment
Requesting Gravatar...
Many thanks for providing such useful information.This code snippets are incredibly helpful. I truly appreciate your expert approach. I would like to thank you for the efforts you made in writing this particular post. I am hoping the same from you in the future as well.
Left by hair loss product comparison on Mar 21, 2011 2:05 AM

# re: How to refer a XSLT file in a XML Dcoment
Requesting Gravatar...
hi...
this is really a nice one...i like it..
keep posting...
Left by male hair loss treatment on Mar 21, 2011 7:39 AM

# re: How to refer a XSLT file in a XML Dcoment
Requesting Gravatar...
I would like to thank you for the efforts you have made in writing this post. I am hoping the same best work from you in the future as well.
Left by Chicago Brain Injury Lawyer on Mar 23, 2011 12:41 PM

# re: How to refer a XSLT file in a XML Dcoment
Requesting Gravatar...
xhtml and html is based on xml.. i like this post.. thanks for sharing ;)
Left by xvideos on Mar 26, 2011 10:11 AM

# re: How to refer a XSLT file in a XML Dcoment
Requesting Gravatar...
I wish you would be done now, but if you were there would be no need for this article.Unfortunately order of execution needs to be modified, you also need to specify an instance number.
Left by Investing in the UK on Mar 28, 2011 1:36 AM

# re: How to refer a XSLT file in a XML Dcoment
Requesting Gravatar...
This is a really good post. Must admit that you are amongst the best bloggers I have read. Thanks for posting this informative article.
Left by Decompression Sickness on Mar 30, 2011 2:33 AM

# re: How to refer a XSLT file in a XML Dcoment
Requesting Gravatar...
You all do such a great job at such Concepts... can't tell you how much I, for one appreciate all you do!
Left by speed reading software on Apr 02, 2011 2:13 PM

# re: How to refer a XSLT file in a XML Dcoment
Requesting Gravatar...
Awesome photograph of the car..I just stumbled upon your blog..Keep posting new stuffs.
Left by chore cards on Apr 02, 2011 2:16 PM

# re: How to refer a XSLT file in a XML Dcoment
Requesting Gravatar...
I finally found one post which is informative and which has provided genuine information for the readers. I really liked the way writer has thrown some light on unhidden facts. Great job in deed!
Left by dc limo on Apr 02, 2011 2:21 PM

# re: How to refer a XSLT file in a XML Dcoment
Requesting Gravatar...
I just found this blog when I was looking for something else. I wanted to comment about the template,I really like it. I think I will use something similar for my blog as well..
Left by buffalo web design on Apr 02, 2011 2:23 PM

# re: How to refer a XSLT file in a XML Dcoment
Requesting Gravatar...
Great review on the Blackberry handsets..I want to express my admiration of your writing skill and ability to make readers read from the beginning to the end. I would like to read newer posts and to share my thoughts with you..
Left by personal statement writers on May 02, 2011 11:10 AM

# re: How to refer a XSLT file in a XML Dcoment
Requesting Gravatar...

Thanks a lot for following us here. :D Arigatou
Left by cheap ugg on Jun 07, 2011 3:28 AM

# re: How to refer a XSLT file in a XML Dcoment
Requesting Gravatar...
XSLT file is very good source. Now I can refer using XML files too. Very good article.
Left by build muscles on Jul 01, 2011 12:20 PM

# re: How to refer a XSLT file in a XML Dcoment
Requesting Gravatar...
e-Year cheap louis vuitton sunglasses period, China Leather region was further characterized (polyurethane network global origin of the article) the further development of the eastern coastal provinces to speed up louis vuitton for sale transformation and upgrading at the same time, the central region continue to undertake the transfer of industries , showing a lot of new industry convergence zone, the regio...
Left by Cheap Jordans Shoes on Jul 07, 2011 2:25 AM

# re: How to refer a XSLT file in a XML Dcoment
Requesting Gravatar...
The Extensible Markup Language is a set of rules for encoding documents in machine-readable form. It is defined in the XML 1.0 Specification produced. Thanks for sharing the informative post.
Regards,
Jack - online dating
Left by online dating on Jul 10, 2011 10:25 AM

# re: How to refer a XSLT file in a XML Dcoment
Requesting Gravatar...
I really like your blog.. very nice colors & theme. Did you design this website yourself or did you hire someone to do it for you? Plz reply as I'm looking to design my own blog and would like to know where u got this from. thanks
Left by anemia homeopathic on Jul 11, 2011 12:52 AM

# re: How to refer a XSLT file in a XML Dcoment
Requesting Gravatar...
Thanks, It Helps Me...............
Left by Sachin on Sep 19, 2012 11:23 PM

# re: How to refer a XSLT file in a XML Dcoment
Requesting Gravatar...
The way you article making is undeniably well known. I like the post you put here on this site. This one is genuinely worthwhile for every one of the people who are looking this kind of stuff on web crawler. Grateful concerning Sharing such remarkable information and keep posting. Article Writing
Left by Kashif on Apr 10, 2014 5:46 PM

Your comment:
 (will show your gravatar)


Copyright © Tanveer-Ibn-Haresh | Powered by: GeeksWithBlogs.net