This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Reluctant question on start lines
- To: "XSLList (E-mail)" <XSL-List at lists dot mulberrytech dot com>
- Subject: [xsl] Reluctant question on start lines
- From: "Koray Berk" <berkk at ims dot com dot tr>
- Date: Fri, 20 Apr 2001 17:59:08 +0300
- Reply-To: xsl-list at lists dot mulberrytech dot com
Question 1:
I had asked about the namspace files and according to the replies
<xsl:stylesheet version="1.0"
xmlns:xsl="<http://www.w3.org/1999/XSL/Transform>"
xmlns:fo="<http://www.w3.org/1999/XSL/Format>">
should be my starting line.
However my xsl:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:template match="news">
<b><xsl:value-of select="title"/></b><br/>
<i>Date:</i><xsl:value-of select="date"/><br/>
<i>Comment of <xsl:value-of select="provider"/>: <xsl:value-of
select="comment"/></i><br/>
<xsl:for-each select="body/p"><p style="text-indent:50"><xsl:value-of
select="."/></p></xsl:for-each>
<br/><br/>
</xsl:template>
<xsl:template match="/">
<html>
<body>
<xsl:for-each select="AllNews/news">
<xsl:apply-templates select="."/>
</xsl:for-each>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
does not work for my xml:
<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XML Spy v3.5 NT (http://www.xmlspy.com) by () -->
<?xml-stylesheet href = "haber.xsl" type="text/xsl"?>
<AllNews>
<news>
<title>This is the tile</title>
<date>This is the date</date>
<body><p>This is the body</p></body>
<comment>This is the comment</comment>
<provider>This is the provider</provider>
</news>
<AllNews>
All I get is a:
italic Date: and an itallic Comment of: and thats that!
I have downloaded MSXSML3.0 and installed it (it installed itself using an
installer)
I am using XMLSPY
and I dont understand why this doesnt work where as
the so unrecommended <xsl:stylesheet
xmlns:xsl="http://www.w3.org/TR/WD-xsl"> works if I replace the relevant
line on my xsl.
(however with the old one <xsl:variable> doesnt work....
I am so confused....
koray
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list