OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] An unclear point with W3C XML 1.0 Specification

[ Lists Home | Date Index | Thread Index ]

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@computergrid.net 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.






 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS