Subject: RE: [xsl] Omit Data While Using Copy From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Wed, 11 Aug 2004 17:25:40 -0400 |
To get to the heart of your problem, when you don't specify a template to use in processing a node, the default template is applied. That built-in template copies the text value of an un-matched node to the output.
In this case, the text value of <titel>. By adding a "no-op" template that matches <titel>, the output will be suppressed:
<xsl:template match="titel" />
The next thing I noticed was that your template matches "kapitel/hanvisning". The <hanvisning> element has no child elements.
I am a little puzzled as to why the <titel> element is being processed. It is not a child of <hanvisning>. I had always thought that the default template was applied when <xsl:apply-templates /> is used, but it seems that is incorrect. Perhaps one of those better acquainted with the XSL spec can explain it to us.
Cheers, Wendell
<?xml version="1.0"?> <?xml:stylesheet type='text/xsl' href='manual.xsl'?> <kapitel> <titel>Measures every 10 percussion hours</titel> <text/> <hanvisning from="ID(SEUHS-SLAGVT-10-MATARE13)">Feeder</hanvisning> <text/> <hanvisning from="ID(SEUHS-SLAGVT-10-BOM19)">Boom</hanvisning> <text/> </kapitel>
====================================================================== 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] Omit Data While Using Cop, cknell | Thread | Re: [xsl] Omit Data While Using Cop, Trevor Majic |
[xsl] Uri resolver in Saxon 8, Marcus Andersson | Date | Re: [xsl] Transforming XML to XML, Rick Taylor |
Month |