I have content with escaped characters and I want to covert it back to back to xml. The document looks like this: <document xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string" content-type="text/plain"><shaker type="pfarr"> ...... it may not be clear that the content is xml. The execute processor is creating the document and I don't see a way to tell it to leave it as xml and not run it through the XML converter (trying <?xml ...?> instruction now). If all of you are also ready to call it week, then have a nice weekend! --Hank Hank Ratzesberger NEES Programmer Institute for Crustal Studies University of California, Santa Barbara 805.893.8042 805.893.8649 (fax) -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
Hi Hank,
One way to do this is to use the saxon:parse() function from XSLT: http://www.saxonica.com/documentation/extensions/functions/parse.html Alex On 5/26/06, Hank Ratzesberger <[hidden email]> wrote: > > I have content with escaped characters and I want to > covert it back to back to xml. The document looks like > this: > > <document xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xmlns:xs="http://www.w3.org/2001/XMLSchema" > xsi:type="xs:string" > content-type="text/plain"><shaker type="pfarr"> ...... > > it may not be clear that the content is xml. The execute processor > is creating the document and I don't see a way to tell > it to leave it as xml and not run it through the > XML converter (trying <?xml ...?> instruction now). > > If all of you are also ready to call it week, then > have a nice weekend! > > --Hank > > Hank Ratzesberger > NEES Programmer > Institute for Crustal Studies > University of California, Santa Barbara > 805.893.8042 > 805.893.8649 (fax) > > > > > > -- > You receive this message as a subscriber of the [hidden email] mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws > > > -- Blog (XML, Web apps, Open Source): http://www.orbeon.com/blog/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Alessandro, Thank you, that would seem to be it, but instead I get the content, not the XML. If you put the following in the XSLT sandbox, you will see what I mean., but what I want is <shaker type="pfarr> <APChost type="pfstring">192.168.2.14</APChost> .... I'm sure this is simply an XML issue, but I don't know what to try next. Regards, Hank Input: <document xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string" content-type="text/plain"><shaker type="pfarr"> <APChost type="pfstring">192.168.2.13</APChost> <APClogfile type="pfstring">APClog.txt</APClogfile> <APCport type="pfstring">23</APCport> <FGhost type="pfstring">192.168.2.14</FGhost> <FGport type="pfstring">5025</FGport> <Sin_Info type="pftbl"> <pftbl_entry type="pfstring">12.0 2</pftbl_entry> </Sin_Info> <Sweep_Info type="pftbl"> <pftbl_entry type="pfstring">12.0 7.0 60</pftbl_entry> <pftbl_entry type="pfstring">11.0 8.0 45</pftbl_entry> </Sweep_Info> <pf_revision_time type="pfstring">1136417164</pf_revision_time> </shaker></document> XSLT: <xsl:stylesheet version="2.0" xmlns:saxon="http://saxon.sf.net/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <newroot> <xsl:value-of select="saxon:parse(/.)"/> </newroot> </xsl:template> </xsl:stylesheet> ----- Original Message ----- From: "Alessandro Vernet" <[hidden email]> To: <[hidden email]> Sent: Monday, May 29, 2006 12:26 AM Subject: Re: [ops-users] How to un - to-XML Hi Hank, One way to do this is to use the saxon:parse() function from XSLT: http://www.saxonica.com/documentation/extensions/functions/parse.html Alex On 5/26/06, Hank Ratzesberger <[hidden email]> wrote: > > I have content with escaped characters and I want to > covert it back to back to xml. The document looks like > this: > > <document xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xmlns:xs="http://www.w3.org/2001/XMLSchema" > xsi:type="xs:string" > content-type="text/plain"><shaker type="pfarr"> ...... > > it may not be clear that the content is xml. The execute processor > is creating the document and I don't see a way to tell > it to leave it as xml and not run it through the > XML converter (trying <?xml ...?> instruction now). > > If all of you are also ready to call it week, then > have a nice weekend! > > --Hank > > Hank Ratzesberger > NEES Programmer > Institute for Crustal Studies > University of California, Santa Barbara > 805.893.8042 > 805.893.8649 (fax) > -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
OK to get the content as xml:
<xsl:copy-of select="saxon:parse(string(/.))"/> Failed another XSLT quiz! Thanks, Hank ----- Original Message ----- From: "Hank Ratzesberger" <[hidden email]> To: <[hidden email]> Sent: Tuesday, May 30, 2006 10:49 AM Subject: Re: [ops-users] How to un - to-XML > > Alessandro, > > Thank you, that would seem to be it, but instead > I get the content, not the XML. If you put the > following in the XSLT sandbox, you will see what > I mean., but what I want is > > <shaker type="pfarr> > <APChost type="pfstring">192.168.2.14</APChost> > .... > > I'm sure this is simply an XML issue, but I don't > know what to try next. > > Regards, > Hank > > > Input: > > <document xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xmlns:xs="http://www.w3.org/2001/XMLSchema" > xsi:type="xs:string" > content-type="text/plain"><shaker type="pfarr"> > <APChost type="pfstring">192.168.2.13</APChost> > <APClogfile type="pfstring">APClog.txt</APClogfile> > <APCport type="pfstring">23</APCport> > > <FGhost type="pfstring">192.168.2.14</FGhost> > <FGport type="pfstring">5025</FGport> > <Sin_Info type="pftbl"> > <pftbl_entry type="pfstring">12.0 2</pftbl_entry> > </Sin_Info> > <Sweep_Info type="pftbl"> > > <pftbl_entry type="pfstring">12.0 7.0 60</pftbl_entry> > <pftbl_entry type="pfstring">11.0 8.0 45</pftbl_entry> > </Sweep_Info> > <pf_revision_time type="pfstring">1136417164</pf_revision_time> > </shaker></document> > > > XSLT: > > <xsl:stylesheet version="2.0" xmlns:saxon="http://saxon.sf.net/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> > <xsl:template match="/"> > <newroot> > <xsl:value-of select="saxon:parse(/.)"/> > </newroot> > </xsl:template> > </xsl:stylesheet> > > > > ----- Original Message ----- > From: "Alessandro Vernet" <[hidden email]> > To: <[hidden email]> > Sent: Monday, May 29, 2006 12:26 AM > Subject: Re: [ops-users] How to un - to-XML > > > Hi Hank, > > One way to do this is to use the saxon:parse() function from XSLT: > > http://www.saxonica.com/documentation/extensions/functions/parse.html > > Alex > > On 5/26/06, Hank Ratzesberger <[hidden email]> wrote: >> >> I have content with escaped characters and I want to >> covert it back to back to xml. The document looks like >> this: >> >> <document xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >> xmlns:xs="http://www.w3.org/2001/XMLSchema" >> xsi:type="xs:string" >> content-type="text/plain"><shaker type="pfarr"> ...... >> >> it may not be clear that the content is xml. The execute processor >> is creating the document and I don't see a way to tell >> it to leave it as xml and not run it through the >> XML converter (trying <?xml ...?> instruction now). >> >> If all of you are also ready to call it week, then >> have a nice weekend! >> >> --Hank >> >> Hank Ratzesberger >> NEES Programmer >> Institute for Crustal Studies >> University of California, Santa Barbara >> 805.893.8042 >> 805.893.8649 (fax) >> > > > -------------------------------------------------------------------------------- > > -- > You receive this message as a subscriber of the [hidden email] mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws > -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Free forum by Nabble | Edit this page |