Universal Attributes for Page Rendering Elements

CAML has several universal attributes that can be used to describe any CAML rendering element. These include:

  • AutoHyperLink When TRUE, scans the rendering for strings that look like hyperlinks (e.g. www.microsoft.com). When it finds these strings, it automatically adds an appropriate <A> tag around the text so that the user can follow the hyperlink. HTMLEncode is assumed TRUE when AutoHyperLink is set to TRUE.

  • URLEncode When TRUE, converts special characters, such as spaces, to quoted UTF-8 format (for example, %c3%ab for character ).

  • HTMLEncode When TRUE, converts any embedded characters so that they will all be displayed as text in the browser. This means that any characters that could be confused with HTML tags are converted to entities such as %It instead of ">".

  • AutoNewLine When TRUE, inserts <BR> tags into the text stream and replaces multiple spaces with a non-breaking space (&nbsp;). AutoHyperLink must be TRUE for this attribute to take effect. HTMLEncode is assumed TRUE when AutoNewLine is set to TRUE.

  • URLEncodeAsURL Like URLEncode, but assumes that what is being encoded is a path component of a URL. For example, <ows:XML URLEncodeAsURL="TRUE">SharePoint Team Services</ows:XML> renders SharePoint%20Team%20Services. This attribute, unlike URLEncode, does not encode the forward slash ("/").

  • Default If the spanned text is nothing, render this text instead. For example,

    <ows:XML><ListProperty Select="Description" Default="This list has no description"/></ows:XML> 
    

    The above example will render the default text if there is no description for the list in question.

  • StripWS When TRUE, strips whitespace from the beginning and end of an element. For example, <ows:XML StripWS="TRUE"> Microsoft </ows:XML> will render "Microsoft" without surrounding spaces.

  • ExpandXML When TRUE, goes over the rendered content and sends it on another pass through the CAML interpreter. This allows CAML to render CAML.

Note The mere presence of any one of these attributes implies that it is true (for example, HTMLEncode cannot be set to FALSE).

See Also

Introduction What is CAML?

Location of CAML

How to Use CAML