Show All

# followingSiblings Attribute

Specifies a relative XPath expression from the parent node that specifies the XML Document Object Model (DOM) nodes prior to which the insertion of the XML fragment should occur.

## Type

    xsd:string

## Remarks

The followingSiblings attribute is an optional attribute of the chooseFragment element.

The insertion will be as a child of the parent node, but it will be prior to any nodes found that satisfy the XPath expression specified by the followingSiblings attribute. If no nodes are found, the insertion acts as an append.

The followingSiblings attribute is only used during an insert when the current context is not in an item. The behavior is to append to the content of the parent node, unless the followingSiblings attribute is specified, in which case the insertion is still within the content of the parent, but prior to any followingSiblings nodes.

## Example

The following is an example of the followingSiblings attribute as it is used in the chooseFragment element:

    <xsf:editing>
       <xsf:xmlToEdit name="CD_10"
          item="/CustomUISample/CDCollection/CD"
          container="/CustomUISample">
          <xsf:editWith caption="CD"
             xd:autogeneration="template"
             component="xCollection">
             <xsf:fragmentToInsert>
                <xsf:chooseFragment parent="CDCollection"
                   followingSiblings=".">
                   <CD>
                      <Title></Title>
                      <Artist></Artist>
                      <Tracks>
                         <Track></Track>
                         <Track></Track>
                      </Tracks>
                   </CD>
                </xsf:chooseFragment>
             </xsf:fragmentToInsert>
          </xsf:editWith>
       </xsf:xmlToEdit>
    </xsf:editing>

©2003-2004 Microsoft Corporation. All rights reserved. Permission to copy, display and distribute this document is available at: http://msdn.microsoft.com/library/en-us/odcXMLRef/html/odcXMLRefLegalNotice.asp