[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message]

Adding xml header to xquery result

Michael Rys mrys at microsoft.com
Fri May 13 13:50:48 PDT 2005


xml header
The declaration is not part of the datamodel but is simply a
serialization option.

You need to check if you can serialize the document this way.

Note that there is no semantic difference between either having or not
having the declaration given UTF-8 encoded data and XML 1.0.

Best regards
Michael 

> -----Original Message-----
> From: http://xquery.com/mailman/listinfo/talk 
> [mailto:http://xquery.com/mailman/listinfo/talk] On Behalf Of McAuley, Grant (LLU)
> Sent: Friday, May 13, 2005 12:29 PM
> To: http://xquery.com/mailman/listinfo/talk
> Subject:  Adding xml header to xquery result
> 
> I want to create an xml document as a result of an xquery and 
> I need to add '<?xml version="1.0"?>' at the top of the file. 
>  The few Xquery engines I have tried complain if I add this 
> to the xquery file.
> 
> I.e.:
> 	<?xml version="1.0'?>
> 	{
> 	for $x in doc('test.xml')//test
> 	where $x/@status = 'approved'
> 	order by $x/@f-id
> 	return
> 	<request>
> 		<name>{ concat($x/first,' ',$x/last) }</name>
> 	</request>
> 	}
> 
> doesn't work b/c of the header.
> 
> 
> I want to see this output:
> 
> 	<?xml version="1.0'?>
> 	<request>
> 		<name>Joe Smith</name>
> 	</request>
> 
> Is there a standard way to do this?
> 
> _______________________________________________
> http://xquery.com/mailman/listinfo/talk
> http://xquery.com/mailman/listinfo/talk
> 



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.