Changeset 3515
- Timestamp:
- 09/03/13 14:08:29 (11 years ago)
- Location:
- cats/ISOcat/trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
cats/ISOcat/trunk/mod-ISOcat-access-data/access/dc_hug.acc
r2724 r3515 25 25 <param/> 26 26 <default> 27 <string >down</string>27 <string/> 28 28 </default> 29 29 </source> … … 161 161 <xsl:param name="what"/> 162 162 <xsl:param name="id"/> 163 <xsl:param name="dir"/> 163 164 <instr> 164 165 <type>ISOcat.access.data.<xsl:value-of select="$what"/>.touch</type> … … 175 176 <dir> 176 177 <string> 177 <xsl:value-of select=" $dir"/>178 <xsl:value-of select="if ($dir='') then ('down') else ($dir)"/> 178 179 </string> 179 180 </dir> … … 183 184 <xsl:template match="super"> 184 185 <xsl:comment>touch the super simple DC[<xsl:call-template name="dc-name"/>]</xsl:comment> 185 <xsl:copy-of select="isocat:touch('dc',@dc )"/>186 <xsl:copy-of select="isocat:touch('dc',@dc,$dir)"/> 186 187 </xsl:template> 187 188 <xsl:template match="domain"> 188 <xsl:if test="$dir='up' ">189 <xsl:if test="$dir='up' or ($dir='' and /dc/@type='simple')"> 189 190 <xsl:comment>touch the domain complex DC[<xsl:call-template name="dc-name"/>]</xsl:comment> 190 <xsl:copy-of select="isocat:touch('dc',@dc )"/>191 <xsl:copy-of select="isocat:touch('dc',@dc,'up')"/> 191 192 </xsl:if> 192 193 </xsl:template> 193 194 <xsl:template match="value"> 194 <xsl:if test="$dir= 'down'">195 <xsl:if test="$dir=('','down')"> 195 196 <xsl:comment>touch the value simple DC[<xsl:call-template name="dc-name"/>]</xsl:comment> 196 <xsl:copy-of select="isocat:touch('dc',@dc )"/>197 <xsl:copy-of select="isocat:touch('dc',@dc,'down')"/> 197 198 </xsl:if> 198 199 </xsl:template> 199 200 <xsl:template match="profile"> 200 201 <xsl:comment>touch the profile[<xsl:value-of select="@name"/>]</xsl:comment> 201 <xsl:copy-of select="isocat:touch('profile',@ref )"/>202 <xsl:copy-of select="isocat:touch('profile',@ref,$dir)"/> 202 203 </xsl:template> 203 204 <xsl:template match="dcs"> 204 205 <xsl:comment>touch the DCS[<xsl:value-of select="@name"/>]</xsl:comment> 205 <xsl:copy-of select="isocat:touch('dcs',@ref )"/>206 <xsl:copy-of select="isocat:touch('dcs',@ref,$dir)"/> 206 207 </xsl:template> 207 208 <xsl:template match="/"> -
cats/ISOcat/trunk/mod-ISOcat-access-data/access/dc_touch.acc
r3458 r3515 1 <accessor debug=" true">1 <accessor debug="false"> 2 2 <name>ISOcat.access.data.dc.touch</name> 3 3 <descr>Touch a DC.</descr> … … 25 25 <param/> 26 26 <default> 27 <string >down</string>27 <string/> 28 28 </default> 29 29 </source> … … 106 106 <dc>var:dc</dc> 107 107 <check>var:check</check> 108 <dir>var:dir</dir> 108 109 <target>var:void</target> 109 110 </instr> -
cats/ISOcat/trunk/mod-ISOcat-manage-system/manage/import.acc
r2584 r3515 36 36 </param> 37 37 <param> 38 <name>owner</name> 39 <descr>user id</descr> 40 <type canonical="true">string</type> 41 <source> 42 <nvp/> 43 <default> 44 <string/> 45 </default> 46 </source> 47 </param> 48 <param> 38 49 <name>external</name> 39 50 <descr>external DCs</descr> … … 128 139 <!-- lookup the owner id --> 129 140 <instr> 141 <type>ISOcat.access.data.user.id</type> 142 <user>var:owner</user> 143 <target>var:owner</target> 144 </instr> 145 <instr> 130 146 <type>sloot.xquery</type> 131 147 <operator> 132 <xquery> 133 declare variable $params as node() external; 134 <sql> 135 SELECT 136 view_owner.id, 137 name, 138 login, 139 CASE 140 WHEN (login IS NULL) 141 THEN 'TDG' 142 ELSE 'user' 143 END AS type 144 FROM 145 view_owner 146 LEFT JOIN 147 core_user 148 ON 149 view_owner.id = core_user.id 150 WHERE 151 view_owner.id = {string($params//owner)} 152 ; 153 </sql> 154 </xquery> 155 </operator> 156 <params>var:params</params> 148 <sql> 149 SELECT 150 view_owner.id, 151 name, 152 login, 153 CASE 154 WHEN (login IS NULL) 155 THEN 'TDG' 156 ELSE 'user' 157 END AS type 158 FROM 159 view_owner 160 LEFT JOIN 161 core_user 162 ON 163 view_owner.id = core_user.id 164 WHERE 165 view_owner.id = {string($owner)} 166 ; 167 </sql> 168 </operator> 169 <owner>var:owner</owner> 157 170 <target>var:sql</target> 158 171 </instr> -
cats/ISOcat/trunk/various/import/csv2dcif.xsl
r2029 r3515 273 273 <xsl:otherwise> 274 274 <xsl:message>WRN: multiple columns for definition in a language section, will use only the first one!</xsl:message> 275 </xsl:otherwise> 276 </xsl:choose> 277 </xsl:for-each> 278 <xsl:for-each select="dcif:colLookups($ss,('definition source'),(),$row)[. ge $col][. lt $nxt]"> 279 <xsl:choose> 280 <xsl:when test="position() eq 1"> 281 <definition-source col="{.}"/> 282 </xsl:when> 283 <xsl:otherwise> 284 <xsl:message>WRN: multiple columns for definition source in a language section, will use only the first one!</xsl:message> 285 </xsl:otherwise> 286 </xsl:choose> 287 </xsl:for-each> 288 <xsl:for-each select="dcif:colLookups($ss,('access date'),(),$row)[. ge $col][. lt $nxt]"> 289 <xsl:choose> 290 <xsl:when test="position() eq 1"> 291 <access-date col="{.}"/> 292 </xsl:when> 293 <xsl:otherwise> 294 <xsl:message>WRN: multiple columns for access date in a language section, will use only the first one!</xsl:message> 275 295 </xsl:otherwise> 276 296 </xsl:choose> … … 491 511 <dcif:source> 492 512 <xsl:choose> 513 <xsl:when test="not(normalize-space($lang/definition-source/@col)=('','UNK'))"> 514 <xsl:variable name="src" select="normalize-space($line/value[f:int($lang/definition-source/@col)])"/> 515 <xsl:if test="$src!=''"> 516 <xsl:value-of select="$src"/> 517 <xsl:if test="not(normalize-space($lang/access-date/@col)=('','UNK'))"> 518 <xsl:variable name="access" select="normalize-space($line/value[f:int($lang/access-date/@col)])"/> 519 <xsl:if test="$access!=''"> 520 <xsl:text> (</xsl:text> 521 <xsl:value-of select="$access"/> 522 <xsl:text>)</xsl:text> 523 </xsl:if> 524 </xsl:if> 525 </xsl:if> 526 </xsl:when> 493 527 <xsl:when test="not(normalize-space($map/source)=('','UNK'))"> 494 528 <xsl:value-of select="$map/source"/>
Note: See TracChangeset
for help on using the changeset viewer.