XSL Transformation

RG

Usenet Archive
Joined
Jun 28, 2000
Messages
136
Reaction score
0
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
 

Joe Kesselman

Usenet Archive
Joined
Feb 3, 2006
Messages
1,229
Reaction score
0
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."
 

RG

Usenet Archive
Joined
Jun 28, 2000
Messages
136
Reaction score
0
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
 

Joseph Kesselman

Usenet Archive
Joined
Feb 3, 2006
Messages
733
Reaction score
0
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
548,049
Messages
3,104,245
Members
248,133
Latest member
DujonT

Latest Threads

Top