Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within XML
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
XML and Related Technologies
help with XPTY0019 error
Andrew Cane
Ranch Hand
Posts: 91
posted 10 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
this is param.xml
<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"> <xsl:output method="xml" encoding="UTF-8" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"/> <xsl:param name="identifier" select="reference/@xml:id"/> <xsl:param name="resourcelist" select="document(concat('reslist_',reference/@scheme,'.xml'))"/> <xsl:param name="meta" select="$resourcelist//entry[@xml:id eq $identifier]"/> <xsl:param name="title" select="$meta/title"/> <xsl:param name="style">reference.css</xsl:param> <xsl:template match="/"> <html> <xsl:call-template name="head"> <xsl:with-param name="title" select="$title"/> <xsl:with-param name="style" select="$style"/> </xsl:call-template> <body> <h1> <xsl:value-of select="$title"/> </h1> <xsl:apply-templates select="reference/body"/> </body> </html> </xsl:template> <xsl:template name="head"> <xsl:param name="title">title</xsl:param> <xsl:param name="style">css</xsl:param> <head> <meta http-equiv="Content-Type" content="text/xml;charset=UTF-8"/> <title> <xsl:value-of select="$title"/> </title> <link rel="stylesheet" type="text/css"> <xsl:attribute name="href"> <xsl:value-of select="$style"/> </xsl:attribute> </link> </head> </xsl:template> <xsl:template match="purpose"> <h2>Purpose</h2> <xsl:apply-templates select="p"/> </xsl:template> <xsl:template match="usage"> <h2>Usage</h2> <xsl:apply-templates select="p"/> </xsl:template> <xsl:template match="contains | containedby"> <h2> <xsl:choose> <xsl:when test="@label='contains'">Contains</xsl:when> <xsl:otherwise>Contained by</xsl:otherwise> </xsl:choose> </h2> <p> <xsl:for-each select="link"> <xsl:apply-templates select="."/> <xsl:text> </xsl:text> </xsl:for-each> </p> </xsl:template> <xsl:template match="p"> <p> <xsl:apply-templates/> </p> </xsl:template> <xsl:template match="attr | element"> <code> <xsl:value-of select="."/> </code> </xsl:template> <xsl:template match="code"> <xsl:copy-of select="."/> </xsl:template> <xsl:template match="link"> <xsl:variable name="linkID" select="@href"/> <xsl:variable name="linkmeta" select="$resourcelist//entry[@xml:id=$linkID]"/> <a> <xsl:attribute name="href"> <xsl:value-of select="concat($linkmeta/content/@src,$linkID,'.html')"/> </xsl:attribute> <xsl:value-of select="$linkmeta/title"/> </a> </xsl:template> </xsl:stylesheet>
and this is the source
<?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="param.xsl"?> <reference xml:id="xsl_choose" scheme="xsl"> <body> <title>xsl:choose</title> <purpose> <p>An instruction that specifies a choice between alternatives, which are defined by multiple <element>xsl:when</element> instructions, and an optional, terminal, <element>xsl:otherwise</element> element. </p> </purpose> <usage> <p>Each <element>xsl:when</element> instruction has a <attr>test</attr> attribute containing an expression to evaluate.</p> <p>A single <element>xsl:when</element> has the same result as though you had used <element>xsl:if</element> for a single test.</p> </usage> <contains label="contains"> <link href="xsl_when"/> <link href="xsl_otherwise"/> </contains> <containedby label="substitution"> <link href="xsl_instruction"/> </containedby> </body> </reference>
I got error XPTY0019 when running this in mozilla. what's wrong?
thank you very much.
With a little knowledge, a
cast iron skillet
is non-stick and lasts a lifetime.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Replicate XML Node using XSL
XSL fails with xmlns
[XSL-FO][docbook]Problem print line in table of contents
XSLT value-of parameter not works as xml value
displaying image in any browser using xsl
More...