Re: XSLT Question
- View SourceThanks a lot Ken, I know it is difficult to handle this in XSLT. I
decided to extract the value out in the Java code and append it as a
separate node to the end of the original XML and process it as a
separate node. It is really dumb, but I have no other better way to
handle it. Or I have to hack it like you suggested.
--- In XSL-FO@yahoogroups.com, "G. Ken Holman" <gkholman@c...> wrote:
> At 2005-01-27 01:04 +0000, g_li wrote:
> >Sorry if this is a little off topic since it is actually a XSLT
> XSLT and XPath questions would be better posted to the following list:
> There are a number of subscribers who would enthusiastically respond to
> such questions.
> There is also an *excellent* FAQ at:
> >Here I have an element (A) which has another XML element as
> >its value.
> Actually, you don't ... you have an element named A comprised of a
> text node that has lots of angle brackets in it. There is no
> C in your XML example.
> Some of my students come to my class with this misconception as
well; it is
> a common problem.
> >How do I get the Value of C out?
> With great difficulty ... well, at least with more difficulty than
> actually did have an element named "C".
> ><A ID="External">
> ><![CDATA[<B ID="Internal"><C>Something</C></B>]]>
> >Your answer would be greatly appreciated. Thanks.
> In this special case, given your current node is the element A, you
> use something like:
> ... but that is only because you know the syntax of your start tag
> and you know there are no embedded "C" elements.
> You are asking for the manipulation of text inside of XSLT ...
> that XSLT 1.0 doesn't do very well.
> I hope this helps.
> ............................. Ken
> World-wide on-site corporate, govt. & user group XML/XSL training.
> G. Ken Holman mailto:gkholman@C...
> Crane Softwrights Ltd. http://www.CraneSoftwrights.com/f/
> Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995)
> Male Breast Cancer Awareness http://www.CraneSoftwrights.com/f/bc
> Legal business disclaimers: http://www.CraneSoftwrights.com/legal