[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: XML/XML Transformation - Please Help !!!.....
- From: "G. Ken Holman" <gkholman@CraneSoftwrights.com>
- To: "XML-DEV (E-mail)" <xml-dev@lists.xml.org>
- Date: Mon, 30 Apr 2001 20:38:44 +0800
At 01/04/30 12:35 +0100, Rob Lugt wrote:
>You introduce a very useful and powerful technique for adding structure
>where it doesn't exist. Thanks for sharing this with us.
It is a common need to infer structure where there is none. Pages 256-258
of the Ninth Edition of my book describes inferring a nesting of list items
from a flat collection of list items.
>Just one minor point though, you stop the "urldesc" mode on reaching a URL
>element. However, the URL element is in the output document, not the input.
>You should be stopping the "urldesc" chaining on the URLADR element.
WHOOOPS!
>so
><xsl:template match="URL" mode="urldesc"/> <!--stop at next URL-->
>should be
><xsl:template match="URLADR" mode="urldesc"/> <!--stop at next URL-->
You are, of course, right Rob, thank you for pointing that out. Re-running
my old stylesheet I can now see the error message that I overlooked before
because I was focusing on the markup:
T:\ftemp>saxon thushara.xml thushara.xsl
Unexpected: 'URLADR'
<?xml version="1.0" encoding="utf-8"?>
<URLLIST>
<URL>
<URLADR>http:\\www.aaa.com</URLADR>
<URLDESC xml:lang="en">Homepage of aaa AS</URLDESC>
<URLDESC xml:lang="no">Homepage of aaa AS NO</URLDESC>
<URLDESC xml:lang="se">Homepage of aaa AS SE</URLDESC>
</URL>
<URL>
<URLADR>http:\\www.aaabbb.org</URLADR>
<URLDESC xml:lang="en">Demo of aaabbb.com</URLDESC>
<URLDESC xml:lang="no">Demo of aaabbb.com NO</URLDESC>
</URL>
</URLLIST>
T:\ftemp>
Perhaps I should make my error messages stand out more!
Thanks again for the clarification.
.................... Ken
--
G. Ken Holman mailto:gkholman@CraneSoftwrights.com
Crane Softwrights Ltd. http://www.CraneSoftwrights.com/m/
Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (Fax:-0995)
Web site: XSL/XML/DSSSL/SGML/OmniMark services, training, products.
Book: Practical Transformation Using XSLT and XPath ISBN 1-894049-06-3
Article: What is XSLT? http://www.xml.com/pub/2000/08/holman/index.html
Next public instructor-led training: 2001-05-01,05-14,05-15,05-16,
- 05-17,05-21,05-22,06-18,06-21,07-20,07-21,09-19
Training Blitz: 3-days XSLT/XPath, 2-days XSLFO in Ottawa 2001-06-18/22