[XML-DEV Mailing List Archive Home]
[By Thread]
[By Date]
[Recent Entries]
[Reply To This Message]
Re: Why is < illegal in an attribute value but theequivalent h
- From: David Carlisle <d.p.carlisle@gmail.com>
- To: Roger L Costello <costello@mitre.org>
- Date: Wed, 16 Mar 2022 23:39:36 +0000

Hi Folks,
For the parser that I am building I need to be sure that I know exactly what can (and can't) go within an attribute value. For example, can an attribute value contain &? (Yes) Can an attribute value contain the greater-than symbol? (Yes)
I created tests to see what characters are legal and what are illegal in an attribute value. See below.
Questions:
1. Why is it that < is illegal but the equivalent hex and decimal character entities are legal?
it stops you being creative with <something foo="<b>xyz</b>"/>
2. Are there unusual things that are legal (or illegal) to put in an attribute value? For instance, you can't put a CDATA section or a PI in an attribute value, right?
That follows from the first point, you can't have a < so you can't have a <
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
|
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
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.
|
|