From 8b58d4360a9bca0f9695a1ac325a6c4baf04787a Mon Sep 17 00:00:00 2001 From: Gilles Dubochet Date: Mon, 26 Apr 2010 13:10:06 +0000 Subject: Improved documentation for `NodeSeq.\` and `Nod... Improved documentation for `NodeSeq.\` and `NodeSeq.\\` (#3328). No review. --- src/library/scala/xml/NodeSeq.scala | 45 ++++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 20 deletions(-) (limited to 'src/library') diff --git a/src/library/scala/xml/NodeSeq.scala b/src/library/scala/xml/NodeSeq.scala index 3b56ba25e4..0cab5422b6 100644 --- a/src/library/scala/xml/NodeSeq.scala +++ b/src/library/scala/xml/NodeSeq.scala @@ -73,16 +73,18 @@ abstract class NodeSeq extends immutable.Seq[Node] with SeqLike[Node, NodeSeq] w case _ => false } - /** Projection function. Similar to XPath, use this \ "foo" - * to get a list of all elements of this sequence that are labelled with - * "foo". Use \ "_" as a wildcard. Use - * ns \ "@foo" to get the unprefixed attribute "foo". - * Use ns \ "@{uri}foo" to get the prefixed attribute - * "pre:foo" whose prefix "pre" is resolved to the namespace "uri". - * For attribute projections, the resulting NodeSeq attribute values are - * wrapped in a Group. - * There is no support for searching a prefixed attribute by - * its literal prefix. + /** Projection function, which returns elements of `this` sequence based on the string `that`. Use: + * - `this \ "foo"` to get a list of all elements that are labelled with `"foo"`; + * - `\ "_"` to get a list of all elements (wildcard); + * - `ns \ "@foo"` to get the unprefixed attribute `"foo"`; + * - `ns \ "@{uri}foo"` to get the prefixed attribute `"pre:foo"` whose prefix `"pre"` is resolved to the + * namespace `"uri"`. + * + * For attribute projections, the resulting [[scala.xml.NodeSeq]] attribute values are wrapped in a + * [[scala.xml.Group]]. + * + * There is no support for searching a prefixed attribute by its literal prefix. + * * The document order is preserved. * * @param that ... @@ -120,16 +122,19 @@ abstract class NodeSeq extends immutable.Seq[Node] with SeqLike[Node, NodeSeq] w } } - /** projection function. Similar to XPath, use this \\ 'foo - * to get a list of all elements of this sequence that are labelled with - * "foo". Use \\ "_" as a wildcard. Use - * ns \\ "@foo" to get the unprefixed attribute "foo". - * Use ns \\ "@{uri}foo" to get each prefixed attribute - * "pre:foo" whose prefix "pre" is resolved to the namespace "uri". - * For attribute projections, the resulting NodeSeq attribute values are - * wrapped in a Group. - * There is no support for searching a prefixed attribute by - * its literal prefix. + /** Projection function, which returns elements of `this` sequence and of all its subsequences, based on + * the string `that`. Use: + * - `this \\ 'foo` to get a list of all elements that are labelled with `"foo"`; + * - `\\ "_"` to get a list of all elements (wildcard); + * - `ns \\ "@foo"` to get the unprefixed attribute `"foo"`; + * - `ns \\ "@{uri}foo"` to get each prefixed attribute `"pre:foo"` whose prefix `"pre"` is resolved to the + * namespace `"uri"`. + * + * For attribute projections, the resulting [[scala.xml.NodeSeq]] attribute values are wrapped in a + * [[scala.xml.Group]]. + * + * There is no support for searching a prefixed attribute by its literal prefix. + * * The document order is preserved. * * @param that ... -- cgit v1.2.3