xsl-list
[Top] [All Lists]

Re: Advice for splitting text

2003-10-28 09:18:11

"Karl J. Stubsjoen" <karl(_at_)azprogolf(_dot_)com> wrote in message
news:001f01c39d65$1b3fce50$1fd96844(_at_)kstubsjoen(_dot_)(_dot_)(_dot_)
[Dmitre Said]
Then the two text nodes already exist and do not need to be "split". When
formatting:breakArticle is the current node they will be selected like
this:
     ../text()[1]
and
   ../text(2)
Of course, in the xml document there must be a namespace declaration
binding
the "formatting" prefix. A prefix, bound to the same namespace-uri will
be
convenient to use in the xslt code.


I'm not sure if this makes a difference, but my special
<formatting:breaknews> element is found within attribute value.

It makes tremendous difference -- the XPath 1.0 and 2.0 data model do not
allow attributes to have children. Therefore, an element cannot be "found
within attribute value".

So I'm
having difficulties using the text() function.

These difficulties are a natural consequence from the fact that an element
cannot be "found within attribute value".

Simply return to the structure of the xml document you provided in your
first message in this thread.



=====
Cheers,

Dimitre Novatchev.
http://fxsl.sourceforge.net/ -- the home of FXSL




 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



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