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

Re: An unclear point with W3C XML 1.0 Specification


xml apostrophe
Nothing personal, but this is rather strange XML. Why not use a 
part_description element:

   <product_item>
     <part_description>3 1/2" Spanner</part_description>
     ...
   </product_item>

or attribute:

   <product_item part_description="3 1/2&quot; Spanner">
      ...
   </product_item>

Note that the latter case uses the pre-defined quot entity to avoid 
having the inches mark be interpreted as the end of the attribute. XML 
defines an apos (apostrophe) entity as well.

-- Ron

david.lyon@c... wrote:
> Hi Collin,
> 
> If you are talking about the traditional xml spec I may
> not be the best person to explain it.
> 
> However what we do with our string literals is "properly"
> escape them. That is, have a scheme to embed double quotations
> and other noxious characters in a way that doesn't cause a
> problem to the parser.
> 
> It happens all the time, especially with power tools. eg:
> 
>  <product_item>
>    part_description&="3 1/2^" Spanner"
>  </product_item>
> 
> What we do, is use the ^ character to escape. But there
> may be other preferences.
> 
> So after reading out the value, what is returned is:
> 
>  3 1/2" Spanner
> 
> It's pretty simple but works without hiccups.



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