>Can I use document() function to transform a XML document emebedded within
CDATA section of an
> XML document ?

Simple answer: No, and don't do that. There's no concept in XML or XML
tools of "a document embedded within a CDATA section", and in fact that's
generally a Bad Practice -- you should just make the contained data a
subtree of the document that contains it, using namespaces if necessary to
help distinguish the two different applications.

Longer answer: To do what you're asking for, you would have to extract the
text from the CDATA section and re-parse it as real XML rather than as
text-with-xml-syntax. If you really insist on doing this, you could write
an extension function for Xalan which would perform that reparsing for you.
But this is going to require writing and maintaining some custom code, and
will be a nonportable solution. I really recommend the restructuring
approach instead.

______________________________________
"... Three things see no end: A loop with exit code done wrong,
A semaphore untested, And the change that comes along. ..."
  -- "Threes" Rev 1.1 - Duane Elms / Leslie Fish
(http://www.ovff.org/pegasus/songs/threes-rev-11.html)

Reply via email to