Re: [xsl] Re: WML input problem
Subject: Re: [xsl] Re: WML input problem|
From: Joerg Heinicke <joerg.heinicke@xxxxxx>
Date: Wed, 10 Jul 2002 18:53:00 +0200
Did you test the code as it is from
http://sources.redhat.com/ml/xsl-list/2002-07/msg00464.html? Do you have
any possibility to compare the output of Sablotron with the output of
another processor, e.g. at least with MSXML in IE
or Transformiix in Mozilla (DOM Inspector)?
Especially the output of the text after the <option/> elements is really
strange. Is Sablotron so buggy?
should i used some thing else except <xsl:apply-templates> in
between<option> and </option> and
No, it should work. <xsl:apply-templates/> is the same as
<xsl:apply-templates select="node()"/> and node() consists of elements,
text nodes, comments and processing instructions. So I don't understand
why it should not work.
i have changed the key for checkbox like
<xsl:key name="checkboxes" match="input[@type='checkbox']" use="@type"/>
because i think i can not use name it can be any thing in case of
checkbox.though it is working but is it right?
Using it with my code/Muenchian Grouping it's definitely wrong. You will
group the input elements which have @type='checkbox' by their @type - so
all of them will be in one group. Because of your input
<input type="checkbox" name="musicpref_rnb"
<input type="checkbox" name="musicpref_jazz" checked="checked">Jazz</input>
<input type="checkbox" name="musicpref_blues"
<input type="checkbox" name="musicpref_newage" checked="checked"> New
I grouped them by the first part of @name (all with 'musicpref_' in one
group). If you want to group them in a different way, e.g. all in one
<p> or something similar, you have to change the @use of the key and in
the same way the second parameter of key('checkboxes', ...).
and if i have a very simple html like
and if in style sheet i write
it is not giving output as *some text *
is there any different template rule for outputting plain text.
i thought <xsl:apply-templates/> will automatically put text in output
tree and process other nodes
because in my html if some text is not enclose in between any tag and it
is just in side of <body> it is not working but if i enclosed it in any
tag for example <p> and </p> it is coming in output.
Again: <xsl:apply-templates/> tries to apply templates for all child
nodes of the current node. In your short example you only have a text
node as child of the body element, which you will see in the output,
because of a built-in template similar to the following:
For more information on built-in templates look at
I hope I could help you a bit. Try to compare Sablotron's output with
some other processor's output. You will at least have on of those both
browsers on your machine, won't you?
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list