The dom-to-string() function could do that. http://ode.apache.org/xpath-extensions.html
alex On Wed, Dec 3, 2008 at 7:30 AM, Matthieu Riou <[EMAIL PROTECTED]>wrote: > On Tue, Dec 2, 2008 at 1:03 PM, Jackson, Douglas < > [EMAIL PROTECTED]> wrote: > > > Hi! > > If I have a variable which is an xml complex type or a message containing > > an xml complex type, and I want to put the value of that variable (i.e. > the > > xml escaped) into a string variable or into a string element/attribute in > > another complex type. How would I do that? > > > > i.e. in pseudo code: > > > > var<some-element-type> v1 = > > <literal><some-element>...</some-element></literal> > > var<string> v2 = escape-xml(v1) (i.e. > > "<some-element>...</some-element>"). > > > > I guess I could write a web service that takes a request with an <any> > xml > > piece and return a string if I had to do so. > > > It's one possibility. Something simpler would probably be to implement a > small XPath extension function and plug it into Saxon (our XPath 2.0 > engine), that would look very much like your example above. > > http://www.saxonica.com/documentation/extensibility/functions.html > > Cheers, > Matthieu > > > > > > -Doug. > > > > > > >
