XML Data-Islands

XML data-islands are used to pass data to the HTML Components (HTCs) used on many of the ASP pages in Commerce Server Business Desk. An XML data-island is data, described in XML, that is accessed through an id attribute associated with one of two different elements (xml and script) that might be contained in the ASP page. The data itself often exists in the ASP pages themselves, but need not.

An XML data-island can exist in an ASP page, either hard-coded or generated programmatically using ASP script, using one of the following three tagging mechanisms:

  • Within an xml element:

    <xml id='DataIslandID'>
        data-island XML can go here
    </xml>
    
  • Within a script element that includes the type attribute with the value "text/xml":

    <script type='text/xml' id='DataIslandID'>
        data-island XML can go here
    </script>
    
  • Within a script element that include the language attribute with the value "xml":

    <script language='xml' id='DataIslandID'>
        data-island XML can go here
    </script>
    

The XML data comprising the data-island does not need to be specified on the ASP page itself. Any of the above mechanisms for embedding an XML data-island on an ASP page can use the src attribute to specify the URL of another file from which the contents of the data-island will be retrieved. Any of the following three single lines of code, in conjunction with the data-island XML contained in the specified source file, specify legitimate XML data-islands:

<xml    id='DataIslandID' src='XMLDataFileURL' />

or

<script id='DataIslandID' src='XMLDataFileURL' language='xml' />

or

<script id='DataIslandID' src='XMLDataFileURL' type='text/xml' />


All rights reserved.