Skip to content

Commit

Permalink
Add support in XSLT for new custom XSD type attribute in service XML
Browse files Browse the repository at this point in the history
  • Loading branch information
kenrowland committed Jun 14, 2023
1 parent 3415b98 commit 88f95d8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions esp/scm/additional.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ foreach ( loop_var ${ESPSCM_SRCS} )
set_source_files_properties(${ESPSCM_GENERATED_DIR}/${result}_esp.ipp PROPERTIES GENERATED TRUE)
set_source_files_properties(${ESPSCM_GENERATED_DIR}/${result}.xml PROPERTIES GENERATED TRUE)
set ( ESP_GENERATED_INCLUDES ${ESP_GENERATED_INCLUDES} ${ESPSCM_GENERATED_DIR}/${result}.esp ${ESPSCM_GENERATED_DIR}/${result}.hpp ${ESPSCM_GENERATED_DIR}/${result}.ipp ${ESPSCM_GENERATED_DIR}/${result}_esp.ipp ${ESPSCM_GENERATED_DIR}/${result}.xml )
if ( PLATFORM )
Install( FILES ${ESPSCM_GENERATED_DIR}/${result}.xml DESTINATION componentfiles/esdl_files COMPONENT Runtime )
endif ( PLATFORM )
endforeach ( loop_var ${ESPSCM_SRCS} )

include_directories ( ${ESPSCM_GENERATED_DIR} ${HPCC_SOURCE_DIR}/esp/espcommon)
3 changes: 3 additions & 0 deletions esp/scm/smcscm.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ foreach ( loop_var ${ESPSCM_SRCS} )
set_source_files_properties(${ESPSCM_GENERATED_DIR}/${result}_esp.ipp PROPERTIES GENERATED TRUE)
set_source_files_properties(${ESPSCM_GENERATED_DIR}/${result}.xml PROPERTIES GENERATED TRUE)
set ( ESP_GENERATED_INCLUDES ${ESP_GENERATED_INCLUDES} ${ESPSCM_GENERATED_DIR}/${result}.esp ${ESPSCM_GENERATED_DIR}/${result}.hpp ${ESPSCM_GENERATED_DIR}/${result}.ipp ${ESPSCM_GENERATED_DIR}/${result}_esp.ipp ${ESPSCM_GENERATED_DIR}/${result}.xml )
if ( PLATFORM )
Install( FILES ${ESPSCM_GENERATED_DIR}/${result}.xml DESTINATION componentfiles/esdl_files COMPONENT Runtime )
endif ( PLATFORM )
endforeach ( loop_var ${ESPSCM_SRCS} )

include_directories ( ${ESPSCM_GENERATED_DIR} ${HPCC_SOURCE_DIR}/esp/espcommon )
4 changes: 4 additions & 0 deletions esp/xslt/esp_service_xml2xsd.xslt
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,16 @@
<xsl:when test="@xsd_type">
<xsl:value-of select="@xsd_type"/>
</xsl:when>
<xsl:when test="@xsd_extended_type">xsd:<xsl:value-of select="@xsd_extended_type"/>
</xsl:when>
<xsl:when test="@type='bool'">xsd:<xsl:value-of select="'boolean'"/>
</xsl:when>
<xsl:when test="@type='unsigned'">xsd:<xsl:value-of select="'unsignedInt'"/>
</xsl:when>
<xsl:when test="@type='binary'">xsd:<xsl:value-of select="'base64Binary'"/>
</xsl:when>
<xsl:when test="@type='int64'">xsd:<xsl:value-of select="'long'"/>
</xsl:when>
<xsl:when test="@type">xsd:<xsl:value-of select="@type"/>
</xsl:when>
<xsl:when test="@complex_type">tns:<xsl:value-of select="@complex_type"/>
Expand Down

0 comments on commit 88f95d8

Please sign in to comment.