RE: [xsl] lists

Subject: RE: [xsl] lists
From: DPawson@xxxxxxxxxxx
Date: Thu, 25 Jan 2001 15:24:54 -0000
> > I can't think of an XSLT way of doing this.
> There's probably an XSLT way, once you specify the transform that
> you wish to use.
> For example I think that the following meets the requirements 
> as stated.
> <xsl:template match="list"/>
> ie the suggested input would be transformed to something that 
> validated
> against  the suggested DTD.

OK. I would like not to lose content, nor change source document
sequence, I.e. not lose content sequence.
My source actually reads.

<varlistentry><term>Node type</term>
<listitem><para>Node type specifies what kind of nodes to match. If the
value is a name or the argument is omitted, the type is assumed to
be an element. For all other types, you need to use a keyword:</para>

  <listitem><para>Matches contiguous strings of character

  <listitem><para>Matches processing instructions</para></listitem>

  <listitem><para>Matches comments</para></listitem>

  <varlistentry><term><literal>#element</literal> or
  <listitem><para>Matches any element, regardless of name</para></listitem>

  <listitem><para>Matches any node</para></listitem>

<para>For example, <literal>descendant(1,#all)</literal> matches
any node, whether it is an element, positive integer, comment, or text
string. The term <literal>descendant(1,*)</literal> matches any element, and
<literal>descendant(1,buttercup)</literal> matches any element of
type <sgmltag class="element">buttercup</sgmltag>.</para></listitem>

I.e. the variablelist's are nested, with content inside varlistentry
prior to the start of the new variablelist.

The dirty solution is to close of the listitem in the output,
with </listitem> after the initial content,
insert the new <list></list>
then continue with the <listitem> in the output.

thats a 'dirty' (non xslt approach). 

Regards DaveP

 XSL-List info and archive:

Current Thread
  • [xsl] lists
    • DPawson - Thu, 25 Jan 2001 13:17:00 -0000
      • <Possible follow-ups>
      • DPawson - Thu, 25 Jan 2001 15:24:54 -0000 <=