|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Counting nodes - now specifying body in stylesheet
Mike,
Definitely switch to XSLT. The sooner you switch, the more grief you'll save yourself. At 11:12 AM 7/2/2002, you wrote: 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. Honestly, this is baffling. Please test very carefully (using the same XPath expressions in your for-each select) to confirm that it's the presence or absence of the <body> node that makes the difference. There's no way in XSLT it should; it does not change the context for the evaluation of any expressions. Which processor are you using? I've tried looking at formatting objects in XSL, but haven't been able to get anything to work yet. If you're targetting web display, write XSLT that creates HTML (for now). At present FOs are still being used mainly to generate print output (e.g. in PDF). <?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"> If you're not getting your values reported, it's probably because this XPath returns no nodes. Does your source look more or less like <?xml version="1.0"?>
<metadata>
<idinfo>
<citation>
<citeinfo>
<onlink>Here's the value you want</onlink>
</citeinfo>
</citation>
</idinfo>
</metadata><metadata> being your document ("root") element? If not, your XPath won't work. (If you post a snippet of your source, it's easy enough to see what XPath you need.) This should be (position() != last()) The test as given is never true (since the position of a node is always last when it's the only node selected).
From the design of this stylesheet, it also looks like you might want to do a bit of homework on templates. You don't really need them for this simple application, but you will. 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 ====================================================================== XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








