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

RE: XQuery -- Reinventing the Wheel?

  • From: Jonathan.Robie@S...
  • To: elenz@x..., Jonathan.Robie@S..., tpassin@h...,xml-dev@l...
  • Date: Thu, 22 Feb 2001 18:41:19 -0500

RE: XQuery -- Reinventing the Wheel?
Title: RE: XQuery -- Reinventing the Wheel?

Evan Lenz wrote:
> Jonathan Robie wrote:
>>    <$tagname>
>>        <description> $d </description> ,
>>        <price> $p </price>
>>    </$tagname>
>>
>>This is an element constructor, not an XML literal. It does
>>not need to be valid XML, even though it looks kind of like
>>an XML element.
>>
>>However, I think it might be easier for people if we *do*
>>make our element constructors virtually identical to normal
>>XML. There would have to be a way to include dynamic parts of
>>a query, which probably requires a syntax not 100% compatible
>>with XML.
>
> Well, it might not require that. Maybe you could do something like this?
>
>    <xq:element name="{$tagname}">
>       <description><xq:copy-of select="$d"/></description>
>       <price><xq:copy-of select="$p"/></price>
>    </xq:element>

Yes, that makes sense, or perhaps:

   <xq:element name="{$tagname}">
       <description> {$d} </description>
       <price> {$p} </price>
   </xq:element>


Or perhaps:

   <{$tagname}>
       <description> {$d} </description>
       <price> {$p} </price>
   </{$tagname}>

If the escape character marks anything that is not interpreted the same way as literal XML, then the last solution seems to make sense. Are there other possiblities worth looking at?

At any rate, I think that using native XML syntax for all literal XML does make sense.

Jonathan


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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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-2013 All Rights Reserved.