Changeset 7722 for ndgCommon


Ignore:
Timestamp:
11/11/10 11:35:26 (9 years ago)
Author:
sdonegan
Message:

Update includes better handling of function variables and pointOfContact renamed CI_ResponsibleParty

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ndgCommon/trunk/ndg/common/xmldb/xquery/lib/Utilities/isoUtilities_xquery_lib.xquery

    r7716 r7722  
    1 module namespace isolib='http://ndg.nerc.ac.uk/xquery/lib/iso_utilities'; 
     1module namespace isolib='http://ndg.nerc.ac.uk/xquery/lib/iso_utilities'; 
    22 
    33(: ISO namespaces :) 
     
    3434 
    3535(: contactInfo - this gets replicated a lot! :) 
    36 declare function isolib:contactInfo ($phone as xs:string, $deliveryPoint, $city as xs:string, $postalCode as xs:string, $electronicalMailAddress as xs:string) 
     36declare function isolib:contactInfo ($phone, $deliveryPoint, $city, $postalCode, $electronicalMailAddress) 
    3737{ 
    3838    element gmd:contactInfo  
     
    6565                        element gco:CharacterString { data($postalCode)} 
    6666                    }, 
    67                     element gmd:electronicMailAddress { 
    68                         element gco:CharacterString { data($electronicalMailAddress)} 
    69                     } 
     67                    if (exists($electronicalMailAddress)) then 
     68                        element gmd:electronicMailAddress { 
     69                            element gco:CharacterString { data($electronicalMailAddress)} 
     70                        } 
     71                    else () 
    7072                } 
    7173            } 
     
    7577 
    7678(:pointOfContact - also gets called a lot :) 
    77 declare function isolib:pointOfContact ($organisationName as xs:string, $individualName as xs:string, $positionName as xs:string, $role as xs:string, $phone as xs:string, $deliveryPoint, $city as xs:string, $postalCode as xs:string, $electronicalMailAddress as xs:string) 
     79declare function isolib:CI_ResponsibleParty ($organisationName as xs:string, $individualName, $positionName, $role, $phone, $deliveryPoint, $city, $postalCode, $electronicalMailAddress) 
    7880{ 
    7981    
Note: See TracChangeset for help on using the changeset viewer.