[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: lists

Subject: RE: lists
From: DPawson@xxxxxxxxxxx
Date: Thu, 25 Jan 2001 15:24:54 -0000
RE:  lists
> > 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>


  <variablelist>
  <varlistentry><term><literal>#text</literal></term>
  <listitem><para>Matches contiguous strings of character
data</para></listitem>
</varlistentry>

  <varlistentry><term><literal>#pi</literal></term>
  <listitem><para>Matches processing instructions</para></listitem>
</varlistentry>

  <varlistentry><term><literal>#comment</literal></term>
  <listitem><para>Matches comments</para></listitem>
</varlistentry>

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

  <varlistentry><term><literal>#all</literal></term>
  <listitem><para>Matches any node</para></listitem>
</varlistentry>
</variablelist>


<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>
</varlistentry>

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:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread
  • lists
    • DPawson - Thu, 25 Jan 2001 08:23:00 -0500 (EST)
      • <Possible follow-ups>
      • DPawson - Thu, 25 Jan 2001 11:36:30 -0500 (EST) <=

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.