Topic: error in xsl file can somebody help? Pages that link to <a href="https://ozoneasylum.com/backlink?for=25185" title="Pages that link to Topic: error in xsl file can somebody help?" rel="nofollow" >Topic: error in xsl file can somebody help?\

 
Author Thread
conny
Neurotic (0) Inmate
Newly admitted

From:
Insane since: Mar 2005

IP logged posted posted 03-05-2005 06:08 Edit Quote

been doing on a ASP, XMl ,XSL project in my studies.. I got little knowledge on XSL so all my things are all read from book but i have encounter this error when i try to run this xsl file.

this is the error

The character '<' cannot be used in an attribute value. Error processing resource 'http://localhost/imported.xsl'. Line 7,...

<html>
--^

this is my xsl file.


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

<xsl:output method="html"/>

<xsl:template match="/'>
<html>
<body>
<xsl:for-each select="//quiz|//concept|//topic|//level|//question">
<p>
<xsl:apply-templates select="."/>
</p>
</xsl:for-each>
</body>
<html>
</xsl:template>

<xsl:template match="topic">
<xsl:text>True or False: </xsl:text><xsl:value-of select=".">
</xsl:template>

<xsl:template match="level">
<b><xsl:value-of select="name()"/>:</b>
<br/>
<xsl:value-of select="."/>:</b>
</xsl:template>

<xsl:template match="question">
<b><xsl:value-of select="name()"/>:</b>
<br/>
<xsl:value-of select="."/>:</b>
</xsl:template>
</xsl:stylesheet>

Conny (confused)

(Edited by bitdamaged on 03-05-2005 07:12)

bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

IP logged posted posted 03-05-2005 07:13 Edit Quote

(... just turned off smiley)

You're not closing the html tag

<html>
<body>
<xsl:for-each select="//quiz|//concept|//topic|//level|//question">
<p>
<xsl:apply-templates select="."/>
</p>
</xsl:for-each>
</body>
<html>



.:[ Never resist a perfect moment ]:.

bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

IP logged posted posted 03-05-2005 07:15 Edit Quote

oh and you're mismatching the quotes

<xsl:template match="/'>



.:[ Never resist a perfect moment ]:.

conny
Obsessive-Compulsive (I) Inmate

From:
Insane since: Mar 2005

IP logged posted posted 03-05-2005 07:56 Edit Quote

huh? what do you mean by mismatching?? sorry i really bad in this.

bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

IP logged posted posted 03-05-2005 08:00 Edit Quote

you've got one single and one double quote.



.:[ Never resist a perfect moment ]:.

conny
Obsessive-Compulsive (I) Inmate

From:
Insane since: Mar 2005

IP logged posted posted 03-05-2005 08:10 Edit Quote

OH!! haha THANKS!



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu