xsl-list
[Top] [All Lists]

Re: [xsl] When to use text()

2014-03-23 03:34:20
Hi George,

If

   test="text()" is true for any text node

is the same as

  "If used as a node test, text() is true for any text node."

than test="text()" may be easier to understand quickly for a newbie,
but what you wrote is fine and thanks a lot for doing that!


I wonder also if it's more complete to say

   test="text()" is true for any non empty text node

or is there no text node in for example <cat></cat>?

Cheers!!
Alex

On Sun, Mar 23, 2014 at 7:29 AM, George Cristian Bina
<george(_at_)oxygenxml(_dot_)com> wrote:
Hi Alex,

Thanks for pointing this. We will update the description for text() in
oXygen. I am thinking to use this:

"Selects all text node children of the context node. If used as a node test,
text() is true for any text node."

Best Regards,
George
--
George Cristian Bina
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com


On 3/22/14, 12:17 PM, Alex Muir wrote:

On Fri, Mar 21, 2014 at 11:37 AM, Michael Kay <mike(_at_)saxonica(_dot_)com> 
wrote:



So this leaves the question: when actually use text()?



It might not help people that the context sensitive help description
of the text() function that for example one reads in oxygen is

     "text() as node(). The text node"...

It would prevent misunderstanding if it read something like..

"text() as node(). The sequence of text nodes descending from the
context element. Only use it if you need to process the text node
children and element children of a mixed-content element
individually."



Regards


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--




-- 
-

Alex Muir
http://ca.linkedin.com/pub/alex-muir/36/ab7/125

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>