Hi.
Suppose this is the XML file:
----------------------------------------------------------------------------
----------------
<?xml version='1.0'?>
<lunch-menu>
<food>
<name>Cheese Pizza</name>
<price>$6.95</price>
<description>Individual deep-dish pizza with lots of mozzarella
cheese</description>
<calories>800</calories>
</food>
<food>
<name>Pepperoni Pizza</name>
<price>$7.95</price>
<description>Individual deep-dish cheese pizza with thick-cut pepperoni
slices</description>
<calories>950</calories>
</food>
.............
............
</lunch-menu>
----------------------------------------------------------------------------
----------------
Suppose this is the XSLT file:
----------------------------------------------------------------------------
----------------
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="
http://www.w3.org/1999/XSL/Transform"> <xsl:param name="calories">1500</xsl:param>
<xsl:template match="/">
<HTML>
<BODY STYLE="font-family:Arial, helvetica, sans-serif; font-size:12pt;
background-color:#EEEEEE">
<xsl:for-each select="lunch-menu/food[calories <= $calories]">
<DIV STYLE="background-color:blue; color:white; padding:4px">
<SPAN STYLE="font-weight:bold; color:white"><xsl:value-of
select="name"/></SPAN>
- <xsl:value-of select="price"/>
</DIV>
<DIV STYLE="margin-left:20px; margin-bottom:1em; font-size:10pt">
<xsl:value-of select="description"/>
<SPAN STYLE="font-style:italic">
(<xsl:value-of select="calories"/> calories per serving)
</SPAN>
</DIV>
</xsl:for-each>
</BODY>
</HTML>
</xsl:template>
</xsl:stylesheet>
----------------------------------------------------------------------------
----------------
This is the HTML product:
----------------------------------------------------------------------------
----------------
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Prova - eur 5</title>
</head>
<body>
<div style="color: white; padding: 4px; background-color: teal">
<span style="font-weight: bold; color: white">Cheese Pizza</span> - eur
5.95</div>
<div style="font-size: 10pt; margin-left: 20px; margin-bottom: 1em">
Two of our famous Belgian Waffles with plenty of real maple syrup.<span
style="font-style: italic">
(650 calories per serving) </span></div>
<div style="color: white; padding: 4px; background-color: teal">
<span style="font-weight: bold; color: white">Stradsdsdswberry Belgian
Waffles</span> - $7.95</div>
<div style="font-size: 10pt; margin-left: 20px; margin-bottom: 1em">
Light Belgian waffles covered with strawberries and whipped cream.<span
style="font-style: italic">
(900 calories per serving) </span></div>
<div style="color: white; padding: 4px; background-color: teal">
<span style="font-weight: bold; color: white">Berry-Berry Belgian
Waffles</span>
- $8.95</div>
<div style="font-size: 10pt; margin-left: 20px; margin-bottom: 1em">
Light Belgian waffles covered with an assortment of fresh berries and
whipped cream.<span style="font-style: italic"> (900 calories per serving)
</span></div>
<div style="color: white; padding: 4px; background-color: teal">
<span style="font-weight: bold; color: white">French Toast</span> -
$4.50</div>
<div style="font-size: 10pt; margin-left: 20px; margin-bottom: 1em">
Thick slices made from our homemade sourdough bread.<span
style="font-style: italic">
(600 calories per serving) </span></div>
<div style="color: white; padding: 4px; background-color: teal">
<span style="font-weight: bold; color: white">Homestyle Breakfast</span> -
$6.95</div>
<div style="font-size: 10pt; margin-left: 20px; margin-bottom: 1em">
Two eggs, bacon or sausage, toast, and our ever-popular hash browns.<span
style="font-style: italic">
(950 calories per serving) </span></div>
</body>
</html>
----------------------------------------------------------------------------
----------------
Excuse me for the lenght of the post.
The last section is what i want to exit if the robot of the search engine
visit the page, for indexing.
Thanks for your help,
Matteo Migliore
"Oleg Tkachenko [MVP]" <oleg@NO!SPAM!PLEASEtkachenko.com> ha scritto nel
messaggio news:%23VKOUMvFEHA.2512@TK2MSFTNGP10.phx.gbl...
[quoted text, click to view] > Matteo Migliore wrote:
>
> > Is it possible to create an HTML file that contain XML data content and
html
> > tags using the XML engine?
> >
> > Normally use:
> > - XML data
> > - XSLT layout
> > - HTML page that show the page but content are into xml file
> >
> > What I want is to obtain the html file that contain what IE parse.
>
> Provide please small sample of what you want to achieve.
>
> --
> Oleg Tkachenko [XML MVP, XmlInsider]
>
http://blog.tkachenko.com