From 668e8ae2685e388dd3bd5a755a5038e0fcc05127 Mon Sep 17 00:00:00 2001 From: buraq Date: Tue, 1 Jun 2004 14:10:01 +0000 Subject: XML changes --- doc/reference/ReferencePart.tex | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/doc/reference/ReferencePart.tex b/doc/reference/ReferencePart.tex index b4c2a7c7a4..85902029f6 100644 --- a/doc/reference/ReferencePart.tex +++ b/doc/reference/ReferencePart.tex @@ -4189,6 +4189,8 @@ ETag ::= `' Content ::= [CharData] {Content1 [CharData]} Content1 ::= Element | Reference + | CDSect + | PI | Comment | ScalaExpr \end{lstlisting} @@ -4200,6 +4202,14 @@ than one element, then its value is a runtime representation of a sequence of XML nodes (an instance of a subclass of \lstinline@scala.Seq[scala.xml.Node]@). +If an XML expression is an entity reference, CDATA section, processing +instructions or a comments, it is represented by an instance of the +corresponding Scala runtime class. + +By default, beginning and trailing whitespace in element content is removed, +and consecutive occurrences of whitespace are replaced by a single space +character \U{0020}. This behaviour can be changed to preserve all whitespace +with a compiler option. \syntax\begin{lstlisting} Attribute ::= Name Eq AttValue @@ -4253,6 +4263,16 @@ elements match the sequence described by the pattern. XML patterns may contain Scala patterns(\ref{sec:pattern-match}). +Whitespace is treated the same way as in XML expressions. Patterns +that are entity references, CDATA sections, processing +instructions and comments match runtime representations which are the +the same. + +By default, beginning and trailing whitespace in element content is removed, +and consecutive occurrences of whitespace are replaced by a single space +character \U{0020}. This behaviour can be changed to preserve all whitespace +with a compiler option. + \syntax\begin{lstlisting} ElemPattern ::= EmptyElemTagP | STagP ContentP ETagP @@ -4261,6 +4281,12 @@ EmptyElemTagP ::= '<' Name [S] '/>' STagP ::= '<' Name [S] '>' ETagP ::= '' ContentP ::= [CharData] {(ElemPattern|ScalaPatterns) [CharData]} +ContentP1 ::= ElemPattern + | Reference + | CDSect + | PI + | Comment + | ScalaPatterns ScalaPatterns ::= '{' patterns '}' \end{lstlisting} -- cgit v1.2.3