次の方法で共有


Views Element (List)

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Contains an enumeration of the views that are used in a list.

<Views>
</Views>

Attributes

Attribute

Description

None

N/A

Child Elements

View

Parent Elements

MetaData

Occurrences

Minimum: 0

Maximum: 1

Example

The following example illustrates a collection of View elements contained by a Views element. The first view, "Summary," displays a sequence of paragraphs. The Query element specifies not only a sort order (in order of modification date), but also a filter (only show items whose Expires property is greater than or equal to today’s date).

<Views>
  <View Type="HTML" Name="Summary">
    <ViewBody ExpandXML=”TRUE”>
      <![CDATA[ <p><SPAN class=DocTitle>
            <ows:Field Name="Title"/></SPAN>
        (<ows:Field Name="Author"/>, <ows:Field Name="Modified"/>)
        <ows:Limit><Field Name="Body"/></ows:Limit>
        </p>  ]]>
    </ViewBody>
    <Query>
      <Where>
        <Geq>
          <FieldRef Name="Expires"/>
          <Value Type="DateTime">
            <Today/>
          </Value>
        </Geq>
      </Where>
      <OrderBy>
        <FieldRef Name="Modified"/>
      </OrderBy>
    </Query>
    <ViewFields>
      <FieldRef Name="Summary"/>
      <FieldRef Name="Author"/>
      <FieldRef Name="Modified"/>
      <FieldRef Name="Body"/>
    </ViewFields>
  </View>
  <View Type="HTML" Name="Titles">
    .
    .
    .
  </View>
  <View Type="HTML" Name="Dates">
    .
    .
    .
  </View>
    .
    .
    .
</Views>