Skip to content

Commit 62dcff0

Browse files
authored
Merge pull request scala#238 from ashawley/improve-projection-doc
Clarify doc for NodeSeq projection
2 parents b412972 + 4c632e8 commit 62dcff0

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

shared/src/main/scala/scala/xml/NodeSeq.scala

+9-8
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,10 @@ abstract class NodeSeq extends AbstractSeq[Node] with immutable.Seq[Node] with S
7878
/**
7979
* Projection function, which returns elements of `this` sequence based
8080
* on the string `that`. Use:
81-
* - `this \ "foo"` to get a list of all elements that are labelled with `"foo"`;
82-
* - `\ "_"` to get a list of all elements (wildcard);
83-
* - `ns \ "@foo"` to get the unprefixed attribute `"foo"`;
84-
* - `ns \ "@{uri}foo"` to get the prefixed attribute `"pre:foo"` whose
81+
* - `this \ "foo"` to get a list of all children that are labelled with `"foo"`;
82+
* - `this \ "_"` to get a list of all child elements (wildcard);
83+
* - `this \ "@foo"` to get the unprefixed attribute `"foo"` of `this`;
84+
* - `this \ "@{uri}foo"` to get the prefixed attribute `"pre:foo"` whose
8585
* prefix `"pre"` is resolved to the namespace `"uri"`.
8686
*
8787
* For attribute projections, the resulting [[scala.xml.NodeSeq]] attribute
@@ -125,10 +125,11 @@ abstract class NodeSeq extends AbstractSeq[Node] with immutable.Seq[Node] with S
125125
/**
126126
* Projection function, which returns elements of `this` sequence and of
127127
* all its subsequences, based on the string `that`. Use:
128-
* - `this \\ 'foo` to get a list of all elements that are labelled with `"foo"`;
129-
* - `\\ "_"` to get a list of all elements (wildcard);
130-
* - `ns \\ "@foo"` to get the unprefixed attribute `"foo"`;
131-
* - `ns \\ "@{uri}foo"` to get each prefixed attribute `"pre:foo"` whose
128+
* - `this \\ "foo" to get a list of all elements that are labelled with `"foo"`,
129+
* including `this`;
130+
* - `this \\ "_"` to get a list of all elements (wildcard), including `this`;
131+
* - `this \\ "@foo"` to get all unprefixed attributes `"foo"`;
132+
* - `this \\ "@{uri}foo"` to get all prefixed attribute `"pre:foo"` whose
132133
* prefix `"pre"` is resolved to the namespace `"uri"`.
133134
*
134135
* For attribute projections, the resulting [[scala.xml.NodeSeq]] attribute

0 commit comments

Comments
 (0)