Subject: Re: [xsl] Counting nodes - now specifying body in stylesheet From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Tue, 02 Jul 2002 11:49:44 -0400 |
Regarding the namespace I am using, one of the reasons I have not moved to the newer namespace is that I cannot seem to make an output stylesheet look very nice using the http://www.w3.org/1999/XSL/Transform namespace.
Perhaps, someone could give me suggestions with this problem:
The biggest issue I have is when I try to define the body of the stylesheet. In the example below, I have a couple simple xsl commands, and I've defined a body with a background color.
Normally, I would get a list of all the "metadata/idinfo/citation/citeinfo/onlink" elements, followed by the "metadata/idinfo/citation/citeinfo/origin" element. However, once I have entered the "<body>" tag, every xsl command following the for-each command end up blank - the "metadata/idinfo/citation/citeinfo/origin" will not appear in the result, and I get no processing errors. If the "<body>" tag and it's closing tag "</body>" are removed from the code below, then everything works fine, but I'm stuck with unformatted results.
I've tried looking at formatting objects in XSL, but haven't been able to get anything to work yet.
<?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:template match="/"> <HTML> <body bgcolor="#cccccc">
<xsl:for-each select="metadata/idinfo/citation/citeinfo/onlink">
<?xml version="1.0"?> <metadata> <idinfo> <citation> <citeinfo> <onlink>Here's the value you want</onlink> </citeinfo> </citation> </idinfo> </metadata>
<xsl:value-of select="." /> <xsl:if test="current()[(position() != last())]">
<br/> </xsl:if> </xsl:for-each>
<xsl:value-of select="metadata/idinfo/citation/citeinfo/origin"/>
</body> </HTML> </xsl:template> </xsl:stylesheet>
Cheers, Wendell
====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Counting nodes - now spec, Mike Leahy | Thread | Re: [xsl] Counting nodes - now spec, Mike Leahy |
Re: [xsl] Lifting xml values to use, Wendell Piez | Date | [xsl] encoding issues, Andrew Welch |
Month |