tags:

views:

27

answers:

1

Hi XML Professionals,

This is part of one of our XML files in SharePoint:

  <BuildManifest nsprefix ="ns0" ns="http://tempuri.org/Eform_Schema.xsd" version="1.1">
      <IdentifyInputParameters>
        <BusinessObject ref="Request1" type="RequestProcessing_BL.Request" />
      </IdentifyInputParameters>

      <Metadata>
        <Source ref="ThisForm" reflectionPath=".FormURL" />
        <Destination xpath="//ns0:eForm" attribute="formURL">
        </Destination>
      </Metadata>

      <Populate>
        <Source ref ="Request1" reflectionPath=".RequestTypeGroupDisplayName" />
        <Destination xpath="//ns0:eForm/descendant::ns0:data[@name='FirstName']"></Destination>
      </Populate>

My Questions:

1- The Eform_Schema.xsd file is in the root directory of SharePoint. How the command ns="http://tempuri.org/Eform_Schema.xsd" could reach it ?

2- Are " nsprefix , ns , ref , type " reserved words in XML ?

3- xpath="//ns0:eForm/descendant::ns0:data[@name='FirstName'] gets the first name from the database. How it did that ?

Thanks,

Ahmed.

A: 

1- The Eform_Schema.xsd file is in the root directory of SharePoint. How the command ns="http://tempuri.org/Eform_Schema.xsd" could reach it ? It's up to SharePoint's parsing algorithm that does that.

2- Are " nsprefix , ns , ref , type " reserved words in XML ? No. They are just normal attributes of your XML Node.

3- xpath="//ns0:eForm/descendant::ns0:data[@name='FirstName'] gets the first name from the database. How it did that? It uses xPath. this is a selector for XML documents.

To learn more about xpath: http://www.w3schools.com/xpath/

sheeks06
Thanks sheeks06 for your answers.Ahmed.
Prog_Sud