summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorburaq <buraq@epfl.ch>2004-06-01 14:10:01 +0000
committerburaq <buraq@epfl.ch>2004-06-01 14:10:01 +0000
commit668e8ae2685e388dd3bd5a755a5038e0fcc05127 (patch)
tree352eea71cf9b6e803bbd6229319884981d420b88 /doc
parentf25e5dee7674f8ecb208ae8e0d9334c783b94892 (diff)
downloadscala-668e8ae2685e388dd3bd5a755a5038e0fcc05127.tar.gz
scala-668e8ae2685e388dd3bd5a755a5038e0fcc05127.tar.bz2
scala-668e8ae2685e388dd3bd5a755a5038e0fcc05127.zip
XML changes
Diffstat (limited to 'doc')
-rw-r--r--doc/reference/ReferencePart.tex26
1 files changed, 26 insertions, 0 deletions
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 ::= `</' Name [S] '>'
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 ::= '</' Name [S] '>'
ContentP ::= [CharData] {(ElemPattern|ScalaPatterns) [CharData]}
+ContentP1 ::= ElemPattern
+ | Reference
+ | CDSect
+ | PI
+ | Comment
+ | ScalaPatterns
ScalaPatterns ::= '{' patterns '}'
\end{lstlisting}