XSL Transformation

R

RG

My xml document contains an entity with one string atribute. This string
attribute in turn contains an xml document. How can I then include the
contents of this attribute for xpath reference?

Thanks in advance
 
J

Joe Kesselman

RG said:
My xml document contains an entity with one string atribute. This
string attribute in turn contains an xml document. How can I then
include the contents of this attribute for xpath reference?

Not easily. XPath and XSLT (and XML itself) have no concept of XML
contained within the text fields of XML. If your processor supports it,
you might be able to pass the attribute's contents out to an extension
function which re-parses it.

A better answer would be "Stop doing that. If you want XML content, make
it an XML subtree rather than text."
 
R

RG

Thanks for your help.

The problem is that it is fed as text field. It is retrieved from db.

Can you create a subtree from a text field?

Thanks again
 
J

Joseph Kesselman

RG said:
Can you create a subtree from a text field?

Not reasonably in pure XSL (not unless you want to try to write an XML
parser in XSLT string processing, a task I REALLY don't recommend).

As I and others have said, you may be able to find -- or you can to
write and plug in -- an extension function to do this.

Or you can fix the code where the document is being generated. Which
really is going to be a better answer in the long run.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,526
Members
44,997
Latest member
mileyka

Latest Threads

Top