[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] [Summary] Why does validation fail with a named ENTITY for carriageretur
Hi Folks, Thanks Martin, John, David, and Pete for the excellent inputs. Here is a summary of the issue and its solution. --------- ISSUE --------- For reuse you create an ENTITY for carriage return (decimal 13) followed by line feed (decimal 10): <!ENTITY CRLF " "> There are multiple XML Schema pattern facets where you use the ENTITY: <xs:pattern value="... &CRLF; ..."/> However, due to Attribute Value Normalization, that ENTITY will get converted to two spaces, which is not what we want (we want carriage return followed by line feed). How do we retain the carriage return and line feed? ------------- SOLUTION ------------- In the ENTITY declaration escape the ampersand, using its decimal (38) value: <!ENTITY CRLF "&#13;&#10;"> Note: do *not* escape the ampersand with & /Roger [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
|