[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: create xml from incoming xml and load it into a v

Subject: RE: create xml from incoming xml and load it into a variable
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Tue, 29 Jul 2008 11:52:13 +0100
RE:  create xml from incoming xml and load it into a  v
Unfortunately the output of xsl:message is implementation-defined. Your XSLT
processor appears to be flattening it to a string, which I don't think is a
particularly good idea, but it's allowed by the spec. (Some processors
discard xsl:message output completely, which is also permitted.)

You can also view the variable by copying it temporarily to the result tree:

<debug variable="var">
  <xsl:copy-of select="$var"/>
</debug>

Michael Kay
http://www.saxonica.com/ 

> -----Original Message-----
> From: sudheshna iyer [mailto:sudheshnaiyer@xxxxxxxxx] 
> Sent: 29 July 2008 11:30
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: Re:  create xml from incoming xml and load it 
> into a variable
> 
> Thank you for the reply.
> 
> If I use 		
> 	<xsl:message>
> 		var: <xsl:copy-of select="$var"/>
> 	</xsl:message>	
> It only prints the following for the below mentioned xml:
> 
> 112005-08-26aaaaaaaaaa11111222005-08-26bbbbb112005-08-26ccccc1
> 12005-08-26dddddddddd11111
> 
> For the xml:
> <?xml version="1.0" encoding="UTF-8"?>
> <root>    
>     <subroot id="11111">
>         <ccc>11</ccc>
>         <ddd>2005-08-26</ddd>
>         <eee>aaaaa</eee>
>          <eee>aaaaa11111</eee>
>     </subroot>
>     <subroot id="11111">
>         <ccc>22</ccc>
>         <ddd>2005-08-26</ddd>
>         <eee>bbbbb</eee>
>     </subroot>
>     <subroot id="11111">
>         <ccc>11</ccc>
>         <ddd>2005-08-26</ddd>
>         <eee>ccccc</eee>
>     </subroot>
>     <subroot id="11111">
>         <ccc>11</ccc>
>         <ddd>2005-08-26</ddd>
>         <eee>ddddd</eee>
>         <eee>ddddd11111</eee>        
>     </subroot>    
> </root> 
> 
> I want to see the complete xml, just like the input xml along 
> with element names.
> 
> For eg:
> <root>
> 	<ccc>11</ccc>
> 	<ddd>2005-08-26</ddd>
> 	<eee>aaaaa</eee>
> 	<eee>aaaaa11111</eee>
>          ...
>          
> with the hiearchy preserved. I am debugging larger xsl file 
> and I don't know whether result-tree in the memory is 
> constructed right or not.
> 
> Thank you.
> 
> 
> --- On Tue, 7/29/08, Florent Georges <lists@xxxxxxxxxxxx> wrote:
> 
> > From: Florent Georges <lists@xxxxxxxxxxxx>
> > Subject: Re:  create xml from incoming xml and load it into a 
> > variable
> > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> > Date: Tuesday, July 29, 2008, 5:57 AM
> > sudheshna iyer wrote:
> > 
> >   Hi
> > 
> > > In the below xsl, how do I see the entire xml that is
> > in
> > > variable "var"?
> > 
> >   What do you mean exactly?  If you want to "see"
> > it in the result
> > tree, use xsl:sequence or xsl:copy-of:
> > 
> >     <bla-bla>
> >        <xsl:copy-of select="$var"/>
> >     </bla-bla>
> > 
> >   If you want to "see" it on the console (or whatever your 
> environment 
> > directs messages to), for debugging purpose, you can use
> > xsl:messages:
> > 
> >     <xsl:message select="$var"/>
> >     <!-- or... -->
> >     <xsl:message>
> >        VAR: <xsl:copy-of select="$var"/>
> >     </xsl:message>
> > 
> >   Regards,
> > 
> > --drkm
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> >      
> > 
> ______________________________________________________________________
> > _______
> > 
> > Envoyez avec Yahoo! Mail. Une boite mail plus intelligente 
> > http://mail.yahoo.fr

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2011 All Rights Reserved.