[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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
|
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
|