This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 11508 - suboptimal CDATA example
Summary: suboptimal CDATA example
Status: CLOSED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: HTML5: The Markup Language (editor: Michael(tm) Smith) (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Michael[tm] Smith
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-09 15:12 UTC by David Carlisle
Modified: 2011-06-17 10:11 UTC (History)
2 users (show)

See Also:


Attachments

Description David Carlisle 2010-12-09 15:12:36 UTC
the CDATA example at

http://dev.w3.org/html5/markup/syntax.html#cdata-sections

isn't ideal (if any use of CDATA is ideal) as it is an example of a completely redundant CDATA section, the content has no < or & so the section isn't quoting anything. A better LaTeX example would be a matrix, as that uses & as the cell separator, so using CDATA there would save quoting them all as &.

(This comment should not be seen as a blocker for the next publication round,
it can be taken as a comment on the next release)
Comment 1 Michael[tm] Smith 2010-12-20 07:19:58 UTC
I'd welcome a better example; if you or somebody else can provide a complete one I will replace the current one with that instead
Comment 2 David Carlisle 2010-12-20 10:59:15 UTC
(In reply to comment #1)
> I'd welcome a better example; if you or somebody else can provide a complete
> one I will replace the current one with that instead


I'll supply something. I am supposed to know a bit of latex:-)
Comment 3 David Carlisle 2010-12-20 11:44:01 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > I'd welcome a better example; if you or somebody else can provide a complete
> > one I will replace the current one with that instead
> 
> 
> I'll supply something. I am supposed to know a bit of latex:-)

Surprisingly hard to find a small sensible example that uses both & and <
Perhaps this definition of abs(x) which has 2 & and a < 


\documentclass{article}
\usepackage{amsmath}
\begin{document}
The absolute value of $x$:
\[
\left|x\right|= \begin{cases}-x& \text{if $x<0$}\\
                              x& \text{otherwise}\end{cases}
\]
\end{document}
Comment 4 Michael[tm] Smith 2011-06-13 11:10:40 UTC
David,

I seem to have missed the update that you posted to this at the end of last year. Thanks for the example -- I'll replace the current one with this one as soon as I'm back somewhere with a reliable Internet connection.

  --Mike
Comment 5 Michael[tm] Smith 2011-06-17 08:52:40 UTC
http://dev.w3.org/cvsweb/html5/markup/spec.html.diff?r1=1.329;r2=1.330;f=h

please check and let me know if you spot any formatting problems -

http://dev.w3.org/html5/markup/syntax.html#cdata-sections
Comment 6 David Carlisle 2011-06-17 10:11:12 UTC
thanks, and I reconfirmed it is valid latex (not that that is that important for this document), closing.