STRUCTURE.schemaLocation.xsl 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  3. xmlns:xs="http://www.w3.org/2001/XMLSchema"
  4. exclude-result-prefixes="xs"
  5. xmlns:default_db__x3A__NEURO_MIND_INPUT_TEXT="https://biuro.biall-net.pl/wfs/default_db/table/NEURO_MIND_INPUT_TEXT.xsd"
  6. xmlns:default_db__x3A__STRUCTURE="https://biuro.biall-net.pl/wfs/default_db/table/STRUCTURE.xsd"
  7. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  8. version="2.0">
  9. <!--
  10. <xsl:param name="default_db__x3A__STRUCTURE:schemaLocation.globmapper.from" select=""/>
  11. <xsl:param name="default_db__x3A__STRUCTURE:schemaLocation.globmapper.to" select=""/>
  12. -->
  13. <xsl:function name="default_db__x3A__STRUCTURE:schemaLocation">
  14. <xsl:param name="default_db__x3A__STRUCTURE:targetNamespace"/>
  15. <xsl:param name="default_db__x3A__STRUCTURE:document-uri.filename"/>
  16. <xsl:value-of select="concat($default_db__x3A__STRUCTURE:targetNamespace,' ',$default_db__x3A__STRUCTURE:document-uri.filename)"/>
  17. </xsl:function>
  18. <xsl:template name="default_db__x3A__STRUCTURE:schemaLocation">
  19. <xsl:param name="default_db__x3A__STRUCTURE:targetNamespace" required="yes"/>
  20. <xsl:param name="default_db__x3A__STRUCTURE:targetNamespace.dataname" required="no"/>
  21. <xsl:param name="default_db__x3A__STRUCTURE:targetNamespace.sequencefile" required="no"/>
  22. <xsl:param name="default_db__x3A__STRUCTURE:document-uri.filename" required="no"/>
  23. <xsl:choose>
  24. <xsl:when test="string-length($default_db__x3A__STRUCTURE:document-uri.filename) &gt;0">
  25. <xsl:attribute name="xsi:schemaLocation" select="default_db__x3A__STRUCTURE:schemaLocation($default_db__x3A__STRUCTURE:targetNamespace,$default_db__x3A__STRUCTURE:document-uri.filename)"/>
  26. </xsl:when>
  27. <xsl:when test="$default_db__x3A__STRUCTURE:targetNamespace.dataname">
  28. <xsl:variable name="document-uri.filename">
  29. <xsl:value-of select="$default_db.ant-object.basedir"/><xsl:text>/default_db.</xsl:text><xsl:value-of select="$default_db__x3A__STRUCTURE:targetNamespace.dataname"/>
  30. <xsl:text>/</xsl:text><xsl:value-of select="$default_db__x3A__STRUCTURE:targetNamespace.dataname"/>
  31. <xsl:text>/</xsl:text><xsl:value-of select="$default_db__x3A__STRUCTURE:targetNamespace.dataname"/>
  32. <xsl:if test="string-length($default_db__x3A__STRUCTURE:targetNamespace.sequencefile)&gt;0">
  33. <xsl:text>.</xsl:text><xsl:value-of select="$default_db__x3A__STRUCTURE:targetNamespace.sequencefile"/>
  34. </xsl:if>
  35. <xsl:text>.xsd</xsl:text>
  36. </xsl:variable>
  37. <xsl:attribute name="xsi:schemaLocation" select="default_db__x3A__STRUCTURE:schemaLocation($default_db__x3A__STRUCTURE:targetNamespace,$document-uri.filename)"/>
  38. </xsl:when>
  39. <xsl:otherwise>
  40. <xsl:call-template name="default_db__x3A__STRUCTURE:error.otherwise">
  41. <xsl:with-param name="default_db__x3A__STRUCTURE:error.otherwise.message">Otherwise problem</xsl:with-param>
  42. </xsl:call-template>
  43. </xsl:otherwise>
  44. </xsl:choose>
  45. </xsl:template>
  46. </xsl:stylesheet>