xsl-list
[Top] [All Lists]

Re: problem in xsl:value-of

2006-02-21 02:12:48
Jeff Sese wrote:

Hi, I'm running this template:

<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
<xsl:output method="xhtml" doctype-public="-//W3C//DTD XHTML 1.0
Transitional//EN"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";
encoding="UTF-8" indent="yes"/>
<xsl:template match="/">
<html>
<head>
<title>CTIA No.: <xsl:value-of select="/book/@doi"/></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<link rel="stylesheet" type="text/css" href="TIARA.css"/>
</head>
<body>
<p><b>CTIA No.:</b> <xsl:value-of
select="substring-before(/book/@doi,'/')"/></p>
<p><b>Title:</b> <xsl:value-of
select="/book/frontMatter/miscMatterGroup/miscMatter/titleGroup/title"/></p>
<hr/>
</body>
</html>
</xsl:template>
</xsl:stylesheet>

On this xml file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book SYSTEM "..\..\OXChapML\OxChapML_edited.dtd">
<book id="bktitle-0123456789" OSOsubject="tiara"
doi="8319.018/0123456789.001.0001">
<bookMeta>
<ONIXMeta>
<ONIXMessage>
<FromEANNumber>1</FromEANNumber>
<FromPerson>1</FromPerson>
<SentDate>1</SentDate>
<Product>
<RecordReference>1</RecordReference>
<NotificationType>1</NotificationType>
</Product>
</ONIXMessage>
</ONIXMeta>
</bookMeta>
<frontMatter>
<miscMatterGroup id="bktitle-0123456789-miscMatterGroup-1">
<miscMatter class="halftitle" id="bktitle-0123456789-miscMatter-1">
<titleGroup><title><p><sc>Executive</sc> E</p></title></titleGroup>
<textMatter/>
</miscMatter>
</miscMatterGroup>
</frontMatter>
</book>

But I can't get these values:

<xsl:value-of select="/book/@doi"/>
<xsl:value-of
select="/book/frontMatter/miscMatterGroup/miscMatter/titleGroup/title"/>

What am I doing wrong here? I'm running it through saxon.

Thanks,
Jeff



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



I tried it under Apache Cocoon. After removing this:

<!DOCTYPE book SYSTEM "..\..\OXChapML\OxChapML_edited.dtd">

...it worked fine, i.e. returned this:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 
Transitional//EN""http://www.w3.org/TR/html4/loose.dtd";>

<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>CTIA No.: 8319.018/0123456789.001.0001</title>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<link href="TIARA.css" type="text/css" rel="stylesheet">
</head>
<body>
<p>
<b>CTIA No.:</b>8319.018</p>
<p>
<b>Title:</b>Executive E</p>
<hr>
</body>
</html>

Something to do with validation perhaps?

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>