Please enable JavaScript to view this site.

Version:

Copy the following example in your .xsl file used for the HTTP Inbound exercise:

<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
               xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
               xmlns:java="http://xml.apache.org/xalan/java"
               xmlns:xalan="http://xml.apache.org/xalan"
               exclude-result-prefixes="java xalan"
               xmlns:n0="http://soap.postserver.aedsicad.com/uti.xsd"
               xmlns:utiapi="com.aedsicad.postserver.api.XSLHelper"
               xmlns:fsapi="com.aedsicad.postserver.api.XSLFeatureServiceAPI"
               xmlns:stringutil="org.apache.commons.lang3.StringUtils"
               xmlns:xs="http://www.w3.org/2001/XMLSchema"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <xsl:param name="STANDALONE"/>
  <xsl:param name="VERSION"/>
  <xsl:param name="MESSAGE_ID"/>
 
  <xsl:template match="/">
 
     <xsl:variable name="FEATURESERVICE">
        <xsl:text>UtilityNetwork</xsl:text>
     </xsl:variable>  
 
     <xsl:variable name="GISLAYER">
        <xsl:text>0</xsl:text>
     </xsl:variable>
     <xsl:variable name="OBJECTID_IN_GIS"
                   select="fsapi:lookupVersionedValue($FEATURESERVICE,$VERSION,$GISLAYER,'ASSETID',//PARAM[@name='sap_id']/text(),'OBJECTID')"/>
     <viXml>
        <applyEditsRequest>
           <endPoint><xsl:value-of select="$FEATURESERVICE"/></endPoint>
           <!-- list of features -->
           <features>
              <feature>
                 <layerId>
                    <xsl:value-of select="$GISLAYER"/>
                 </layerId>
                 <xsl:choose>
                    <xsl:when test="$OBJECTID_IN_GIS != ''">
                       <operation>U</operation>
                    </xsl:when>
                    <xsl:otherwise>
                       <operation>I</operation>
                    </xsl:otherwise>
                 </xsl:choose>
                 <attributes>
                    <xsl:if test="$OBJECTID_IN_GIS != ''">
                       <attribute key='OBJECTID'>
                          <xsl:value-of select="$OBJECTID_IN_GIS"/>
                       </attribute>
                    </xsl:if>
                    <attribute key='ASSETGROUP'>
                       <xsl:text>200</xsl:text>
                    </attribute>
                    <attribute key='ASSETTYPE'>
                       <xsl:text>203</xsl:text>
                    </attribute>
                    <attribute key='ASSETID'>
                       <xsl:value-of select="//PARAM[@name='sap_id']/text()"/>
                    </attribute>
                    <attribute key='ASSETNAME'>
                       <xsl:value-of select="//PARAM[@name='sap_name']/text()"/>
                    </attribute>
                 </attributes>
                 <geometry>
                    <x>390452.1528000012</x>
                    <y>5820230.3950999975</y>
                 </geometry>
              </feature>
           </features>
        </applyEditsRequest>
     </viXml>
  </xsl:template>
</xsl:stylesheet>

© 2024 VertiGIS GmbH. All Rights Reserved. | Privacy Center | Imprint
Documentation Version 10.0 (fa3b2a93)