Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Correct using of XSL, XML, HTM

Status
Not open for further replies.

Alehander

Technical User
Jul 2, 2003
1
RU
Hi to all.

I have a.XSL file as following:
Code:
<?xml version=&quot;1.0&quot; encoding=&quot;ISO-8859-1&quot;?>
<html xsl:version=&quot;1.0&quot;
  xmlns:xsl=&quot;[URL unfurl="true"]http://www.w3.org/1999/XSL/Transform&quot;[/URL]
  xmlns=&quot;[URL unfurl="true"]http://www.w3.org/TR/xhtml1/strict&quot;>[/URL]
 <TITLE>Index -- My text here</TITLE>
 <link rel=&quot;stylesheet&quot; href=&quot;some.css&quot; type=&quot;text/css&quot; />
<body>
<h1>My Heading</h1>
<p><small>My comment</small></p>
<hr />
<xsl:for-each select=&quot;mother/child&quot;>
  <xsl:value-of select=&quot;subchild_1&quot;/>
  <xsl:value-of select=&quot;subchild_2&quot;/>
  <xsl:value-of select=&quot;subchild_2&quot;/>
</xsl:for-each>
</body>
</html>
and have b.XML file:
Code:
<?xml version=&quot;1.0&quot; encoding=&quot;ISO-8859-1&quot;?>
<?xml-stylesheet type=&quot;text/xsl&quot; href=&quot;a.XSL&quot; ?>
<mother>
  <child>
   <subchild_1>Data 1</subchild_1> <br />
   <subchild_2>Data 2</subchild_2> <br />
   <subchild_3>Data 3</subchild_3> <br />
  </child>
  <child>
   <subchild_1>Data 11</subchild_1> <br />
   <subchild_2>Data 12</subchild_2> <br />
   <subchild_3>Data 13</subchild_3> <br />
  </child>
</mother>
When I am starting b.XML everything working perfect but only in MSIE.

In this case, my stylesheet (a.XSL) has the function of both: stylesheet and template and seems to me that it is wrong. If I want to have:
- file a - as data container (xml?)
- file b - as stylesheet (xsl?) - styles only
- file c - displaying file (html or xhtml?)
how I can make all of that it?

Or, in XML stylesheet HAS the template function?

Also, I can't add META tags but need them.

Thanks in advance,

Alex
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top