hexsha stringlengths 40 40 | size int64 5 1.05M | ext stringclasses 588
values | lang stringclasses 305
values | max_stars_repo_path stringlengths 3 363 | max_stars_repo_name stringlengths 5 118 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count float64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringdate 2015-01-01 00:00:35 2022-03-31 23:43:49 ⌀ | max_stars_repo_stars_event_max_datetime stringdate 2015-01-01 12:37:38 2022-03-31 23:59:52 ⌀ | max_issues_repo_path stringlengths 3 363 | max_issues_repo_name stringlengths 5 118 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count float64 1 134k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 363 | max_forks_repo_name stringlengths 5 135 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count float64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringdate 2015-01-01 00:01:02 2022-03-31 23:27:27 ⌀ | max_forks_repo_forks_event_max_datetime stringdate 2015-01-03 08:55:07 2022-03-31 23:59:24 ⌀ | content stringlengths 5 1.05M | avg_line_length float64 1.13 1.04M | max_line_length int64 1 1.05M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
02caa3816785605e8df4d2673260a64489c89030 | 331 | xq | XQuery | XQTS_1_0_2/Queries/XQuery/Expressions/FLWORExpr/WhereExpr/WhereExpr003.xq | StefH/XML-Query-Test-Suite-1.0 | 93321f9437b27a9b839842b0867ae462421514ee | [
"MIT"
] | null | null | null | XQTS_1_0_2/Queries/XQuery/Expressions/FLWORExpr/WhereExpr/WhereExpr003.xq | StefH/XML-Query-Test-Suite-1.0 | 93321f9437b27a9b839842b0867ae462421514ee | [
"MIT"
] | null | null | null | XQTS_1_0_2/Queries/XQuery/Expressions/FLWORExpr/WhereExpr/WhereExpr003.xq | StefH/XML-Query-Test-Suite-1.0 | 93321f9437b27a9b839842b0867ae462421514ee | [
"MIT"
] | null | null | null | (: Name: WhereExpr003 :)
(: Description: For+Where+Return - using same predicate (as FLWOR003) in 'Where' predicate :)
(: insert-start :)
declare variable $input-context external;
(: insert-end :)
for $d in $input-context/MyComputer/Drive4
where $d/Folder[@id="128"]
return <FolderName>{$d/Folder/@name}</FolderName>
| 27.583333 | 94 | 0.688822 |
f3c3f90e30832c5a908e9f350d13a432e41dace1 | 301 | xq | XQuery | XQTS_1_0_2/Queries/XQuery/Expressions/PrologExpr/BaseURIProlog/base-URI-21.xq | StefH/XML-Query-Test-Suite-1.0 | 93321f9437b27a9b839842b0867ae462421514ee | [
"MIT"
] | null | null | null | XQTS_1_0_2/Queries/XQuery/Expressions/PrologExpr/BaseURIProlog/base-URI-21.xq | StefH/XML-Query-Test-Suite-1.0 | 93321f9437b27a9b839842b0867ae462421514ee | [
"MIT"
] | null | null | null | XQTS_1_0_2/Queries/XQuery/Expressions/PrologExpr/BaseURIProlog/base-URI-21.xq | StefH/XML-Query-Test-Suite-1.0 | 93321f9437b27a9b839842b0867ae462421514ee | [
"MIT"
] | null | null | null | (: Name: base-URI-21 :)
(: Description: Evaluates that base-uri property can contain "BASE-URI". Used with static-base-uri function.:)
declare base-uri "http://www.BASE-URI.com";
(: insert-start :)
declare variable $input-context1 external;
(: insert-end :)
fn:string(fn:static-base-uri()) | 30.1 | 111 | 0.69103 |
87d263827779c3e315f00110c4aeab1b7676d1a5 | 1,063 | xqy | XQuery | src/login-handler.xqy | jmakeig/socrates | 6c6f5fa48d51a1bf1265a3c1ca819be7ab95b574 | [
"BSD-3-Clause"
] | 1 | 2015-08-06T04:06:41.000Z | 2015-08-06T04:06:41.000Z | src/login-handler.xqy | jmakeig/socrates | 6c6f5fa48d51a1bf1265a3c1ca819be7ab95b574 | [
"BSD-3-Clause"
] | null | null | null | src/login-handler.xqy | jmakeig/socrates | 6c6f5fa48d51a1bf1265a3c1ca819be7ab95b574 | [
"BSD-3-Clause"
] | null | null | null | xquery version "1.0-ml";
import module namespace r="http://marklogic.com/router" at "/lib/router.xqy";
import module namespace mvc="http://marklogic.com/mvc" at "/lib/mvc.xqy";
declare option xdmp:mapping "false";
let $user as xs:string := xdmp:get-request-field("user")
let $password as xs:string := xdmp:get-request-field("password")
let $login as xs:boolean := xdmp:login(
$user,
$password,
true()
)
return if($login) then
let $target as xs:string := (
(: When a privileged request is intercepted :)
xdmp:get-session-field("login-referrer"),
(: When the user explicitly asks to login :)
xdmp:get-request-field("referer"),
(: Other :)
"/"
)[1]
let $_ := xdmp:set-session-field("login-referrer",())
return r:redirect-response($target, 303)
else (
xdmp:set-response-code(400, "Invalid Login Credentials"),
mvc:render-view("login.html", (), map:map(
<map:map xmlns:map="http://marklogic.com/xdmp/map">
<map:entry>
<map:key>failed-login</map:key>
<map:value>Something fudged up</map:value>
</map:entry>
</map:map>
)
)
)
| 29.527778 | 77 | 0.674506 |
ce779bbc0a2455b100c774bcf12ac956e1162d6e | 27,675 | xqy | XQuery | src/main/graphXql/ml-modules/root/graphXql/resolvers/introspection-resolver.xqy | lonesloane/GraphXQL | 9d405236fea61b661e6fdc06afb96c1bdedd9255 | [
"MIT"
] | 7 | 2020-04-28T06:07:25.000Z | 2020-05-04T18:39:19.000Z | src/main/graphXql/ml-modules/root/graphXql/resolvers/introspection-resolver.xqy | lonesloane/GraphXQL | 9d405236fea61b661e6fdc06afb96c1bdedd9255 | [
"MIT"
] | 1 | 2021-10-09T09:39:31.000Z | 2021-10-09T09:39:31.000Z | src/main/graphXql/ml-modules/root/graphXql/resolvers/introspection-resolver.xqy | lonesloane/GraphXQL | 9d405236fea61b661e6fdc06afb96c1bdedd9255 | [
"MIT"
] | null | null | null | xquery version "1.0-ml";
module namespace intro = "http://graph.x.ql/resolver/introspection";
declare namespace gxql ="http://graph.x.ql";
declare namespace gxqls ="http://graph.x.qls";
declare namespace gxqli ="http://graph.x.qli";
declare namespace xs="http://www.w3.org/2001/XMLSchema";
declare default element namespace "http://graph.x.ql";
declare variable $intro:SCHEMA as element(*, gxqls:Schema) := fn:doc('/graphXql/schema.xml')/gxqls:Schema;
declare variable $intro:INTROSPECTION-SCHEMA as element(*, gxqls:Schema) := fn:doc('/graphXql/introspection/introspection-schema.xml')/gxqls:Schema;
declare variable $intro:SCALARS as xs:string* := ('INT', 'FLOAT', 'STRING', 'BOOLEAN', 'ID');
declare function intro:schema-resolver($var-map as map:map) as element(*, gxqli:__Schema)
{
(
for $key in map:keys($var-map) return map:get($var-map, $key)!xdmp:log('[intro:schema-resolver] '||$key||': '||., 'debug')
),
element gxqli:__Schema
{
element gxqli:description {$intro:SCHEMA/gxqls:description},
intro:build-schema-types(),
intro:build-schema-directives()
}
};
declare function intro:build-schema-types()
{
(: TODO: implement caching mechanism :)
element gxqli:types
{
intro:build-schema-queryType(),
intro:build-schema-mutationType(),
intro:build-schema-subscriptionType(),
(
let $map-types := map:map()
let $_ :=
(
for $type in $intro:SCHEMA/gxqls:types/child::*
return
map:put($map-types, $type/@name/string(), $type)
,
for $type in ($intro:SCHEMA//gxqls:field/gxqls:Type, $intro:SCHEMA//gxqls:Arg/gxqls:Type)
return
if (not(map:contains($map-types, $type/@name/string())))
then map:put($map-types, $type/@name/string(), <Type name="{$type/@name/string()}"/>)
else ()
)
for $key in map:keys($map-types)
return intro:build-type(map:get($map-types,$key))
),
(: Introspection type names all begin with __ :)
for $type in $intro:INTROSPECTION-SCHEMA/gxqls:types/gxqls:Type[fn:contains(@name/string(), '__')]
return intro:build-type(<Type name="{$type/@name/string()}"/>)
}
};
declare function intro:build-schema-queryType() as element(*, gxqli:__Type)
{
element gxqli:queryType
{
element gxqli:kind {'OBJECT'},
element gxqli:name {$intro:SCHEMA/gxqls:Query/@name/string()},
if ($intro:SCHEMA/gxqls:Query/gxqls:description)
then element gxqli:description {$intro:SCHEMA/gxqls:Query/gxqls:description/string()}
else (),
element gxqli:fields {
for $field in $intro:SCHEMA/gxqls:Query/gxqls:fields/gxqls:field
return intro:build-type-field($field)
}
}
};
declare function intro:build-schema-mutationType() as element(*, gxqli:__Type)?
{
if ($intro:SCHEMA/gxqls:Mutation)
then
element gxqli:mutationType
{
element gxqli:kind {'OBJECT'},
element gxqli:name {$intro:SCHEMA/gxqls:Mutation/@name/string()},
if ($intro:SCHEMA/gxqls:Mutation/gxqls:description)
then element gxqli:description {$intro:SCHEMA/gxqls:Mutation/gxqls:description/string()}
else (),
element gxqli:fields {
for $field in $intro:SCHEMA/gxqls:Mutation/gxqls:fields/gxqls:field
return intro:build-type-field($field)
}
}
else ()
};
declare function intro:build-schema-subscriptionType() as element(*, gxqli:__Type)?
{
if ($intro:SCHEMA/gxqls:Subscription)
then
element gxqli:subscriptionType
{
element gxqli:kind {},
element gxqli:name {},
element gxqli:description {}
}
else ()
};
declare function intro:build-schema-directives()
{
element gxqli:directives
{
for $directive in $intro:SCHEMA//gxqls:directives/gxqls:Directive
return intro:build-directive($directive)
}
};
declare function intro:build-directive($directive as element(*, gxqls:Directive)) as element(*, gxqli:__Directive)
{
element gxqli:__Directive
{
element gxqli:name {$directive/@name/string()},
element gxqli:description {$directive/gxqls:description/string()},
element gxqli:locations
{
$directive/gxqls:locations/gxqls:location/string()!(element gxqli:__DirectiveLocation {.})
},
element gxqli:args
{
for $arg in $directive/gxqls:args/gxqls:Arg
return intro:build-input-value($arg)
},
element gxqli:isRepeatable
{
if ($directive/@isRepeatable/string()='true') then xs:boolean('true') else xs:boolean('false')
}
}
};
declare function intro:build-type($type) as element(*, gxqli:__Type)
{
intro:build-type($type, '__Type')
};
declare function intro:build-type($type, $name as xs:string) as element(*, gxqli:__Type)
{
let $local-name := $type/local-name()
let $root-kind :=
if (fn:upper-case($type/@name/string()) = $intro:SCALARS) then 'SCALAR'
else if ($local-name = 'InterfaceType') then 'INTERFACE'
else if ($local-name = 'Type') then 'OBJECT'
else if ($local-name = 'UnionType') then 'UNION'
else if ($local-name = 'EnumType') then 'ENUM'
else if ($local-name = 'InputType') then 'INPUT_OBJECT'
else fn:error((), 'SCHEMA TYPE RESOLVER EXCEPTION', ("500", "Internal server error", "unsupported type kind: "||$local-name))
let $kind :=
if ($type/@kind/string() = 'List') then 'LIST'
else if ($type/parent::*/@nullable/string() = 'false') then 'NON_NULL'
else $root-kind
return
element {xs:QName('gxqli:'||$name)}
{
(: KIND :)
element gxqli:kind {$kind},
(: NAME :)
if (not($kind = ('LIST', 'NON_NULL'))) then
element gxqli:name
{
$type/@name/string()
} else (),
(: DESCRIPTION :)
if ($type/gxqls:description)
then element gxqli:description
{
$type/gxqls:description/string()
} else ( ),
(: FIELDS :)
if ($root-kind = ('OBJECT', 'INTERFACE') and $type/gxqls:fields)
then element gxqli:fields
{
for $field in $type/gxqls:fields/gxqls:field
return intro:build-type-field($field)
} else (),
(: INTERFACES :)
(: OBJECT only :)
if ($root-kind = ('OBJECT', 'INTERFACE'))
then element gxqli:interfaces
{
for $interface-type in $intro:SCHEMA/gxqls:types/gxqls:Type[./@name/string() = $type/@name/string()]/gxqls:interfaces/gxqls:Type
let $base-type := $intro:SCHEMA/gxqls:types/gxqls:InterfaceType[./@name/string() = $interface-type/@name/string()]
return intro:build-type($base-type)
}
else (),
(: POSSIBLE TYPES :)
(: INTERFACE and UNION only :)
if ($root-kind = ('INTERFACE', 'UNION'))
then element gxqli:possibleTypes
{
let $possible-types :=
if ($root-kind = 'INTERFACE')
then $intro:SCHEMA/gxqls:types/gxqls:Type[./gxqls:interfaces/gxqls:Type/@name/string() = $type/@name/string()]
else $intro:SCHEMA/gxqls:types/gxqls:UnionType[@name/string() = $type/@name/string()]/gxqls:types/gxqls:Type
for $possible-type in $possible-types
return intro:build-possible-type($possible-type)
}
else (),
(: ENUM VALUES :)
(: ENUM only :)
if ($root-kind = 'ENUM')
then element gxqli:enumValues
{
for $enum-value in $intro:SCHEMA/gxqls:types/gxqls:EnumType[@name/string() = $type/@name/string()]/gxqls:values/gxqls:value
return intro:build-enum-value($enum-value)
}
else (),
(: INPUT FIELDS :)
(: INPUT OBJECT only :)
if ($root-kind = 'INPUT_OBJECT')
then element gxqli:inputFields
{
for $input-field in $intro:SCHEMA/gxqls:types/gxqls:InputType[@name/string() = $type/@name/string()]/gxqls:fields/gxqls:field
return intro:build-input-value($input-field)
}
else (),
(: OF-TYPE :)
(: NON_NULL and LIST only :)
if ($kind = ('LIST', 'NON_NULL'))
then element gxqli:ofType
{
element gxqli:name {$type/@name/string()},
element gxqli:kind {$root-kind}
}
else ()
}
};
declare function intro:build-input-value($input-field) as element(*, gxqli:__InputValue)
{
element gxqli:__InputValue
{
element gxqli:name {$input-field/@name/string()},
if ($input-field/gxqls:description)
then element gxqli:description
{
$input-field/gxqls:description/string()
}
else (),
intro:build-type($input-field/gxqls:Type, 'type'),
if ($input-field/@default)
then element gxqli:defaultValue
{
$input-field/@default/string()
}
else ()
}
};
declare function intro:build-enum-value($enum-value as element(*,gxqls:EnumValue)) as element(*, gxqli:__EnumValue)
{
element gxqli:__EnumValue
{
element gxqli:name {$enum-value/@label/string()},
if ($enum-value/gxqls:description)
then element gxqli:description
{
$enum-value/gxqls:description/string()
} else (),
element gxqli:isDeprecated
{
if ($enum-value/@deprecated/string() = 'true') then xs:boolean('true') else xs:boolean('false')
},
if ($enum-value/gxqls:deprecationReason)
then element gxqli:deprecationReason {$enum-value/gxqls:deprecationReason/string()}
else ()
}
};
declare function intro:build-possible-type($possible-type as element(*, gxqls:Type)) as element(*, gxqli:__Type)
{
element gxqli:__Type
{
element gxqli:kind {'OBJECT'},
element gxqli:name {$possible-type/@name/string()}
}
};
declare function intro:build-type-field($field as element(*, gxqls:Field)) as element(*, gxqli:__Field)
{
element gxqli:__Field
{
element gxqli:name
{
$field/@name/string()
},
if ($field/gxqls:description)
then element gxqli:description
{
$field/gxqls:description/string()
} else (),
element gxqli:args
{
for $arg in $field/gxqls:args/gxqls:Arg
return intro:build-field-arg($arg)
},
(
let $field-type-name := $field/gxqls:Type/@name/string()
let $root-type := $intro:SCHEMA/gxqls:types/child::*[./@name/string() = $field-type-name]
let $type :=
if ($root-type)
then
element {xs:QName('gxqls:'||$root-type/local-name())}
{
attribute kind {$field/gxqls:Type/@kind/string()},
attribute name {$root-type/@name/string()}
}
else $field/gxqls:Type
return
intro:build-type($type, 'type')
),
element gxqli:isDeprecated
{
if ($field/@deprecated) then xs:boolean('true') else xs:boolean('false')
},
if ($field/gxqls:deprecationReason)
then element gxqli:deprecationReason {$field/gxqls:deprecationReason/string()}
else ()
}
};
declare function intro:build-field-arg($arg as element(*, gxqls:Arg)) as element(*, gxqli:__InputValue)
{
element gxqli:__InputValue
{
element gxqli:name
{
$arg/@name/string()
},
if ($arg/gxqls:description)
then element gxqli:description
{
$arg/gxqls:description/string()
} else (),
(
let $arg-type-name := $arg/gxqls:Type/@name/string()
let $root-type := $intro:SCHEMA/gxqls:types/child::*[@name/string() = $arg-type-name]
let $type :=
if ($root-type)
then
(
element {xs:QName('gxqls:'||$root-type/local-name())}
{
attribute kind {$arg/gxqls:Type/@kind/string()},
attribute name {$root-type/@name/string()}
}
)
else $arg/gxqls:Type
return
intro:build-type($type, 'type')
),
if ($arg/@default)
then element gxqli:defaultValue {$arg/@default/string()}
else ()
}
};
declare function intro:schema-field-resolver($field-name as xs:string) as xdmp:function
{
switch ($field-name)
case 'description'
return xdmp:function(xs:QName('intro:schema-description-resolver'))
case 'types'
return xdmp:function(xs:QName('intro:schema-types-resolver'))
case 'queryType'
return xdmp:function(xs:QName('intro:schema-queryType-resolver'))
case 'mutationType'
return xdmp:function(xs:QName('intro:schema-mutationType-resolver'))
case 'subscriptionType'
return xdmp:function(xs:QName('intro:schema-subscriptionType-resolver'))
case 'directives'
return xdmp:function(xs:QName('intro:schema-directives-resolver'))
default
return fn:error((), 'SCHEMA FIELD RESOLVER EXCEPTION', ("500", "Internal server error", "unsupported field: "||$field-name))
};
declare function intro:schema-description-resolver($schema as element(*, gxqli:__Schema), $var-map as map:map) as xs:string?
{
fn:head(($schema/gxqli:description/string(), ""))
};
declare function intro:schema-types-resolver($schema as element(*, gxqli:__Schema), $var-map as map:map) (:as element(*, gxqli:__Type)*:)
{
if ($schema/gxqli:types/*)
then
(
let $array := json:array()
let $_ :=
for $value in ($schema/gxqli:types/gxqli:queryType,
$schema/gxqli:types/gxqli:mutationType,
$schema/gxqli:types/gxqli:subscriptionType,
$schema/gxqli:types/gxqli:__Type)
return json:array-push($array, $value)
return $array
)
else json:array()
};
declare function intro:schema-queryType-resolver($schema as element(*, gxqli:__Schema), $var-map as map:map) as element(*, gxqli:__Type)
{
$schema/gxqli:types/gxqli:queryType
};
declare function intro:schema-mutationType-resolver($schema as element(*, gxqli:__Schema), $var-map as map:map) as element(*, gxqli:__Type)?
{
$schema/gxqli:types/gxqli:mutationType
};
declare function intro:schema-subscriptionType-resolver($schema as element(*, gxqli:__Schema), $var-map as map:map) as element(*, gxqli:__Type)?
{
$schema/gxqli:types/gxqli:subscriptionType
};
declare function intro:schema-directives-resolver($schema as element(*, gxqli:__Schema), $var-map as map:map)
{
if ($schema/gxqli:directives/*)
then
(
let $array := json:array()
let $_ :=
for $value in ($schema/gxqli:directives/gxqli:__Directive)
return json:array-push($array, $value)
return $array
)
else json:array()
};
declare function intro:type-field-resolver($field-name as xs:string) as xdmp:function
{
switch ($field-name)
case 'kind'
return xdmp:function(xs:QName('intro:type-kind-resolver'))
case 'name'
return xdmp:function(xs:QName('intro:type-name-resolver'))
case 'description'
return xdmp:function(xs:QName('intro:type-description-resolver'))
case 'fields'
return xdmp:function(xs:QName('intro:type-fields-resolver'))
case 'interfaces'
return xdmp:function(xs:QName('intro:type-interfaces-resolver'))
case 'possibleTypes'
return xdmp:function(xs:QName('intro:type-possibleTypes-resolver'))
case 'enumValues'
return xdmp:function(xs:QName('intro:type-enumValues-resolver'))
case 'inputFields'
return xdmp:function(xs:QName('intro:type-inputFields-resolver'))
case 'ofType'
return xdmp:function(xs:QName('intro:type-ofType-resolver'))
default
return fn:error((), 'TYPE FIELD RESOLVER EXCEPTION', ("500", "Internal server error", "unsupported field: "||$field-name))
};
declare function intro:type-kind-resolver($type as element(*, gxqli:__Type), $var-map as map:map) as xs:string
{
$type/gxqli:kind/string()
};
declare function intro:type-name-resolver($type as element(*, gxqli:__Type), $var-map as map:map) as xs:string?
{
$type/gxqli:name/string()
};
declare function intro:type-description-resolver($type as element(*, gxqli:__Type), $var-map as map:map) as xs:string?
{
fn:head(($type/gxqli:description/string(), ""))
};
declare function intro:type-fields-resolver($type as element(*, gxqli:__Type), $var-map as map:map) (:as element(*, gxqli:__Field)*:)
{
if ($type/gxqli:kind/string() = ('OBJECT', 'INTERFACE'))
then
(
if ($type/gxqli:fields/*)
then
(
let $array := json:array()
let $_ :=
for $value in $type/gxqli:fields/child::*
return json:array-push($array, $value)
return $array
)
else json:array()
)
else ()
};
declare function intro:type-interfaces-resolver($type as element(*, gxqli:__Type), $var-map as map:map) (:as element(*, gxqli:__Type)*:)
{
if ($type/gxqli:kind/string() = ('OBJECT', 'INTERFACE'))
then
(
if ($type/gxqli:interfaces/*)
then
(
let $array := json:array()
let $_ :=
for $value in $type/gxqli:interfaces/child::*
return json:array-push($array, $value)
return $array
)
else json:array()
)
else ()
};
declare function intro:type-possibleTypes-resolver($type as element(*, gxqli:__Type), $var-map as map:map) (:as element(*, gxqli:__Type)*:)
{
if ($type/gxqli:kind/string() = ('UNION', 'INTERFACE'))
then
(
if ($type/gxqli:possibleTypes/*)
then
(
let $array := json:array()
let $_ :=
for $value in $type/gxqli:possibleTypes/child::*
return json:array-push($array, $value)
return $array
)
else json:array()
)
else ()
};
declare function intro:type-enumValues-resolver($type as element(*, gxqli:__Type), $var-map as map:map) (:as element(*, gxqli:__EnumValue)*:)
{
if ($type/gxqli:kind/string() = 'ENUM')
then
(
if ($type/gxqli:enumValues/*)
then
(
let $array := json:array()
let $_ :=
for $value in $type/gxqli:enumValues/child::*
return json:array-push($array, $value)
return $array
)
else json:array()
)
else ()
};
declare function intro:type-inputFields-resolver($type as element(*, gxqli:__Type), $var-map as map:map) (:as element(*, gxqli:__InputValue)*:)
{
if ($type/gxqli:kind/string() = 'INPUT_OBJECT')
then
(
if ($type/gxqli:inputFields/*)
then
(
let $array := json:array()
let $_ :=
for $value in $type/gxqli:inputFields/child::*
return json:array-push($array, $value)
return $array
)
else json:array()
)
else ()
};
declare function intro:type-ofType-resolver($type as element(*, gxqli:__Type), $var-map as map:map) as element(*, gxqli:__Type)?
{
if ($type/gxqli:kind/string() = ('NON_NULL', 'LIST'))
then
(
if ($type/gxqli:ofType) then
element gxqli:__Type
{
element gxqli:kind { $type/gxqli:ofType/gxqli:kind/string() },
element gxqli:name { $type/gxqli:ofType/gxqli:name/string() }
}
else ()
)
else ()
};
declare function intro:type-resolver($var-map as map:map) as element(*, gxqli:__Type)
{
(: TODO: Implement caching mechanism :)
intro:build-type($intro:SCHEMA/gxqls:types/gxqls:*[@name/string() = map:get($var-map, 'name')])
};
declare function intro:field-field-resolver($field-name as xs:string) as xdmp:function
{
switch ($field-name)
case 'name'
return xdmp:function(xs:QName('intro:field-name-resolver'))
case 'description'
return xdmp:function(xs:QName('intro:field-description-resolver'))
case 'args'
return xdmp:function(xs:QName('intro:field-args-resolver'))
case 'type'
return xdmp:function(xs:QName('intro:field-type-resolver'))
case 'isDeprecated'
return xdmp:function(xs:QName('intro:field-isDeprecated-resolver'))
case 'deprecationReason'
return xdmp:function(xs:QName('intro:field-deprecationReason-resolver'))
default
return fn:error((), 'FIELD FIELD RESOLVER EXCEPTION', ("500", "Internal server error", "unsupported field: "||$field-name))
};
declare function intro:field-name-resolver($field as element(*, gxqli:__Field), $var-map as map:map) as xs:string
{
$field/gxqli:name/string()
};
declare function intro:field-description-resolver($field as element(*, gxqli:__Field), $var-map as map:map) as xs:string?
{
fn:head(($field/gxqli:description/string(), ""))
};
declare function intro:field-args-resolver($field as element(*, gxqli:__Field), $var-map as map:map) (:as element(*, gxqli:__InputValue)*:)
{
if ($field/gxqli:args/*)
then
(
let $array := json:array()
let $_ :=
for $item in $field/gxqli:args/gxqli:__InputValue
return json:array-push($array, $item)
return $array
)
else json:array()
};
declare function intro:field-type-resolver($field as element(*, gxqli:__Field), $var-map as map:map) as element(*, gxqli:__Type)
{
$field/gxqli:type
};
declare function intro:field-isDeprecated-resolver($field as element(*, gxqli:__Field), $var-map as map:map) as xs:boolean
{
$field/gxqli:isDeprecated
};
declare function intro:field-deprecationReason-resolver($field as element(*, gxqli:__Field), $var-map as map:map) as xs:string?
{
$field/gxqli:deprecationReason/string()
};
declare function intro:input-value-field-resolver($field-name) as xdmp:function
{
switch ($field-name)
case 'name'
return xdmp:function(xs:QName('intro:input-value-name-resolver'))
case 'description'
return xdmp:function(xs:QName('intro:input-value-description-resolver'))
case 'type'
return xdmp:function(xs:QName('intro:input-value-type-resolver'))
case 'defaultValue'
return xdmp:function(xs:QName('intro:input-value-defaultValue-resolver'))
default
return fn:error((), 'INPUT-VALUE FIELD RESOLVER EXCEPTION', ("500", "Internal server error", "unsupported field: "||$field-name))
};
declare function intro:input-value-name-resolver($input-value as element(*, gxqli:__InputValue), $var-map as map:map) as xs:string
{
$input-value/gxqli:name/string()
};
declare function intro:input-value-description-resolver($input-value as element(*, gxqli:__InputValue), $var-map as map:map) as xs:string?
{
fn:head(($input-value/gxqli:description/string(), ""))
};
declare function intro:input-value-type-resolver($input-value as element(*, gxqli:__InputValue), $var-map as map:map) as element(*, gxqli:__Type)
{
$input-value/gxqli:type
};
declare function intro:input-value-defaultValue-resolver($input-value as element(*, gxqli:__InputValue), $var-map as map:map) as xs:string?
{
$input-value/gxqli:defaultValue/string()
};
declare function intro:enum-value-field-resolver($field-name) as xdmp:function
{
switch ($field-name)
case 'name'
return xdmp:function(xs:QName('intro:enum-value-name-resolver'))
case 'description'
return xdmp:function(xs:QName('intro:enum-value-description-resolver'))
case 'isDeprecated'
return xdmp:function(xs:QName('intro:enum-value-is-deprecated-resolver'))
case 'deprecationReason'
return xdmp:function(xs:QName('intro:enum-value-deprecation-reason-resolver'))
default
return fn:error((), 'ENUM-VALUE FIELD RESOLVER EXCEPTION', ("500", "Internal server error", "unsupported field: "||$field-name))
};
declare function intro:enum-value-name-resolver($enum-value as element(*, gxqli:__EnumValue), $var-map as map:map) as xs:string
{
$enum-value/gxqli:name/string()
};
declare function intro:enum-value-description-resolver($enum-value as element(*, gxqli:__EnumValue), $var-map as map:map) as xs:string?
{
fn:head(($enum-value/gxqli:description/string(), ""))
};
declare function intro:enum-value-is-deprecated-resolver($enum-value as element(*, gxqli:__EnumValue), $var-map as map:map) as xs:boolean
{
$enum-value/gxqli:isDeprecated
};
declare function intro:enum-value-deprecation-reason-resolver($enum-value as element(*, gxqli:__EnumValue), $var-map as map:map) as xs:string?
{
$enum-value/gxqli:deprecationReason/string()
};
declare function intro:directive-field-resolver($field-name as xs:string) as xdmp:function
{
switch ($field-name)
case 'name'
return xdmp:function(xs:QName('intro:directive-name-resolver'))
case 'description'
return xdmp:function(xs:QName('intro:directive-description-resolver'))
case 'locations'
return xdmp:function(xs:QName('intro:directive-locations-resolver'))
case 'args'
return xdmp:function(xs:QName('intro:directive-args-resolver'))
case 'isRepeatable'
return xdmp:function(xs:QName('intro:directive-isRepeatable-resolver'))
default
return fn:error((), 'DIRECTIVE FIELD RESOLVER EXCEPTION', ("500", "Internal server error", "unsupported field: "||$field-name))
};
declare function intro:directive-name-resolver($directive as element(*, gxqli:__Directive), $var-map as map:map) as xs:string
{
$directive/gxqli:name/string()
};
declare function intro:directive-description-resolver($directive as element(*, gxqli:__Directive), $var-map as map:map) as xs:string?
{
fn:head(($directive/gxqli:description/string(), ""))
};
declare function intro:directive-locations-resolver($directive as element(*, gxqli:__Directive), $var-map as map:map)
{
if ($directive/gxqli:locations/gxqli:__DirectiveLocation)
then
(
let $array := json:array()
let $_ :=
for $item in $directive/gxqli:locations/gxqli:__DirectiveLocation/string()
return json:array-push($array, $item)
return $array
)
else json:array()
};
declare function intro:directive-args-resolver($directive as element(*, gxqli:__Directive), $var-map as map:map)
{
if ($directive/gxqli:args/*)
then
(
let $array := json:array()
let $_ :=
for $item in $directive/gxqli:args/gxqli:__InputValue
return json:array-push($array, $item)
return $array
)
else json:array()
};
declare function intro:directive-isRepeatable-resolver($directive as element(*, gxqli:__Directive), $var-map as map:map) as xs:boolean
{
$directive/gxqli:isRepeatable
}; | 34.899117 | 148 | 0.605095 |
b638c19b39c8ae559e5f9f23a02a89f1e5eec7f9 | 7,675 | xqy | XQuery | src/main/ml-modules/root/openapi/rxq2xqdoc2openapi-lib.xqy | lcahlander/sample-ml-gradle | b4570ea4f3eb0ee6304ff7ee7aa19bcbdfb1022a | [
"Apache-2.0"
] | 2 | 2019-02-20T16:30:41.000Z | 2021-02-16T08:15:40.000Z | src/main/ml-modules/root/openapi/rxq2xqdoc2openapi-lib.xqy | lcahlander/sample-ml-gradle | b4570ea4f3eb0ee6304ff7ee7aa19bcbdfb1022a | [
"Apache-2.0"
] | null | null | null | src/main/ml-modules/root/openapi/rxq2xqdoc2openapi-lib.xqy | lcahlander/sample-ml-gradle | b4570ea4f3eb0ee6304ff7ee7aa19bcbdfb1022a | [
"Apache-2.0"
] | null | null | null | xquery version "1.0-ml";
(:~
## RestXQ (RXQ) Module xqDoc to OpenAPI Display
This library module takes the xqDoc files with RXQ (%rxq:xxx) annotations to the
OpenAPI 3 JSON format for the OpenAPI UI webpage.
@author Loren Cahlander
@version 1.0
@since 1.0
@return the OpenAPI JSON document for the OpenAPI display
@see https://github.com/OAI/OpenAPI-Specification
@see https://github.com/lcahlander/xqdoc
:)
module namespace rxq2openapi="http://xqdoc.org/library/rxq/xqdoc/openapi";
import module namespace json = "http://marklogic.com/xdmp/json"
at "/MarkLogic/json/json.xqy";
declare default element namespace "http://marklogic.com/xdmp/json/basic";
declare namespace xqdoc="http://www.xqdoc.org/1.0";
(:~
:)
declare variable $rxq2openapi:service-names := ("rxq:GET", "rxq:HEAD", "rxq:PUT", "rxq:POST", "rxq:DELETE", "rxq:OPTIONS", "rxq:PATCH");
(:~
:)
declare function rxq2openapi:get-parameter-description($function as node(), $literal as node())
as xs:string
{
let $param-name := fn:substring-after(fn:substring-before(xs:string($literal), "}"), "{")
return rxq2openapi:get-string-parameter-description($function, $param-name)
};
(:~
:)
declare function rxq2openapi:get-string-parameter-description($function as node(), $param-name as xs:string)
as xs:string
{
let $param := $function/xqdoc:comment/xqdoc:param[fn:starts-with(., $param-name)]/text()
return
if ($param)
then replace(fn:substring-after($param, $param-name),'^\s+','')
else ""
};
(:~
:)
declare function rxq2openapi:schema-object($type as node())
as map:map
{
let $schema-object := map:map()
let $_type := map:put($schema-object, "type", $type/text())
let $_card :=
switch ($type/@occurrence/string())
case "*" return (map:put($schema-object, "minItems", 0))
case "+" return (map:put($schema-object, "minItems", 1))
case "?" return (map:put($schema-object, "minItems", 0), map:put($schema-object, "maxItems", 1))
default return (map:put($schema-object, "minItems", 1), map:put($schema-object, "maxItems", 1))
return $schema-object
};
(:~
:)
declare function rxq2openapi:parameter-object($name as xs:string, $in as xs:string, $description as xs:string?, $parameters as node()?)
as map:map
{
let $obj := map:map()
let $_name := map:put($obj, "name", $name)
let $_in := map:put($obj, "in", $in)
let $_desc := map:put($obj, "description", $description)
let $_param :=
if ($parameters/xqdoc:parameter[xqdoc:name = $name][xqdoc:type])
then map:put($obj, "schema", rxq2openapi:schema-object($parameters/xqdoc:parameter[xqdoc:name = $name]/xqdoc:type))
else ()
return $obj
};
(:~
@param $function The xqDoc element for a function
@param $path The %rest:path annotation string to extract the path parameters
@return the OpenAPI JSON for a service object for `get`, `put`, `post`, `delete`
:)
declare function rxq2openapi:service-object($function as node()?, $path as xs:string)
as map:map?
{
if ($function)
then
let $service-object := map:map()
let $path-parameters :=
for $token in fn:tokenize($path, "[{{}}]")[fn:starts-with(., "$")]
return if (fn:contains($token, "=")) then fn:substring-before($token, "=") else $token
let $responses-object := map:map()
let $_ := (
for $producer in $function//xqdoc:annotation[fn:starts-with(@name, "rxq:produces")]
return
for $literal in $producer/xqdoc:literal
return map:put($responses-object, xs:string($literal), map:map())
)
let $parameters-array := json:array()
let $_ := (
for $param in $function//xqdoc:annotation[fn:starts-with(@name, "rxq:query-param")]
let $name := $param/xqdoc:literal[1]/text()
let $description := rxq2openapi:get-parameter-description($function, $param/xqdoc:literal[2])
let $obj := rxq2openapi:parameter-object($name, "query", $description, $function//xqdoc:parameters)
let $_push := json:array-push($parameters-array, $obj)
return (),
for $param in $function//xqdoc:annotation[fn:starts-with(@name, "rxq:header-param")]
let $name := $param/xqdoc:literal[1]/text()
let $description := rxq2openapi:get-parameter-description($function, $param/xqdoc:literal[2])
let $obj := rxq2openapi:parameter-object($name, "header", $description, $function//xqdoc:parameters)
let $_push := json:array-push($parameters-array, $obj)
return (),
for $param in $function//xqdoc:annotation[fn:starts-with(@name, "rxq:cookie-param")]
let $name := $param/xqdoc:literal[1]/text()
let $description := rxq2openapi:get-parameter-description($function, $param/xqdoc:literal[2])
let $obj := rxq2openapi:parameter-object($name, "cookie", $description, $function//xqdoc:parameters)
let $_push := json:array-push($parameters-array, $obj)
return (),
for $param in $path-parameters
let $name := fn:substring($param, 2)
let $description := rxq2openapi:get-string-parameter-description($function, $param)
let $obj := rxq2openapi:parameter-object($name, "path", $description, $function//xqdoc:parameters)
let $_push := json:array-push($parameters-array, $obj)
return ()
)
let $_ := (
map:put($service-object, "description", fn:string-join($function/xqdoc:comment/xqdoc:description/text())),
map:put($service-object, "responses", $responses-object),
if (json:array-size($parameters-array) gt 0) then map:put($service-object, "parameters", $parameters-array) else ()
)
return $service-object
else ()
};
(:~
@return the OpenAPI JSON document for the OpenAPI display
:)
declare function rxq2openapi:process-rxq-to-xqDoc-to-OpenAPI()
as map:map
{
let $paths-object := map:map()
let $functions := fn:collection("xqdoc")/xqdoc:xqdoc/xqdoc:functions/xqdoc:function[xqdoc:annotations/xqdoc:annotation[@name = "rxq:path"]]
let $path-names :=
for $path in fn:distinct-values($functions//xqdoc:annotation[@name = "rxq:path"]/xqdoc:literal[1]/text())
order by $path
return $path
let $paths :=
for $path in $path-names
let $path-functions := $functions[xqdoc:annotations/xqdoc:annotation[@name = "rxq:path"][xqdoc:literal = $path]]
let $path-object := map:map()
let $services := (
if (fn:not($path-functions[xqdoc:annotations/xqdoc:annotation[@name = $rxq2openapi:service-names]]))
then
let $function := $path-functions[xqdoc:annotations/xqdoc:annotation[fn:not(@name = $rxq2openapi:service-names)]][1]
let $service-object := rxq2openapi:service-object($function, $path)
return
if (fn:exists($service-object))
then map:put($path-object, "get", $service-object)
else ()
else (),
for $service-name in $rxq2openapi:service-names
let $function := $path-functions[xqdoc:annotations/xqdoc:annotation[@name = $service-name]][1]
let $service-object := rxq2openapi:service-object($function, $path)
return
if (fn:exists($service-object))
then map:put($path-object, fn:lower-case(fn:substring-after($service-name, ":")), $service-object)
else ()
)
return map:put($paths-object, $path, $path-object)
return $paths-object
};
| 41.939891 | 140 | 0.627492 |
07d80891b3a4200ea6f8516ddca1bffa36fff031 | 5,051 | xqm | XQuery | src/main/lib/xqdoc-outputs.xqm | Quodatum/xqdoca | d56b248c9ca847a1870e0e15257d970032e7ce75 | [
"Apache-2.0"
] | 4 | 2019-06-08T12:00:45.000Z | 2020-01-06T22:19:28.000Z | src/main/lib/xqdoc-outputs.xqm | Quodatum/xqdoca | d56b248c9ca847a1870e0e15257d970032e7ce75 | [
"Apache-2.0"
] | 1 | 2021-03-10T17:37:41.000Z | 2021-03-10T17:37:41.000Z | src/main/lib/xqdoc-outputs.xqm | Quodatum/xqdoca | d56b248c9ca847a1870e0e15257d970032e7ce75 | [
"Apache-2.0"
] | null | null | null | xquery version "3.1";
(:
: Copyright (c) 2019-2021 Quodatum Ltd
:
: Licensed under the Apache License, Version 2.0 (the "License");
: you may not use this file except in compliance with the License.
: You may obtain a copy of the License at
:
: http://www.apache.org/licenses/LICENSE-2.0
:
: Unless required by applicable law or agreed to in writing, software
: distributed under the License is distributed on an "AS IS" BASIS,
: WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
: See the License for the specific language governing permissions and
: limitations under the License.
:)
(:~
: <h1>xqdoc-outputs.xqm</h1>
: <p>Load and run a set of generators</p>
:
: @author Andy Bunce
: @version 0.2
:)
module namespace xqo = 'quodatum:xqdoca.outputs';
(:~ xqdoca annotation namespace :)
declare namespace xqdoca="https://github.com/Quodatum/xqdoca";
(:~ annotation for module derived output :)
declare variable $xqo:module:=QName("https://github.com/Quodatum/xqdoca","module");
(:~ annotation for global derived output :)
declare variable $xqo:global:=QName("https://github.com/Quodatum/xqdoca","global");
(:~ annotation used to indicate serialization options :)
declare variable $xqo:ann-output:=QName("https://github.com/Quodatum/xqdoca","output");
(:~ defined serialization options :)
declare variable $xqo:outputs:=map{
"html5": map{"method": "html", "version":"5.0", "indent": "no"},
"xml": map{"indent": "no"},
"json": map{"method": "json"},
"text": map{"method": "text"}
};
(:~ save runtime support files to output
: @param $target destination folder
:)
declare %updating
function xqo:export-resources($target as xs:string)
as empty-sequence(){
let $res:=$target || "resources"
let $_:=trace($target,"target:")
let $_:=trace(resolve-uri('resources'),"src:")
return (
if(file:exists($res)) then file:delete($res,true()) else (),
file:copy(resolve-uri('resources'),$target)
)
};
(:~
: list xqdoca render functions found in the static context
:)
declare function xqo:renderers($funs as function(*)*, $qname as xs:QName)
as function(*)*
{
for $f in $funs
let $ann:=inspect:function-annotations($f)
where map:contains($ann,$qname) and map:contains($ann,$xqo:ann-output)
return $f
};
(:~
: info about a render function
:)
declare function xqo:render-map( $function as function(*)?)
as map(*){
let $ann:= inspect:function-annotations($function)
let $key:=if(map:contains($ann,$xqo:module)) then
$xqo:module
else if(map:contains($ann,$xqo:global)) then
$xqo:global
else
error(xs:QName("xqo:anno-map"))
return map{
"name": $ann?($key)[1],
"description": $ann?($key)[2],
"function": $function,
"type": $key,
"uri": $ann?($xqo:ann-output)[1],
"output": $ann?($xqo:ann-output)[2]
}
};
(:~
: render $outputs defined in $opts against state
: @return seq of outputs generated suitable for"storing"
:)
declare function xqo:render( $model as map(*),$opts as map(*))
as map(*)*
{
let $funs:=xqo:load-generators("generators/")
let $globals:=xqo:tokens($opts?outputs?global)
let $global:=(xqo:renderers($funs,$xqo:global)!xqo:render-map(.))[?name =$globals]
let $modules:=xqo:tokens($opts?outputs?module)
let $module:=(xqo:renderers($funs,$xqo:module)!xqo:render-map(.))[?name =$modules]
(: add found renderers info to opts :)
let $opts:=map:merge((map:entry(".renderers",map{"global":$global,"module":$module}),$opts))
return (
for $render in $global
let $doc:= apply($render?function,[$model,$opts])
return map{"document": $doc,
"uri": $render?uri,
"output":$xqo:outputs?($render?output)
},
for $render in $module, $file at $pos in $model?files
(: override opts for destination path :)
let $opts:=map:merge((
map{
"root": "../../",
"resources": "../../resources/"
}, $opts))
let $doc:= apply($render?function,[$file,$model,$opts])
return map{"document": $doc,
"uri": concat($file?href,"/",$render?uri),
"output": $xqo:outputs?($render?output)
}
)
};
(:~
: dynamically load functions from *.xqm modules from generators directory into static context
:)
declare function xqo:load-generators($path as xs:string)
as function(*)*
{
let $base:=resolve-uri($path,static-base-uri())
return file:list($base,true(),"*.xqm")
!translate(.,"\","/")
! inspect:functions(resolve-uri(.,$base))
};
(:~
: parse tokens
:)
declare function xqo:tokens($s as xs:string)
as xs:string*
{
$s=>normalize-space()=>tokenize("[\s,]+")
}; | 31.179012 | 101 | 0.594734 |
98247a15bec9bc21f48ce8bbd065cd3a0a5f89a6 | 2,447 | xqy | XQuery | src/app/views/layouts/bootstrap.html.xqy | freshie/ml-etymological | 624f767b45545f4dee89cc75a395671e50932701 | [
"Apache-2.0"
] | null | null | null | src/app/views/layouts/bootstrap.html.xqy | freshie/ml-etymological | 624f767b45545f4dee89cc75a395671e50932701 | [
"Apache-2.0"
] | null | null | null | src/app/views/layouts/bootstrap.html.xqy | freshie/ml-etymological | 624f767b45545f4dee89cc75a395671e50932701 | [
"Apache-2.0"
] | null | null | null | import module namespace vh = "http://marklogic.com/roxy/view-helper" at "/roxy/lib/view-helper.xqy";
declare variable $view as item()* := vh:get("view");
declare variable $title as xs:string? := (vh:get('title'), "Home")[1];
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<meta name="description" content=""/>
<meta name="author" content=""/>
<title>MarkLogic Etymological: {$title}</title>
<link href="/public/css/bootstrap.min.css" rel="stylesheet"/>
<link href="/public/css/main.css" rel="stylesheet"/>
</head>
<body xmlns="">
<nav class="navbar navbar-default " role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/">MarkLogic Etymological</a>
</div>
<div class="collapse navbar-collapse" id="navbar-collapse">
<ul class="nav navbar-nav">
<li>
<a href="/">Home</a>
</li>
<li>
<a href="/browse">Browse</a>
</li>
<li>
<form action="/search/" method="get" class="navbar-form">
<div class="scrollable-dropdown-menu">
<input type="text" name="keywords" value="" placeholder="Search" class="form-control typeahead"/>
<button class="hide" type="submit">Search</button>
</div>
</form>
</li>
</ul>
</div><!--/.nav-collapse -->
</div>
</nav>
<div class="container"><!-- view -->
{ $view }
</div><!-- /view -->
</body>
<script type="text/javascript" xmlns="">
var SITE = {{}};
</script>
<script type="text/javascript" src="/public/js/lib/bootstrap.min.js" xmlns=""></script>
<script type="text/javascript" src="/public/js/typeahead.bundle.js" xmlns=""></script>
<script type="text/javascript" src="/public/js/main.js" xmlns=""></script>
</html> | 41.474576 | 115 | 0.561095 |
8b8dae3d25459a6aa24508c156d9dc447a6bae58 | 412 | xq | XQuery | XQTS_1_0_2/Queries/XQuery/Functions/URIFunc/ResolveURIFunc/fn-resolve-uri-19.xq | StefH/XML-Query-Test-Suite-1.0 | 93321f9437b27a9b839842b0867ae462421514ee | [
"MIT"
] | null | null | null | XQTS_1_0_2/Queries/XQuery/Functions/URIFunc/ResolveURIFunc/fn-resolve-uri-19.xq | StefH/XML-Query-Test-Suite-1.0 | 93321f9437b27a9b839842b0867ae462421514ee | [
"MIT"
] | null | null | null | XQTS_1_0_2/Queries/XQuery/Functions/URIFunc/ResolveURIFunc/fn-resolve-uri-19.xq | StefH/XML-Query-Test-Suite-1.0 | 93321f9437b27a9b839842b0867ae462421514ee | [
"MIT"
] | null | null | null | (: Name: fn-resolve-uri-19 :)
(: Description: Evaluation of resolve-uri function with relative argument set to an absolute URI and given as an argument to fn:substring function (two argument version of function).:)
(: Use the fn-string function. :)
(: insert-start :)
declare variable $input-context1 external;
(: insert-end :)
fn:string(fn:resolve-uri(fn:substring("123http://www.examples.com",4),"")) | 45.777778 | 185 | 0.720874 |
e849be63d413c6a1500943e9743f2a2dfc72dd72 | 473 | xq | XQuery | test/xquery-update-10-test-suite/Queries/XQuery/ConditionalExpression/id-conditional-expr-04.xq | sthagen/zadean-xqerl | 81b874244b5d4803e15284b167e31b456a642b06 | [
"Apache-2.0"
] | 55 | 2017-09-13T15:26:28.000Z | 2022-03-11T19:57:10.000Z | test/xquery-update-10-test-suite/Queries/XQuery/ConditionalExpression/id-conditional-expr-04.xq | sthagen/zadean-xqerl | 81b874244b5d4803e15284b167e31b456a642b06 | [
"Apache-2.0"
] | 43 | 2017-11-16T22:43:15.000Z | 2022-03-21T08:37:03.000Z | test/xquery-update-10-test-suite/Queries/XQuery/ConditionalExpression/id-conditional-expr-04.xq | sthagen/zadean-xqerl | 81b874244b5d4803e15284b167e31b456a642b06 | [
"Apache-2.0"
] | 10 | 2019-03-27T19:29:19.000Z | 2022-03-10T23:19:18.000Z | (: Name: id-conditional-expr-04 :)
(: Description: Evaluation of insert expression used with conditional expression where a branch (the "else") is an updating expression. :)
(: The "then" returns fn:error(). :)
(: insert-start :)
declare variable $input-context external;
(: insert-end :)
if (fn:false()) then
fn:error(fn:QName('http://www.w3.org/2005/xqt-errors', 'err:FOER0000'))
else
insert node <hours>25</hours> into $input-context/works[1]/employee[2] | 39.416667 | 139 | 0.693446 |
964f2d15c942d912d52b5b5beefc2051acbcf79a | 72 | xq | XQuery | src/lang-xquery/test/resources/tests/parser/xquery-1.0/SchemaImport_WithAtSequence_Multiple_CompactWhitespace.xq | line-o/xquery-intellij-plugin | 256681e6a36c9878ae4c415f92b05eb4e24390b7 | [
"Apache-2.0"
] | 26 | 2016-11-30T17:26:29.000Z | 2022-01-24T09:42:48.000Z | src/lang-xquery/test/resources/tests/parser/xquery-1.0/SchemaImport_WithAtSequence_Multiple_CompactWhitespace.xq | line-o/xquery-intellij-plugin | 256681e6a36c9878ae4c415f92b05eb4e24390b7 | [
"Apache-2.0"
] | 145 | 2016-07-09T17:14:08.000Z | 2022-02-24T17:58:58.000Z | src/lang-xquery/test/resources/tests/parser/xquery-1.0/SchemaImport_WithAtSequence_Multiple_CompactWhitespace.xq | line-o/xquery-intellij-plugin | 256681e6a36c9878ae4c415f92b05eb4e24390b7 | [
"Apache-2.0"
] | 7 | 2018-04-28T17:27:51.000Z | 2021-11-17T14:11:19.000Z | import schema"http://www.example.com/test"at"/test.xsd","/app/test.xsd"; | 72 | 72 | 0.722222 |
f8f102a655e775cc09e216fc2d4d0ca70c305357 | 32 | xq | XQuery | src/lang-xquery/test/resources/tests/parser/xquery-4.0/EnumerationType_MissingNextType.xq | line-o/xquery-intellij-plugin | 256681e6a36c9878ae4c415f92b05eb4e24390b7 | [
"Apache-2.0"
] | 26 | 2016-11-30T17:26:29.000Z | 2022-01-24T09:42:48.000Z | src/lang-xquery/test/resources/tests/parser/xquery-4.0/EnumerationType_MissingNextType.xq | line-o/xquery-intellij-plugin | 256681e6a36c9878ae4c415f92b05eb4e24390b7 | [
"Apache-2.0"
] | 145 | 2016-07-09T17:14:08.000Z | 2022-02-24T17:58:58.000Z | src/lang-xquery/test/resources/tests/parser/xquery-4.0/EnumerationType_MissingNextType.xq | line-o/xquery-intellij-plugin | 256681e6a36c9878ae4c415f92b05eb4e24390b7 | [
"Apache-2.0"
] | 7 | 2018-04-28T17:27:51.000Z | 2021-11-17T14:11:19.000Z | 1 instance of enum ( "lorem" , ) | 32 | 32 | 0.625 |
6b67065f37bd476aaa91ff6963ca8b2b4531f45a | 478 | xq | XQuery | XQTS_1_0_2/Queries/XQuery/Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-865.xq | StefH/XML-Query-Test-Suite-1.0 | 93321f9437b27a9b839842b0867ae462421514ee | [
"MIT"
] | null | null | null | XQTS_1_0_2/Queries/XQuery/Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-865.xq | StefH/XML-Query-Test-Suite-1.0 | 93321f9437b27a9b839842b0867ae462421514ee | [
"MIT"
] | null | null | null | XQTS_1_0_2/Queries/XQuery/Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-865.xq | StefH/XML-Query-Test-Suite-1.0 | 93321f9437b27a9b839842b0867ae462421514ee | [
"MIT"
] | null | null | null | (:*******************************************************:)
(: Test: K-SeqExprCast-865 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:38+02:00 :)
(: Purpose: 'castable as' involving xs:time as source type and xs:decimal as target type should always evaluate to false. :)
(:*******************************************************:)
not(xs:time("03:20:00-05:00") castable as xs:decimal) | 68.285714 | 124 | 0.410042 |
b0b4cc8942076890536006a313faf61962b798d5 | 78 | xq | XQuery | test/queries/zorba/Queries/zorba/jsoniq/keys_04.xq | rrthomas/xqlint | 68bfa0e321cbc864f2484126fb6e51ae6a8242b6 | [
"Apache-2.0"
] | 94 | 2015-01-18T09:40:36.000Z | 2022-03-02T21:14:55.000Z | test/queries/zorba/Queries/zorba/jsoniq/keys_04.xq | rrthomas/xqlint | 68bfa0e321cbc864f2484126fb6e51ae6a8242b6 | [
"Apache-2.0"
] | 72 | 2015-01-05T22:00:31.000Z | 2021-07-17T11:35:03.000Z | test/queries/zorba/Queries/zorba/jsoniq/keys_04.xq | rrthomas/xqlint | 68bfa0e321cbc864f2484126fb6e51ae6a8242b6 | [
"Apache-2.0"
] | 27 | 2015-01-18T20:20:54.000Z | 2020-11-01T18:01:07.000Z | let $x := for $i in 1 to 10 return { 'foo' || $i : 'bar' || $i }
return $x()
| 19.5 | 64 | 0.461538 |
3a7d9898f5b4ef137dd2c738d7efd2174eda1d6e | 313 | xql | XQuery | packages/acs-workflow/www/admin/task-attribute-delete.xql | iuri/tutortronics | 463ea1535773d06ce34d269136eab3ecaffcb1cf | [
"Info-ZIP",
"ImageMagick"
] | null | null | null | packages/acs-workflow/www/admin/task-attribute-delete.xql | iuri/tutortronics | 463ea1535773d06ce34d269136eab3ecaffcb1cf | [
"Info-ZIP",
"ImageMagick"
] | null | null | null | packages/acs-workflow/www/admin/task-attribute-delete.xql | iuri/tutortronics | 463ea1535773d06ce34d269136eab3ecaffcb1cf | [
"Info-ZIP",
"ImageMagick"
] | null | null | null | <?xml version="1.0"?>
<queryset>
<fullquery name="panel_delete">
<querytext>
delete from wf_transition_attribute_map
where workflow_key = :workflow_key
and transition_key = :transition_key
and attribute_id = :attribute_id
</querytext>
</fullquery>
</queryset>
| 18.411765 | 43 | 0.651757 |
cc35cf220c6c3879b1d8405b19d5f7ffc8f5201d | 30 | xq | XQuery | test/queries/zorba/Queries/zorba/string/Regex/regex_m44.xq | rrthomas/xqlint | 68bfa0e321cbc864f2484126fb6e51ae6a8242b6 | [
"Apache-2.0"
] | 94 | 2015-01-18T09:40:36.000Z | 2022-03-02T21:14:55.000Z | test/queries/zorba/Queries/zorba/string/Regex/regex_m44.xq | rrthomas/xqlint | 68bfa0e321cbc864f2484126fb6e51ae6a8242b6 | [
"Apache-2.0"
] | 72 | 2015-01-05T22:00:31.000Z | 2021-07-17T11:35:03.000Z | test/queries/zorba/Queries/zorba/string/Regex/regex_m44.xq | rrthomas/xqlint | 68bfa0e321cbc864f2484126fb6e51ae6a8242b6 | [
"Apache-2.0"
] | 27 | 2015-01-18T20:20:54.000Z | 2020-11-01T18:01:07.000Z | fn:matches("ab", "((c)*?)*?e") | 30 | 30 | 0.433333 |
80aa6fef11339801ca717d9c9f9010abddb7ec80 | 434 | xq | XQuery | XQTS_1_0_2/Queries/XQuery/YearFromDateFunc/K-YearFromDateFunc-5.xq | StefH/XML-Query-Test-Suite-1.0 | 93321f9437b27a9b839842b0867ae462421514ee | [
"MIT"
] | null | null | null | XQTS_1_0_2/Queries/XQuery/YearFromDateFunc/K-YearFromDateFunc-5.xq | StefH/XML-Query-Test-Suite-1.0 | 93321f9437b27a9b839842b0867ae462421514ee | [
"MIT"
] | null | null | null | XQTS_1_0_2/Queries/XQuery/YearFromDateFunc/K-YearFromDateFunc-5.xq | StefH/XML-Query-Test-Suite-1.0 | 93321f9437b27a9b839842b0867ae462421514ee | [
"MIT"
] | null | null | null | (:*******************************************************:)
(: Test: K-YearFromDateFunc-5 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:40+02:00 :)
(: Purpose: A test whose essence is: `year-from-date(xs:date("2000-02-03")) eq 2000`. :)
(:*******************************************************:)
year-from-date(xs:date("2000-02-03")) eq 2000 | 62 | 88 | 0.359447 |
6d0d479981fedab2f954a224552a7ed3b7fdaf43 | 435 | xq | XQuery | XQTS_1_0_2/Queries/XQuery/Expressions/Operators/ArithExpr/NumericOpr/NumericSubtract/op-numeric-subtractmix2args-8.xq | StefH/XML-Query-Test-Suite-1.0 | 93321f9437b27a9b839842b0867ae462421514ee | [
"MIT"
] | null | null | null | XQTS_1_0_2/Queries/XQuery/Expressions/Operators/ArithExpr/NumericOpr/NumericSubtract/op-numeric-subtractmix2args-8.xq | StefH/XML-Query-Test-Suite-1.0 | 93321f9437b27a9b839842b0867ae462421514ee | [
"MIT"
] | null | null | null | XQTS_1_0_2/Queries/XQuery/Expressions/Operators/ArithExpr/NumericOpr/NumericSubtract/op-numeric-subtractmix2args-8.xq | StefH/XML-Query-Test-Suite-1.0 | 93321f9437b27a9b839842b0867ae462421514ee | [
"MIT"
] | null | null | null | (:*******************************************************:)
(: Test: op-numeric-subtractmix2args-8.xq :)
(: Written By: Ravindranath Chennoju :)
(: Date: Wed Feb 2 15:07:00 2005 :)
(: Purpose: Simple subtraction test, second operator is a node, atomizable but not castable to integer :)
(:*******************************************************:)
1 - <a> x </a>
| 39.545455 | 106 | 0.386207 |
17b68cac706afa81849f2a006c5cdb3ec486a3f7 | 161 | xq | XQuery | test/rbkt/Queries/zorba/caching/annotations-literals-04.xq | nachawati/zorba | f7719e4c0e6f03d9aa54a856bb9704c8bdfdfda3 | [
"Apache-2.0"
] | 94 | 2015-01-18T09:40:36.000Z | 2022-03-02T21:14:55.000Z | test/rbkt/Queries/zorba/caching/annotations-literals-04.xq | nachawati/zorba | f7719e4c0e6f03d9aa54a856bb9704c8bdfdfda3 | [
"Apache-2.0"
] | 72 | 2015-01-05T22:00:31.000Z | 2021-07-17T11:35:03.000Z | test/rbkt/Queries/zorba/caching/annotations-literals-04.xq | nachawati/zorba | f7719e4c0e6f03d9aa54a856bb9704c8bdfdfda3 | [
"Apache-2.0"
] | 27 | 2015-01-18T20:20:54.000Z | 2020-11-01T18:01:07.000Z | declare namespace an = "http://zorba.io/annotations";
declare %an:strictlydeterministic %an:exclude-from-cache-key(1) function local:foo()
{
1
};
local:foo() | 20.125 | 84 | 0.726708 |
394014813ecee8018bcf54e595b30361ff032574 | 456 | xq | XQuery | XQTS_1_0_2/Queries/XQuery/Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-133.xq | StefH/XML-Query-Test-Suite-1.0 | 93321f9437b27a9b839842b0867ae462421514ee | [
"MIT"
] | null | null | null | XQTS_1_0_2/Queries/XQuery/Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-133.xq | StefH/XML-Query-Test-Suite-1.0 | 93321f9437b27a9b839842b0867ae462421514ee | [
"MIT"
] | null | null | null | XQTS_1_0_2/Queries/XQuery/Expressions/seqExprTypes/SeqExprCast/K-SeqExprCast-133.xq | StefH/XML-Query-Test-Suite-1.0 | 93321f9437b27a9b839842b0867ae462421514ee | [
"MIT"
] | null | null | null | (:*******************************************************:)
(: Test: K-SeqExprCast-133 :)
(: Written by: Frans Englich :)
(: Date: 2006-10-05T18:29:37+02:00 :)
(: Purpose: A test whose essence is: `xs:string(xs:base64Binary(xs:hexBinary("3B"))) eq "Ow=="`. :)
(:*******************************************************:)
xs:string(xs:base64Binary(xs:hexBinary("3B"))) eq "Ow==" | 65.142857 | 99 | 0.366228 |
4ba005fdf0b981c6ca94ba2a1a7b2af6c6160e7f | 278 | xql | XQuery | packages/acs-workflow/www/admin/workflow-copy-2-postgresql.xql | iuri/tutortronics | 463ea1535773d06ce34d269136eab3ecaffcb1cf | [
"Info-ZIP",
"ImageMagick"
] | null | null | null | packages/acs-workflow/www/admin/workflow-copy-2-postgresql.xql | iuri/tutortronics | 463ea1535773d06ce34d269136eab3ecaffcb1cf | [
"Info-ZIP",
"ImageMagick"
] | null | null | null | packages/acs-workflow/www/admin/workflow-copy-2-postgresql.xql | iuri/tutortronics | 463ea1535773d06ce34d269136eab3ecaffcb1cf | [
"Info-ZIP",
"ImageMagick"
] | null | null | null | <?xml version="1.0"?>
<queryset>
<rdbms><type>postgresql</type><version>7.1</version></rdbms>
<fullquery name="package_id">
<querytext>
select package_id from apm_packages where package_key='acs-workflow' limit 1
</querytext>
</fullquery>
</queryset>
| 19.857143 | 77 | 0.672662 |
064a72d4bbe562759bfe4a5c42f9cbce67f9d5bb | 137 | xq | XQuery | src/test/resources/xmark/queries/orig/q07.xq | RishiKumarRay/brackit | ebc21b35fbee62b6f28a0e1f91f3545cfe223bc8 | [
"BSD-3-Clause"
] | 23 | 2019-04-26T14:45:40.000Z | 2022-03-08T17:42:51.000Z | src/test/resources/xmark/queries/orig/q07.xq | RishiKumarRay/brackit | ebc21b35fbee62b6f28a0e1f91f3545cfe223bc8 | [
"BSD-3-Clause"
] | 28 | 2020-05-03T21:05:58.000Z | 2022-03-26T14:31:11.000Z | src/test/resources/xmark/queries/orig/q07.xq | RishiKumarRay/brackit | ebc21b35fbee62b6f28a0e1f91f3545cfe223bc8 | [
"BSD-3-Clause"
] | 9 | 2017-03-25T19:15:26.000Z | 2022-01-18T15:27:05.000Z | let $auction := . return
for $p in $auction/site
return
count($p//description) + count($p//annotation) + count($p//emailaddress)
| 22.833333 | 75 | 0.656934 |
42645bf58567832ebe9c4f11deba6aac91f72cc0 | 415 | xq | XQuery | XQTS_1_0_2/Queries/XQuery/Expressions/Operators/SeqOp/SeqConcat/op-concatenate-mix-args-010.xq | StefH/XML-Query-Test-Suite-1.0 | 93321f9437b27a9b839842b0867ae462421514ee | [
"MIT"
] | null | null | null | XQTS_1_0_2/Queries/XQuery/Expressions/Operators/SeqOp/SeqConcat/op-concatenate-mix-args-010.xq | StefH/XML-Query-Test-Suite-1.0 | 93321f9437b27a9b839842b0867ae462421514ee | [
"MIT"
] | null | null | null | XQTS_1_0_2/Queries/XQuery/Expressions/Operators/SeqOp/SeqConcat/op-concatenate-mix-args-010.xq | StefH/XML-Query-Test-Suite-1.0 | 93321f9437b27a9b839842b0867ae462421514ee | [
"MIT"
] | null | null | null | (:*******************************************************:)
(: Test: op-concatenate-mix-args-010.xq :)
(: Written By: Pulkita Tyagi :)
(: Date: Thu May 12 23:38:31 2005 :)
(: Purpose: arg1: double, arg2: double, arg3:float :)
(:*******************************************************:)
xs:double("INF"), xs:double("-INF"), xs:float("-INF")
| 46.111111 | 60 | 0.337349 |
192651490a1d33fce6620a90c896bf598555ef18 | 135 | xq | XQuery | test/queries/zorba/Queries/zorba/ext_var/w3c/extvardef-012.xq | rrthomas/xqlint | 68bfa0e321cbc864f2484126fb6e51ae6a8242b6 | [
"Apache-2.0"
] | 94 | 2015-01-18T09:40:36.000Z | 2022-03-02T21:14:55.000Z | test/queries/zorba/Queries/zorba/ext_var/w3c/extvardef-012.xq | rrthomas/xqlint | 68bfa0e321cbc864f2484126fb6e51ae6a8242b6 | [
"Apache-2.0"
] | 72 | 2015-01-05T22:00:31.000Z | 2021-07-17T11:35:03.000Z | test/queries/zorba/Queries/zorba/ext_var/w3c/extvardef-012.xq | rrthomas/xqlint | 68bfa0e321cbc864f2484126fb6e51ae6a8242b6 | [
"Apache-2.0"
] | 27 | 2015-01-18T20:20:54.000Z | 2020-11-01T18:01:07.000Z | declare function local:aaa() { 1 };
declare variable $x external := local:bbb() + local:aaa();
declare function local:bbb() { 2 };
$x
| 27 | 58 | 0.659259 |
4ab93cc5dc9584dacae09263d79896c02469168f | 37,426 | xqm | XQuery | vleserver/entries.xqm | acdh-oeaw/vleserver_basex | 5cb4bb7884ff61e57cc730b12a253d30a873da27 | [
"MIT"
] | null | null | null | vleserver/entries.xqm | acdh-oeaw/vleserver_basex | 5cb4bb7884ff61e57cc730b12a253d30a873da27 | [
"MIT"
] | null | null | null | vleserver/entries.xqm | acdh-oeaw/vleserver_basex | 5cb4bb7884ff61e57cc730b12a253d30a873da27 | [
"MIT"
] | null | null | null | (:~
: API Problem and JSON HAL based API for editing dictionary like XML datasets.
:)
xquery version "3.1";
module namespace _ = 'https://www.oeaw.ac.at/acdh/tools/vle/entries';
import module namespace rest = "http://exquery.org/ns/restxq";
import module namespace req = "http://exquery.org/ns/request";
import module namespace hash = "http://basex.org/modules/hash";
import module namespace json-hal = 'https://tools.ietf.org/html/draft-kelly-json-hal-00' at 'json-hal.xqm';
import module namespace api-problem = "https://tools.ietf.org/html/rfc7807" at 'api-problem.xqm';
import module namespace util = "https://www.oeaw.ac.at/acdh/tools/vle/util" at 'util.xqm';
import module namespace cors = 'https://www.oeaw.ac.at/acdh/tools/vle/cors' at 'cors.xqm';
import module namespace data-access = "https://www.oeaw.ac.at/acdh/tools/vle/data/access" at 'data/access.xqm';
import module namespace cache = "https://www.oeaw.ac.at/acdh/tools/vle/data/cache" at 'data/cache.xqm';
import module namespace profile = "https://www.oeaw.ac.at/acdh/tools/vle/data/profile" at 'data/profile.xqm';
import module namespace types = "https://www.oeaw.ac.at/acdh/tools/vle/data/elementTypes" at 'data/elementTypes.xqm';
import module namespace lcks = "https://www.oeaw.ac.at/acdh/tools/vle/data/locks" at 'data/locks.xqm';
import module namespace plugins = "https://www.oeaw.ac.at/acdh/tools/vle/plugins/coordinator" at 'plugins/coordinator.xqm';
import module namespace validate = "https://www.oeaw.ac.at/acdh/tools/vle/data/validation" at 'data/validation.xqm';
import module namespace admin = "http://basex.org/modules/admin"; (: for logging :)
declare namespace http = "http://expath.org/ns/http-client";
declare namespace test = "http://exist-db.org/xquery/xqsuite";
declare namespace response-codes = "https://tools.ietf.org/html/rfc7231#section-6";
declare namespace entries = "https://www.oeaw.ac.at/acdh/tools/vle/entries";
declare variable $_:enable_trace := false();
declare variable $_:max_results_with_entries := 1000;
declare variable $_:dont_try_to_return_more_than := 200000;
(:~
: A list of all entries for a particular dictionary. TODO: Limit by query.
:
: There seems to be a limit of about 80 ids that can be specified at any one time.
: This will be the URI to search for a particular entry by numerous filter
: an search options.
: Search option are defined as queryTemplates in profiles. They can be used as
: name=value query parameters.
: Please note that a client sending Accept application/vnd.wde.v2+json
: is required to provide credentials. Use application/json or
: application/hal+json for unrestricted read access.
: @param $dict_name Name of an existing dictionary
: @param $pageSize Number of entries to return per request
: @param $page The page page to return based on the given pageSize
: @param $id Filter by ids starting with this string
: @param $ids Return entries matching exactly the ids provided as a comma separated list
: @param $q A name of a query template stored in the profile (everyone) or
: an XPath or XQuery to exeute as filter (only admins for this dict)
: @param $sort One of "asc", "desc" or "none" (everyone) or
: an XPath or XQuery to execute for sorting the filtered results (only admins for this dict)
: @param $altLemma A name of an alternative lemma definition to use (specified in profile)
: @param $lock true or an amount of time in seconds the selected entries should be locked for editing
: Only authenticated users.
: @param $auth_header Used to determine if user is allowed to use any XQuery or XPath for q and sort
: @param $accept Used to determine if the user was authenticated or is anonymous.
: @return A JSON HAL based list of entry URIs.
:)
declare
%rest:GET
%rest:path('/restvle/dicts/{$dict_name}/entries')
%rest:header-param('Authorization', '{$auth_header}', "")
%rest:header-param('Accept', '{$accept}')
%rest:query-param("page", "{$page}", 1)
%rest:query-param("pageSize", "{$pageSize}", 25)
%rest:query-param("id", "{$id}")
%rest:query-param("ids", "{$ids}")
%rest:query-param("q", "{$q}")
%rest:query-param("sort", "{$sort}")
%rest:query-param("altLemma", "{$altLemma}")
%rest:query-param("lock","{$lock}")
%test:arg("page", 1)
%test:arg("pageSize", 10)
%rest:produces('application/json')
%rest:produces('application/hal+json')
%rest:produces('application/vnd.wde.v2+json')
%rest:produces('application/problem+json')
%rest:produces('application/problem+xml')
function _:getDictDictNameEntries($dict_name as xs:string, $auth_header as xs:string,
$pageSize as xs:integer, $page as xs:integer,
$id as xs:string?, $ids as xs:string?,
$q as xs:string?, $sort as xs:string?,
$altLemma as xs:string?, $accept as xs:string*,
$lock as xs:string?) {
let $start-fun := prof:current-ns(),
$start := $start-fun,
$check_dict_exists := if (util:eval(``[db:exists("`{$dict_name}`__prof")]``, (), 'check-dict-'||$dict_name)) then true()
else error(xs:QName('response-codes:_404'),
$api-problem:codes_to_message(404),
'Dictionary '||$dict_name||' does not exist'),
$profile := profile:get($dict_name),
$query-templates := profile:get-query-templates($profile),
$query-template-name := if (empty($q)) then () else replace($q, '^([^=]+)=(.*)$', '$1'),
$query-value := if (empty($q)) then () else replace($q, '^([^=]+)=(.*)$', '$2'),
$check_authenticated_for_q_sort_xquery := if ((
(exists($q) and not($query-template-name = map:keys($query-templates))) or
(exists($sort) and not($sort = ("none", "asc", "desc"))))
and not($accept = 'application/vnd.wde.v2+json'))
then error(xs:QName('response-codes:_403'),
$api-problem:codes_to_message(403),
'XQuery for sort or q is only allowed if authenticated')
else true(),
$lockDuration := if ($lock castable as xs:integer) then
let $lockAsDuration := xs:dayTimeDuration('PT'||$lock||'S')
return if ($lockAsDuration > $lcks:maxLockTime) then $lcks:maxLockTime else $lockAsDuration
else if ($lock = 'true') then $lcks:maxLockTime
else (),
$check_authenticated_for_lock := if (exists($lockDuration) and not($accept = 'application/vnd.wde.v2+json'))
then error(xs:QName('response-codes:_403'),
$api-problem:codes_to_message(403),
'Locking entries is only allowed if authenticated')
else true(),
$q_is_a_query_template := if (exists($q) and not($query-template-name = map:keys($query-templates))) then
error(xs:QName('entries:not_implemented'), 'Not yet implemented')
else true(),
$additional_ret_query_parameters := if ($q) then map {'q': $q}
else if ($ids) then map {'ids': $ids}
else if ($id) then map {"id": $id}
else map {},
$id-is-not-empty-or-no-filter :=
if ($ids instance of xs:string) then
if ($ids ne '') then true()
else error(xs:QName('response-codes:_404'),
$api-problem:codes_to_message(404),
'ids= does not select anything')
else if ($id instance of xs:string) then
if (ends-with($id, '*')) then
if ($id ne '*') then true()
else error(xs:QName('response-codes:_400'),
$api-problem:codes_to_message(400),
'id=* is no useful filter')
else
if ($id ne '') then true()
else error(xs:QName('response-codes:_404'),
$api-problem:codes_to_message(404),
'id= does not select anything')
else true(),
$userName := _:getUserNameFromAuthorization($auth_header),
$total_items :=
if ($q instance of xs:string) then
data-access:count-entries-selected-by-query($dict_name, $profile, $query-templates($query-template-name), $query-value)
else if ($ids instance of xs:string) then
data-access:count-entries-by-ids($dict_name, tokenize($ids, '\s*,\s*'))
else if ($id instance of xs:string) then
if (ends-with($id, '*')) then
data-access:count-entries-by-id-starting-with($dict_name, substring-before($id, '*'))
else
data-access:count-entries-by-ids($dict_name, $id)
else if (exists($profile//useCache))
then cache:count-all-entries($dict_name)
else data-access:count-all-entries($dict_name),
$some_items_found := if ($total_items > 0) then true()
else error(xs:QName('response-codes:_404'),
$api-problem:codes_to_message(404),
'Your query did not yield any items.'),
$pageSize := max(($pageSize, 1)),
$page := min((xs:integer(ceiling($total_items div $pageSize)), max((1, $page)))),
$from := (($page - 1) * $pageSize) + 1,
$query-template := if (empty($query-template-name)) then () else $query-templates($query-template-name),
$relevant_nodes_or_dryed := if (exists($profile//useCache))
then _:get-dryed-from-cache($dict_name, $profile, $query-template, $query-value, $id, $ids, $sort, $altLemma, $from, $pageSize, $total_items)
else _:get-nodes-or-dryed-direct($dict_name, $profile, $query-template, $query-value, $id, $ids, $sort, $altLemma, $from, $pageSize, $total_items),
$relevant_dbs := distinct-values($relevant_nodes_or_dryed/@db_name/data()),
(: $log := _:write-log('Relevant DBs: '||string-join($relevant_dbs, ', '), 'INFO'), :)
$relevant_ids := for $nd in $relevant_nodes_or_dryed
return typeswitch ($nd)
case element(util:d) return $nd/(@xml:id|@ID)
default return $nd/(@xml:id|@ID),
(: $log := _:write-log('After relevant entries as attributes: '||((prof:current-ns() - $start) idiv 10000) div 100||' ms', 'INFO'),
$start := prof:current-ns(), :)
(: $log := _:write-log('Relevant IDs: '||string-join(data($relevant_ids), ', '), 'INFO'), :)
$lockEntry := if (exists($lockDuration)) then lcks:lock_entry($dict_name, _:getUserNameFromAuthorization($auth_header), data($relevant_ids), current-dateTime() + $lockDuration) else (),
$locked_entries := lcks:get_user_locking_entries($dict_name, data($relevant_ids)),
$xml_snippets := if ($pageSize <= $_:max_results_with_entries)
then data-access:get-entries-by-ids($dict_name, data($relevant_ids), $relevant_dbs, $_:max_results_with_entries)/*
else (),
$xml_snippets_without_sort_key := $xml_snippets transform with {
delete node ./@*[starts-with(local-name(), $util:vleUtilSortKey)]
},
(: $log := _:write-log('Before entries: '||((prof:current-ns() - $start) idiv 10000) div 100||' ms', 'INFO'),
$start := prof:current-ns(), :)
$label := if (exists($altLemma)) then '-'||$altLemma else '',
$entries_as_documents := for $id in $relevant_ids
(: $relevant_ids is sorted, so the sequence generated here is sorted as well. :)
return _:entryAsDocument(try {xs:anyURI(rest:uri()||'/'||data($id))} catch basex:http {xs:anyURI('urn:local')}, $id, $id/../@*[local-name() = $util:vleUtilSortKey||$label], $xml_snippets_without_sort_key[(@xml:id, @ID) = data($id)], $locked_entries($id))
(: , $log := _:write-log('Generate entries: '||((prof:current-ns() - $start) idiv 10000) div 100||' ms', 'INFO') :)
return api-problem:or_result($start-fun,
json-hal:create_document_list#7, [
try {rest:uri()} catch basex:http {xs:anyURI('urn:local')}, 'entries', array{$entries_as_documents}, $pageSize,
$total_items, $page, $additional_ret_query_parameters
], cors:header(())
)
};
declare function _:get-dryed-from-cache($dict_name as xs:string,
$profile as document-node(), $query-template as xs:string?, $query-value as xs:string?,
$id as xs:string?, $ids as xs:string*,
$sort as xs:string?, $label as xs:string?,
$from as xs:integer, $num as xs:integer, $total_items_expected as xs:integer) {
try {
if ($query-template instance of xs:string) then
error(xs:QName('cache:missing'), 'Not implemented yet')
else if ($ids instance of xs:string) then
cache:get-entries-by-ids($dict_name, tokenize($ids, '\s*,\s*'), $from, $num, $sort, $label, $total_items_expected)
else if ($id instance of xs:string) then
if (ends-with($id, '*')) then
cache:get-entries-by-id-starting-with($dict_name, substring-before($id, '*'), $from, $num, $sort, $label, $total_items_expected)
else
cache:get-entries-by-ids($dict_name, $id, $from, $num, $sort, $label, $total_items_expected)
else cache:get-all-entries($dict_name, $from, $num, $sort, $label, $total_items_expected)
} catch cache:missing {
_:write-log('cache miss', 'INFO'),
_:get-nodes-or-dryed-direct($dict_name, $profile, $query-template, $query-value, $id, $ids, $sort, $label, $from, $num, $total_items_expected)
}
};
declare %private function _:get-nodes-or-dryed-direct($dict_name as xs:string,
$profile as document-node(), $query-template as xs:string?, $query-value as xs:string?,
$id as xs:string?, $ids as xs:string*,
$sort as xs:string?, $label as xs:string?,
$from as xs:integer, $num as xs:integer,
$total_items_expected as xs:integer)
as element()* {
let (: $start := prof:current-ns(), :)
$total-items-expected-is-not-more-than := if ($total_items_expected <= $_:dont_try_to_return_more_than) then true()
else error(xs:QName('response-codes:_413'),
$api-problem:codes_to_message(413),
'You selected '||$total_items_expected||' entries which is more than the server can deliver ('||
$_:dont_try_to_return_more_than||').'||
'Use caching if you need to browse more entries.'),
$label := if (exists($label)) then '-'||$label else '',
$nodes_or_dryed := try {
if ($query-template instance of xs:string) then
data-access:get-entries-selected-by-query($dict_name, $profile, $query-template, $query-value)
else if ($ids instance of xs:string) then
data-access:get-entries-by-ids($dict_name, tokenize($ids, '\s*,\s*'))
else if ($id instance of xs:string) then
if (ends-with($id, '*')) then
data-access:get-entries-by-id-starting-with($dict_name, substring-before($id, '*'))
else
data-access:get-entries-by-ids($dict_name, $id)
else data-access:get-all-entries($dict_name)
} catch err:FODC0002 {
error(xs:QName('response-codes:_404'),
'Not found',
$err:additional)
},
(: $log := _:write-log('Got all entries: '||((prof:current-ns() - $start) idiv 10000) div 100||' ms', 'INFO'), :)
$nodes_or_dryed_sorted := switch($sort)
case "asc" return for $n in $nodes_or_dryed/*
order by $n/@*[local-name() = $util:vleUtilSortKey||$label]
return $n
case "desc" return for $n in $nodes_or_dryed/*
order by $n/@*[local-name() = $util:vleUtilSortKey||$label] descending
return $n
case "none" return $nodes_or_dryed/*
default return for $n in $nodes_or_dryed/*
order by $n/@*[local-name() = $util:vleUtilSortKey||$label]
return $n
return subsequence($nodes_or_dryed_sorted, $from, $num)
};
declare
%private
function _:entryAsDocument($_self as xs:anyURI, $id as xs:string, $lemma as xs:string, $entry as element()?, $isLockedBy as xs:string?) {
(# db:copynode false #) {
json-hal:create_document($_self, (
<id>{$id}</id>,
<sid>{$id}</sid>,
<lemma>{$lemma}</lemma>,
if (exists($entry//*:fs[@type='change']/*[@name='status'])) then
<status>{$entry//*:fs[@type='change']/*[@name='status']/*/@value/data()}</status> else (),
if (exists($entry//*:fs[@type='change']/*[@name='owner'])) then
<owner>{$entry//*:fs[@type='change']/*[@name='owner']/*/@value/data()}</owner> else (),
if (exists($isLockedBy)) then <locked>{$isLockedBy}</locked> else (),
if (exists($entry)) then
let $entry_as_txt := serialize($entry)
return (
<type>{types:get_data_type($entry)}</type>,
<entry>{$entry_as_txt}</entry>,
<storedEntryMd5>{string(xs:hexBinary(hash:md5($entry_as_txt)))}</storedEntryMd5>)
else ()))
}
};
(:~
: Creates a new dictionary entry.
: @param $userData JSON describing the new entry.
: @param $content-type Required to be application/json else returns 415.
: @param $wanted-response Required to be application/vnd.wde.v2+json else returns 403.
: @param $auth_header Required for getting the user for the changelog
: @error 403 if Accept is not application/vnd.wde.v2+json
: @error 415 if Content-Type is not application/json
: @error 422 if the supplied JSON is incorrect
: @return 201 Created
:)
declare
%rest:POST('{$userData}')
%rest:path('/restvle/dicts/{$dict_name}/entries')
%rest:header-param("Content-Type", "{$content-type}", "")
%rest:header-param("Accept", "{$wanted-response}", "")
%rest:header-param('Authorization', '{$auth_header}')
%rest:produces('application/vnd.wde.v2+json')
%rest:produces('application/problem+json')
%rest:produces('application/problem+xml')
%test:arg("userData", '{
"sid": "The internal ID. May be empty string.",
"lemma": "A lemma. May be empty string.",
"entry": "The entry as XML fragment."
} or
entries: [{
"sid": "The internal ID. May be empty string.",
"lemma": "A lemma. May be empty string.",
"entry": "The entry as XML fragment."
}]')
function _:createEntry($dict_name as xs:string, $userData, $content-type as xs:string, $wanted-response as xs:string, $auth_header as xs:string) {
let $start := prof:current-ns(),
$userName := _:getUserNameFromAuthorization($auth_header),
$check_content_type := if (starts-with($content-type,'application/json')) then true()
(: in this case $data is an element(json) :)
else error(xs:QName('response-codes:_415'),
'Content-Type needs to be application/json',
'Content-Type was: '||$content-type),
$entries := for $entry in $userData/json/entries/_
let $entryData := <_><json>{($userData/json/@*, $entry/*)}</json></_>
return _:checkPassedDataIsValid($dict_name, $entryData, $content-type, $wanted-response)
return if (exists($entries)) then
let $create_new_data as map(xs:string, map(xs:string, item()?)) := map:merge(for $entry in $entries
return map {$entry?id: map:merge((map { "as_document": _:entryAsDocument(try {xs:anyURI(rest:uri()||'/'||$entry?id)} catch basex:http {xs:anyURI('urn:local')}, $entry?id,
profile:extract-sort-values(profile:get($dict_name), $entry?entry)/@*[local-name() = $util:vleUtilSortKey], $entry?entry, ())}, $entry))}),
(: $log := _:write-log(serialize($create_new_data, map {'method': 'basex'}), 'INFO'), :)
$create_new := _:create_new_entries($create_new_data, $dict_name, $userName)
return api-problem:or_result($start,
json-hal:create_document_list#7, [
try {rest:uri()} catch basex:http {xs:anyURI('urn:local')}, 'entries', array{$create_new_data?*?as_document}, map:size($create_new_data),
map:size($create_new_data), 1, map {}
], cors:header(())
)
else
let $entry := _:checkPassedDataIsValid($dict_name, $userData, $content-type, $wanted-response),
$entry_data as map(xs:string, map(xs:string, item()?)) := map {$entry?id: $entry}
(: , $log := _:write-log(serialize($entry_data, map {'method': 'basex'}), 'INFO') :)
return api-problem:or_result($start, _:create_new_entries#3, [$entry_data, $dict_name, $userName], 201, cors:header(()))
};
(: $data: map(xs:string, map(xs:string, item()))
map {'id': map {entry: <xml></xml>
status: ()|xs:string
owner: ()|xs:string}
'id': ...}
:)
declare %private function _:create_new_entries($data as map(xs:string, map(xs:string, item()?)), $dict as xs:string, $changingUser as xs:string) {
let $savedEntries := data-access:create_new_entries($data, $dict, $changingUser),
$run_plugins := plugins:after_created($savedEntries, $dict, $changingUser)
(: , $log := _:write-log('entries:create_new_entries() $savedEntries := '||serialize($savedEntries, map{'method': 'basex'}), "DEBUG") :)
return map:for-each($savedEntries('current'), function($id, $savedEntry) {_:entryAsDocument(xs:anyURI(rest:uri()||'/'||$id), $id,
profile:extract-sort-values(profile:get($dict), $savedEntry?entry)/@*[local-name() = $util:vleUtilSortKey],
$savedEntry?entry, ())})
};
declare %private function _:checkPassedDataIsValid($dict_name as xs:string, $userData, $content-type as xs:string, $wanted-response as xs:string) as map(xs:string, item()?) {
let $check_dict_exists := if (util:eval(``[db:exists("`{$dict_name}`__prof")]``, (), 'check-dict-'||$dict_name)) then true()
else error(xs:QName('response-codes:_404'),
$api-problem:codes_to_message(404),
'Dictionary '||$dict_name||' is not yet created'),
$check_wanted := if ($wanted-response = "application/vnd.wde.v2+json") then true()
else error(xs:QName('response-codes:_403'),
'Only wde.v2 aware clients allowed',
'Accept has to be application/vnd.wde.v2+json.
'||
'Accept was :'||$wanted-response),
$check_content_type := if (starts-with($content-type,'application/json')) then true()
(: in this case $data is an element(json) :)
else error(xs:QName('response-codes:_415'),
'Content-Type needs to be application/json',
'Content-Type was: '||$content-type),
$check_json := if (exists($userData/json/sid) and
exists($userData/json/lemma) and
exists($userData/json/entry)) then true()
else error(xs:QName('response-codes:_422'),
'Wrong JSON object',
``[Need a {
"sid": "The internal ID. May be empty string.",
"lemma": "A lemma. May be empty string.",
"entry": "The entry as XML fragment."
} object.
]``||
'JSON was: '||serialize($userData, map{'method': 'json'})),
$entry := try {parse-xml-fragment($userData/json/entry/text())
} catch * {
error(xs:QName('response-codes:_422'),
'Entry is not parseable as XML'||$err:additional,
'Need some well formed XML. '||
'XML was: '||$userData/json/entry/text()||'
'||
$err:additional)
},
$testfortextnodeonly := if ($entry/child::node() instance of text()) then error(xs:QName('response-codes:_422'),'Error during parsing','Data consists only of text - no markup') else(),
$check_new_node_has_id := if (exists($entry/*/(@ID, @xml:id))) then true()
else error(xs:QName('response-codes:_422'),
'@xml:id or @ID missing on data node'||serialize($entry),
'Element '||$entry/local-name()||' needs to have either an xml:id attribute or an ID attribute.'),
$check_id_matches_xml_id_if_exists := if (not(exists($userData/json/id)) or $entry/*/(@ID, @xml:id)/data() eq $userData/json/id) then true()
else error(xs:QName('response-codes:_422'),
'@xml:id or @ID '||$entry/*/(@ID, @xml:id)/data()||'does not match JSON id '||xs:string($userData/json/id),
'Element '||$entry/local-name()||' needs to have the same xml:id attribute or an ID attribute value as the JSON id'||xs:string($userData/json/id)||' provided.'),
$entry_type := types:get_data_type_of_document($entry),
$validation := if ($entry_type = 'entry') then validate:xml(profile:get($dict_name), $entry)
return map{
'id': xs:string($entry/*/(@xml:id, @ID)),
'sid': xs:string($userData/json/sid),
'lemma': xs:string($userData/json/lemma),
'entry': $entry/*,
'status': xs:string($userData/json/status),
'owner': xs:string($userData/json/owner),
'storedEntryMd5': xs:string($userData/json/storedEntryMd5)
}
};
declare %private function _:getUserNameFromAuthorization($auth_header as xs:string) as xs:string {
let $name_pw := tokenize(util:basic-auth-decode($auth_header), ':')
(: Digest username="UserNameFromAuthorization", .... :)
return $name_pw[1]
};
(:~
: Change entries in a dictionary.
:
: The entries are saved in the changelog db before they is changed .
: The authorized user has to own the lock for all the entries to do this.
: Otherwise a 422 error is returned.
: @param $userData JSON describing the changed entry.
: @param $id The @xml:id or @ID of the entry to be changed.
: @param $content-type Required to be application/json else returns 415.
: @param $wanted-response Required to be application/vnd.wde.v2+json else returns 403.
: @param $auth_header Required for getting the user for the changelog.
: @error 403 if Accept is not application/vnd.wde.v2+json
: @error 409 if any of the optionally sent checksums do not match
: @error 415 if Content-Type is not application/json
: @error 422 if the supplied JSON is incorrect
: @return The changed entry. Including the changelog entry the server generated.
:)
declare
%rest:method('PATCH', '{$userData}')
%rest:path('/restvle/dicts/{$dict_name}/entries')
%rest:header-param("Content-Type", "{$content-type}", "")
%rest:header-param("Accept", "{$wanted-response}", "")
%rest:header-param('Authorization', '{$auth_header}', "")
%rest:produces('application/vnd.wde.v2+json')
%rest:produces('application/problem+json')
%rest:produces('application/problem+xml')
%test:arg("userData", '{entries: [{
"id": "The xml:id of the entry to change",
"sid": "The internal ID. May be empty string.",
"lemma": "A lemma. May be empty string.",
"entry": "The entry as XML fragment.",
"storedEntryMd5": "Optional: the last known checksum for the entry in the DB.",
"owner": "Optional: set (or clear) the owner of an entry. TODO: enforce only write own",
"status": "Optional: set (or clear) a status string. 'released' was used with some special meaning in the past"
}]}')
function _:changeEntries($dict_name as xs:string, $userData, $content-type as xs:string, $wanted-response as xs:string, $auth_header as xs:string) as item()+ {
let $start := prof:current-ns(),
$userName := _:getUserNameFromAuthorization($auth_header),
$check_content_type := if (starts-with($content-type,'application/json')) then true()
(: in this case $data is an element(json) :)
else error(xs:QName('response-codes:_415'),
'Content-Type needs to be application/json',
'Content-Type was: '||$content-type),
$check_if_entries_array_exists := if (exists($userData/json/entries)) then true()
else error(xs:QName('response-codes:_422'),
'No entries to change found.',
'Entries need to be sent as {"entries": [{"id": ...}, {"id": ...}]}. Was: '||serialize($userData/json, map{'method': 'json'})),
$ids := $userData/json/entries/_/id!xs:string(.),
$check_there_are_ids := if (exists($ids)) then true()
else error(xs:QName('response-codes:_422'),
'No IDs specified in request.',
'Entries need to be sent as {"entries": [{"id": ...}, {"id": ...}]}. Was: '||serialize($userData/json, map{'method': 'json'})),
$entries := for $entry in $userData/json/entries/_
let $entryData := <_><json>{($userData/json/@*, $entry/*)}</json></_>
return _:checkPassedDataIsValid($dict_name, $entryData, $content-type, $wanted-response),
$lockedBy := lcks:get_user_locking_entries($dict_name, $userData/json/entries/_/id)
(: return $lockedBy :)
, $checkLockedByCurrentUser := if ($userName = $lockedBy?*) then true()
else error(xs:QName('response-codes:_422'),
'You don't own the lock for all the entries',
'Entries are currently locked by "'||string-join($lockedBy?*, '", "')||'"'),
$changes_data as map(xs:string, map(xs:string, item()?)) := map:merge(for $entry in $entries
return map {$entry?id: map:merge((map {"as_document": _:entryAsDocument(try {xs:anyURI(rest:uri()||'/'||$entry?id)} catch basex:http {xs:anyURI('urn:local')}, $entry?id,
profile:extract-sort-values(profile:get($dict_name), $entry?entry)/@*[local-name() = $util:vleUtilSortKey], $entry?entry, ())}, $entry))}),
(: $log := _:write-log(serialize($changes_data, map {'method': 'basex'}), 'INFO'), :)
$entries_as_documents := _:change_entries($changes_data, $dict_name, $userName)
return api-problem:or_result($start,
json-hal:create_document_list#7, [
try {rest:uri()} catch basex:http {xs:anyURI('urn:local')}, 'entries', array{$entries_as_documents}, count($entries_as_documents),
count($entries_as_documents), 1, map {}
], cors:header(())
)
};
declare %private function _:change_entries($data as map(xs:string, map(xs:string, item()?)), $dict as xs:string, $changingUser as xs:string) {
let $savedEntry := data-access:change_entries($data, $dict, $changingUser),
(: $log := _:write-log(serialize($savedEntry, map{'method': 'basex'}), 'INFO'), :)
$run_plugins := plugins:after_updated($savedEntry, $dict, $changingUser)
return map:for-each($savedEntry('current'), function($id, $data) {_:entryAsDocument(xs:anyURI(rest:uri()||'/'||$id), $id,
profile:extract-sort-values(profile:get($dict), $data?entry)/@*[local-name() = $util:vleUtilSortKey],
$data?entry, ())})
};
(:~
: Change a dictionary entry.
:
: The entry is saved in the changelog db before it is changed .
: The authorized user has to own the lock to do this.
: Otherwise a 422 error is returned.
: @param $userData JSON describing the changed entry.
: @param $id The @xml:id or @ID of the entry to be changed.
: @param $content-type Required to be application/json else returns 415.
: @param $wanted-response Required to be application/vnd.wde.v2+json else returns 403.
: @param $auth_header Required for getting the user for the changelog.
: @error 403 if Accept is not application/vnd.wde.v2+json
: @error 409 if any of the optionally sent checksums do not match
: @error 415 if Content-Type is not application/json
: @error 422 if the supplied JSON is incorrect
: @return The changed entry. Including the changelog entry the server generated.
:)
declare
%rest:PUT('{$userData}')
%rest:path('/restvle/dicts/{$dict_name}/entries/{$id}')
%rest:header-param("Content-Type", "{$content-type}", "")
%rest:header-param("Accept", "{$wanted-response}", "")
%rest:header-param('Authorization', '{$auth_header}', "")
%rest:produces('application/vnd.wde.v2+json')
%rest:produces('application/problem+json')
%rest:produces('application/problem+xml')
%test:arg("userData", '{
"sid": "The internal ID. May be empty string.",
"lemma": "A lemma. May be empty string.",
"entry": "The entry as XML fragment.",
"storedEntryMd5": "Optional: the last known checksum for the entry in the DB.",
"owner": "Optional: set (or clear) the owner of an entry. TODO: enforce only write own",
"status": "Optional: set (or clear) a status string. 'released' was used with some special meaning in the past"
}')
function _:changeEntry($dict_name as xs:string, $id as xs:string, $userData, $content-type as xs:string, $wanted-response as xs:string, $auth_header as xs:string) as item()+ {
let $start := prof:current-ns(),
$userName := _:getUserNameFromAuthorization($auth_header),
$entry := _:checkPassedDataIsValid($dict_name, $userData, $content-type, $wanted-response),
$lockedBy := lcks:get_user_locking_entry($dict_name, $id),
$checkLockedByCurrentUser := if ($userName = $lockedBy) then true()
else error(xs:QName('response-codes:_422'),
'You don't own the lock for this entry',
'Entry is currently locked by "'||$lockedBy||'"'),
$change_data as map(xs:string, map(xs:string, item()?)) :=
map { $entry?id: $entry}
return api-problem:or_result($start, _:change_entries#3, [$change_data, $dict_name, $userName], 200, cors:header(()))
};
(:~
: Get a particular entry from a dictionary.
:
: Please note that a client sending Accept application/vnd.wde.v2+json
: is required to provide credentials. Use application/json or
: application/hal+json for unrestricted read access.
: To later save the changed entry it has to be locked using the lock parameter.
: This parameter can only be used by clients that accept
: application/vnd.wde.v2+json thus credentials are required
: @param $dict_name Name of an existing dictionary.
: @param $id The @xml:id or @ID of the entry to be changed.
: @param $lock Whether to lock the entry for later saving it.
:
: Can be a time in seconds that tells how long the entry should be
: locked. Can be true for the maximum amount of time allowed.
: After at most that timeout the entry needs to be locked again using
: this function.
: @param $wanted-response Required to be application/vnd.wde.v2+json else returns 403.
: @param $auth_header Required for locking the entry otherwise unused.
: @return A JSON HAL document containing the entry XML and further extracted data.
:)
declare
%rest:GET
%rest:path('/restvle/dicts/{$dict_name}/entries/{$id}')
%rest:query-param("lock", "{$lock}")
%rest:header-param("Accept", "{$wanted-response}", "")
%rest:header-param('Authorization', '{$auth_header}', "")
%rest:produces('application/json')
%rest:produces('application/hal+json')
%rest:produces('application/vnd.wde.v2+json')
%rest:produces('application/problem+json')
%rest:produces('application/problem+xml')
function _:getDictDictNameEntry($dict_name as xs:string, $id as xs:string, $lock as xs:string?, $wanted-response as xs:string+, $auth_header as xs:string) {
try {
let $start := prof:current-ns(),
$lockDuration := if ($lock castable as xs:integer) then
let $lockAsDuration := xs:dayTimeDuration('PT'||$lock||'S')
return if ($lockAsDuration > $lcks:maxLockTime) then $lcks:maxLockTime else $lockAsDuration
else if ($lock = 'true') then $lcks:maxLockTime
else (),
$checkLockingAllowed := if (not(exists($lockDuration)) or $wanted-response = 'application/vnd.wde.v2+json') then true()
else error(xs:QName('response-codes:_403'),
$api-problem:codes_to_message(403),
'Only wde.v2 clients may request locking'),
$lockEntry := if (exists($lockDuration)) then lcks:lock_entry($dict_name, _:getUserNameFromAuthorization($auth_header), $id, current-dateTime() + $lockDuration) else (),
$entry := data-access:get-entry-by-id($dict_name, $id),
$lockedBy := lcks:get_user_locking_entry($dict_name, $entry/(@xml:id, @ID))
return api-problem:or_result($start, _:entryAsDocument#5, [rest:uri(), $entry/(@xml:id, @ID),
profile:extract-sort-values(profile:get($dict_name), $entry)/@*[local-name() = $util:vleUtilSortKey],
$entry, $lockedBy], cors:header(()))
} catch lcks:held {
error(xs:QName('response-codes:_422'),
'You cannot lock entry '||$id,
'Entry is currently locked by "'||$err:value('user')||'"')
}
};
(:~
: Remove an entry.
:
: The entry is saved in the changelog db before it is removed.
: The authorized user has to won the lock to do this.
: Otherwise a 422 error is returned.
: @param $dict_name Name of an existing dictionary
: @param $id The @xml:id or @ID of the entry to be deleted.
: @param $auth_header Required for getting the user for the changelog.
: @return 204 No Content
:)
declare
%rest:DELETE
%rest:path('/restvle/dicts/{$dict_name}/entries/{$id}')
%rest:header-param('Authorization', '{$auth_header}', "")
function _:deleteDictDictNameEntry($dict_name as xs:string, $id as xs:string, $auth_header as xs:string) {
let $start := prof:current-ns(),
$userName := _:getUserNameFromAuthorization($auth_header),
$lockedBy := lcks:get_user_locking_entry($dict_name, $id),
$checkLockedByCurrentUser := if ($userName = $lockedBy) then true()
else error(xs:QName('response-codes:_422'),
'You don't own the lock for this entry',
'Entry is currently locked by "'||$lockedBy||'"')
return api-problem:or_result($start, _:delete_entry#3, [$dict_name, $id, $userName], cors:header(()))
};
declare %private function _:delete_entry($dict as xs:string, $id as xs:string, $changingUser as xs:string) {
let $ret := data-access:delete_entry($dict, $id, $changingUser)
return (plugins:after_deleted($dict, $id, $ret('db_name'), $changingUser), $ret('api-response'))
};
declare %private function _:write-log($message as xs:string, $severity as xs:string) {
if ($_:enable_trace) then admin:write-log($message, $severity) else ()
};
declare %private function _:write-log($message as xs:string) {
if ($_:enable_trace) then admin:write-log($message, "TRACE") else ()
}; | 57.490015 | 262 | 0.649121 |
871dfd79c54ab8b96ff24fe763800c031514bbb6 | 39 | xq | XQuery | test/xqlint_queries/2.xq | rrthomas/xqlint | 68bfa0e321cbc864f2484126fb6e51ae6a8242b6 | [
"Apache-2.0"
] | null | null | null | test/xqlint_queries/2.xq | rrthomas/xqlint | 68bfa0e321cbc864f2484126fb6e51ae6a8242b6 | [
"Apache-2.0"
] | 6 | 2022-01-20T17:35:11.000Z | 2022-02-19T22:56:47.000Z | test/xqlint_queries/2.xq | rrthomas/xqlint | 68bfa0e321cbc864f2484126fb6e51ae6a8242b6 | [
"Apache-2.0"
] | null | null | null | for $j in 1
group by $i := 1
return $j
| 9.75 | 16 | 0.589744 |
70ab7e292699ba086d31328cad892d5625475761 | 75 | xq | XQuery | test/queries/zorba/Queries/zorba/serialization/cloudscript/multiple1.xq | rrthomas/xqlint | 68bfa0e321cbc864f2484126fb6e51ae6a8242b6 | [
"Apache-2.0"
] | 94 | 2015-01-18T09:40:36.000Z | 2022-03-02T21:14:55.000Z | test/queries/zorba/Queries/zorba/serialization/cloudscript/multiple1.xq | rrthomas/xqlint | 68bfa0e321cbc864f2484126fb6e51ae6a8242b6 | [
"Apache-2.0"
] | 72 | 2015-01-05T22:00:31.000Z | 2021-07-17T11:35:03.000Z | test/queries/zorba/Queries/zorba/serialization/cloudscript/multiple1.xq | rrthomas/xqlint | 68bfa0e321cbc864f2484126fb6e51ae6a8242b6 | [
"Apache-2.0"
] | 27 | 2015-01-18T20:20:54.000Z | 2020-11-01T18:01:07.000Z | (: By default, multiple top-level JSON items raises an error. :)
[1], [2]
| 18.75 | 64 | 0.653333 |
a7a03a3ae44f42d1820697d9251c40d681fd1203 | 154 | xq | XQuery | AIRAdapter/Resources/template/SetPSOFaultTemplate.xq | ibrahimker/OSB-to-AIR-Adapter | 5899c1568b328efffd5135d33aafe90db5192976 | [
"MIT"
] | null | null | null | AIRAdapter/Resources/template/SetPSOFaultTemplate.xq | ibrahimker/OSB-to-AIR-Adapter | 5899c1568b328efffd5135d33aafe90db5192976 | [
"MIT"
] | null | null | null | AIRAdapter/Resources/template/SetPSOFaultTemplate.xq | ibrahimker/OSB-to-AIR-Adapter | 5899c1568b328efffd5135d33aafe90db5192976 | [
"MIT"
] | null | null | null | <get:SetPSOResponse xmlns:get="http://www.example.org/SetPSO/">
<status>99</status>
<description>Backend Not Available</description>
</get:SetPSOResponse> | 38.5 | 63 | 0.779221 |
565bf8a7eb3524a358b8a7d238f748a95fb51fba | 3,526 | xq | XQuery | FDA_SEND_Validator_Rules_v1.3_October_2018/XQuery/SD1041_JA.xq | JozefAerts/OpenRules4CRStandards | 6f4b534db70e929c5eae8faf18bce4424e8d3e73 | [
"Apache-2.0"
] | 4 | 2020-06-24T05:19:32.000Z | 2020-12-15T12:34:40.000Z | FDA_SEND_Validator_Rules_v1.3_October_2018/XQuery/SD1041_JA.xq | JozefAerts/OpenRules4CRStandards | 6f4b534db70e929c5eae8faf18bce4424e8d3e73 | [
"Apache-2.0"
] | null | null | null | FDA_SEND_Validator_Rules_v1.3_October_2018/XQuery/SD1041_JA.xq | JozefAerts/OpenRules4CRStandards | 6f4b534db70e929c5eae8faf18bce4424e8d3e73 | [
"Apache-2.0"
] | 1 | 2020-06-22T16:01:37.000Z | 2020-06-22T16:01:37.000Z | (: Copyright 2020 Jozef Aerts.
Licensed under the Apache License, Version 2.0 (the "License");
You may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and limitations under the License.
:)
(: Rule : SD1041: Values for --CAT and --SCAT are identical -
Applies to INTERVENTIONS, EVENTS, FINDINGS, TI :)
xquery version "3.0";
declare namespace def = "http://www.cdisc.org/ns/def/v2.0";
declare namespace def21 = "http://www.cdisc.org/ns/def/v2.1";
declare namespace odm="http://www.cdisc.org/ns/odm/v1.3";
declare namespace data="http://www.cdisc.org/ns/Dataset-XML/v1.0";
declare namespace xlink="http://www.w3.org/1999/xlink";
(: "declare variable ... external" allows to pass $base and $define from an external programm :)
declare variable $base external;
declare variable $define external;
declare variable $defineversion external;
(: let $base := '/db/fda_submissions/cdisc01/'
let $define := 'define2-0-0-example-sdtm.xml' :)
(: get the define.xml document :)
let $definedoc := doc(concat($base,$define))
(: iterate over the dataset definitions in INTERVENTIONS, EVENTS, FINDINGS, TI :)
for $datasetdef in $definedoc//odm:ItemGroupDef[upper-case(@def:Class)='INTERVENTIONS' or upper-case(@def:Class)='EVENTS' or upper-case(@def:Class)='FINDINGS'
or upper-case(./def21:Class/@Name)='INTERVENTIONS' or upper-case(./def21:Class/@Name)='EVENTS' or upper-case(./def21:Class/@Name)='FINDINGS'
or @Domain='TI']
(: get the name of the dataset :)
let $name := $datasetdef/@Name
(: get the OIDs of the --CAT and --SCAT variables :)
let $catoid := (
for $a in $definedoc//odm:ItemDef[ends-with(@Name,'CAT') and string-length(@Name)=5]/@OID
where $a = $datasetdef/odm:ItemRef/@ItemOID
return $a
)
let $catname := $definedoc//odm:ItemDef[@OID=$catoid]/@Name
let $scatoid := (
for $a in $definedoc//odm:ItemDef[ends-with(@Name,'SCAT') and string-length(@Name)=6]/@OID
where $a = $datasetdef/odm:ItemRef/@ItemOID
return $a
)
let $scatname := $definedoc//odm:ItemDef[@OID=$scatoid]/@Name
(: get the location of the dataset :)
let $datasetlocation := (
if($defineversion='2.1') then $datasetdef/def21:leaf/@xlink:href
else $datasetdef/def:leaf/@xlink:href
)
(: and the dataset document itself :)
let $datasetdoc := (
if($datasetlocation) then doc(concat($base,$datasetlocation))
else ()
)
(: iterate over all the records in the dataset, at least when --CAT and --SCAT have been defined for the dataset :)
for $record in $datasetdoc[$catoid and $scatoid]//odm:ItemGroupData
let $recnum := $record/@data:ItemGroupDataSeq
(: get the values of --CAT and of --SCAT :)
let $catvalue := $record/odm:ItemData[@ItemOID=$catoid]/@Value
let $scatvalue := $record/odm:ItemData[@ItemOID=$scatoid]/@Value
(: SCAT and CAT may not be identical :)
where $catvalue = $scatvalue
return <error rule="SD1041" dataset="{data($name)}" variable="{$scatname}" rulelastupdate="2019-08-20">{data($scatname)} value '{data($catvalue)}' is identical to {data($catname)} value '{data($scatvalue)}'</error>
| 51.101449 | 224 | 0.687748 |
12dd089101fbf7c00be018c2f3211b9e2e3d907a | 123 | xq | XQuery | ref-journal-children.xq | FAtherden-eLife/xquery | 216e60619fb32a1656729d0ff97a405f5342c0b6 | [
"MIT"
] | null | null | null | ref-journal-children.xq | FAtherden-eLife/xquery | 216e60619fb32a1656729d0ff97a405f5342c0b6 | [
"MIT"
] | null | null | null | ref-journal-children.xq | FAtherden-eLife/xquery | 216e60619fb32a1656729d0ff97a405f5342c0b6 | [
"MIT"
] | null | null | null | distinct-values(for $x in collection('articles')//*:element-citation[@publication-type="journal"]
return $x/*/local-name()) | 61.5 | 97 | 0.739837 |
9f012c4118f71da76d0e5eb26f20f80edf3858c5 | 1,410 | xs | XS | xs/Index/Entry.xs | gitpan/Git-Raw | 8506f965a6df2d57f92838b760d9455f710d0528 | [
"Artistic-1.0"
] | null | null | null | xs/Index/Entry.xs | gitpan/Git-Raw | 8506f965a6df2d57f92838b760d9455f710d0528 | [
"Artistic-1.0"
] | null | null | null | xs/Index/Entry.xs | gitpan/Git-Raw | 8506f965a6df2d57f92838b760d9455f710d0528 | [
"Artistic-1.0"
] | null | null | null | MODULE = Git::Raw PACKAGE = Git::Raw::Index::Entry
SV *
id(self)
Index_Entry self
CODE:
RETVAL = git_oid_to_sv(&self -> id);
OUTPUT: RETVAL
SV *
path(self)
Index_Entry self
CODE:
RETVAL = newSVpv(self -> path, 0);
OUTPUT: RETVAL
SV *
size(self)
Index_Entry self
CODE:
RETVAL = newSVuv((size_t) self -> file_size);
OUTPUT: RETVAL
SV *
stage(self)
Index_Entry self
CODE:
RETVAL = newSViv(git_index_entry_stage(self));
OUTPUT: RETVAL
SV *
clone(self, path)
SV *self
const char *path
PREINIT:
Index_Entry old_entry;
CODE:
old_entry = GIT_SV_TO_PTR(Index::Entry, self);
RETVAL = git_index_entry_to_sv(
old_entry, path,
GIT_SV_TO_MAGIC(self)
);
OUTPUT: RETVAL
SV *
blob(self)
SV *self
PREINIT:
int rc;
Index_Entry entry;
SV *repo;
Repository repo_ptr;
Blob blob;
CODE:
entry = GIT_SV_TO_PTR(Index::Entry, self);
repo = GIT_SV_TO_MAGIC(self);
repo_ptr = INT2PTR(Repository, SvIV((SV *) repo));
RETVAL = &PL_sv_undef;
rc = git_blob_lookup(
&blob, repo_ptr -> repository,
&entry -> id
);
if (rc != GIT_ENOTFOUND) {
git_check_error(rc);
GIT_NEW_OBJ_WITH_MAGIC(
RETVAL, "Git::Raw::Blob", blob, repo
);
}
OUTPUT: RETVAL
void
DESTROY(self)
SV* self
PREINIT:
Index_Entry entry;
CODE:
SvREFCNT_dec(GIT_SV_TO_MAGIC(self));
entry = GIT_SV_TO_PTR(Index::Entry, self);
git_index_entry_free(entry);
| 13.68932 | 52 | 0.67234 |
2ed0d49995555f544b4fe8c5ac097be9b41f2633 | 3,846 | xs | XS | xs/InputBrowser.xs | sanko/perl-fltk | 7ac4a0aa5f2500f60afd6c0709a58cfb96b16a7e | [
"Artistic-2.0"
] | 4 | 2015-08-07T11:59:36.000Z | 2020-04-19T11:55:59.000Z | xs/InputBrowser.xs | sanko/perl-fltk | 7ac4a0aa5f2500f60afd6c0709a58cfb96b16a7e | [
"Artistic-2.0"
] | null | null | null | xs/InputBrowser.xs | sanko/perl-fltk | 7ac4a0aa5f2500f60afd6c0709a58cfb96b16a7e | [
"Artistic-2.0"
] | null | null | null | #include "include/FLTK_pm.h"
MODULE = FLTK::InputBrowser PACKAGE = FLTK::InputBrowser
#ifndef DISABLE_INPUTBROWSER
=pod
=for license Artistic License 2.0 | Copyright (C) 2009,2010 by Sanko Robinson
=for author Sanko Robinson <sanko@cpan.org> - http://sankorobinson.com/
=for version 0.532006
=for git $Id$
=head1 NAME
FLTK::InputBrowser - Input Browser (Combo Box) widget
=head1 Description
MicroSoft style "ComboBox" with the menu appearing below with a scrollbar. I
would like to use the name "ComboBox" or "InputChoice" for a more
user-friendly version which uses pop-up menus and positions the menu with the
cursor pointing at the current item, but this version can be used to get what
MicroSoft users expect. The implementation is a good example of how to get a
widget to appear in a modal pop-up window.
=cut
#ifdef NORMAL // from perl, probably
#define PERL_NORMAL NORMAL
#undef NORMAL
#endif // ifdef NORMAL
#include <fltk/InputBrowser.h>
#ifdef PERL_NORMAL // Undo our workaround
#define NORMAL PERL_NORMAL
#endif // ifdef PERL_NORMAL
=begin apidoc
=for apidoc ||FLTK::InputBrowser self|new|int x|int y|int w|int h|char * label = ""|
Creates a new C<FLTK::InputBrowser> object. Obviously.
=cut
#include "include/RectangleSubclass.h"
fltk::InputBrowser *
fltk::InputBrowser::new( int x, int y, int w, int h, const char * label = 0 )
CODE:
RETVAL = new RectangleSubclass<fltk::InputBrowser>(CLASS,x,y,w,h,label);
OUTPUT:
RETVAL
=end apidoc
=head1 Values for L<C<type()>|FLTK::Widget/"type">
=over
=item C<NORMAL>
=item C<NONEDITABLE>
=item C<INDENTED>
=item C<NONEDITABLE_INDENTED>
=back
=begin apidoc
=cut
int
NORMAL( )
CODE:
switch ( ix ) {
case 0: RETVAL = fltk::InputBrowser::NORMAL; break;
case 1: RETVAL = fltk::InputBrowser::NONEDITABLE; break;
case 2: RETVAL = fltk::InputBrowser::INDENTED; break;
case 3: RETVAL = fltk::InputBrowser::NONEDITABLE_INDENTED; break;
}
OUTPUT:
RETVAL
ALIAS:
NONEDITABLE = 1
INDENTED = 2
NONEDITABLE_INDENTED = 3
=for apidoc |||popup||
=for apidoc |||hide_popup||
=cut
void
fltk::InputBrowser::popup( )
void
fltk::InputBrowser::hide_popup( )
=for apidoc ||FLTK::Widget ret|item||
=for apidoc ||FLTK::Widget ret|item|FLTK::Widget * widget|
=cut
fltk::Widget *
fltk::InputBrowser::item( fltk::Widget * widget = NO_INIT )
CASE: items == 1
C_ARGS:
CASE: items == 2
C_ARGS: widget
=for apidoc |||minw|int width|
=for apidoc ||int w|minw||
=for apidoc |||minh|int height|
=for apidoc ||int h|minh||
=cut
int
fltk::InputBrowser::minw( int width = NO_INIT )
CASE: items == 1
C_ARGS:
CASE: items == 2
CODE:
THIS->minw( width );
int
fltk::InputBrowser::minh( int height = NO_INIT )
CASE: items == 1
C_ARGS:
CASE: items == 2
CODE:
THIS->minh( height );
=for apidoc |||maxw|int width|
=for apidoc ||int w|maxw||
=for apidoc |||maxh|int height|
=for apidoc ||int h|maxh||
=cut
int
fltk::InputBrowser::maxw( int width = NO_INIT )
CASE: items == 1
C_ARGS:
CASE: items == 2
CODE:
THIS->maxw( width );
int
fltk::InputBrowser::maxh( int height = NO_INIT )
CASE: items == 1
C_ARGS:
CASE: items == 2
CODE:
THIS->maxh( height );
=for apidoc |||text|char * string|
=for apidoc ||char * string|text||
=cut
const char *
fltk::InputBrowser::text( char * string = NO_INIT )
CASE: items == 1
C_ARGS:
CASE: items == 2
CODE:
THIS->text( string );
#endif // ifndef DISABLE_INPUTBROWSER
BOOT:
isa("FLTK::InputBrowser", "FLTK::Menu");
| 17.561644 | 84 | 0.630525 |
fbf9bc308f99f93c7ee32c88c45eaa7ad4908bf8 | 20,518 | xslt | XSLT | XML/DILtoSQL/UniqueNullableOutliner.xslt | ashalkhakov/NORMA | 57f18504da04c9e79fc311e277f6ec9c965b3161 | [
"FSFAP"
] | 32 | 2017-05-03T17:15:29.000Z | 2022-02-14T12:29:56.000Z | XML/DILtoSQL/UniqueNullableOutliner.xslt | ashalkhakov/NORMA | 57f18504da04c9e79fc311e277f6ec9c965b3161 | [
"FSFAP"
] | 22 | 2018-09-07T09:55:06.000Z | 2022-03-27T00:18:28.000Z | XML/DILtoSQL/UniqueNullableOutliner.xslt | ashalkhakov/NORMA | 57f18504da04c9e79fc311e277f6ec9c965b3161 | [
"FSFAP"
] | 18 | 2017-05-04T20:20:26.000Z | 2022-03-23T11:17:10.000Z | <?xml version="1.0" encoding="utf-8"?>
<!--
Copyright © Neumont University. All rights reserved.
This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
-->
<!-- Contributors: Kevin M. Owen, Robert Moore -->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:exsl="http://exslt.org/common"
xmlns:dsf="urn:schemas-orm-net:DIL:DILSupportFunctions"
xmlns:dil="http://schemas.orm.net/DIL/DIL"
xmlns:ddt="http://schemas.orm.net/DIL/DILDT"
xmlns:dep="http://schemas.orm.net/DIL/DILEP"
xmlns:dms="http://schemas.orm.net/DIL/DILMS"
xmlns:dml="http://schemas.orm.net/DIL/DMIL"
xmlns:ddl="http://schemas.orm.net/DIL/DDIL"
xmlns:dpp="urn:schemas-orm-net:DIL:Preprocessor"
extension-element-prefixes="exsl dsf">
<xsl:output method="xml" encoding="utf-8" media-type="text/xml" indent="yes"/>
<xsl:strip-space elements="*"/>
<xsl:param name="UniqueNullableOutliner.UniquenessOption" select="'backingTable'"/>
<xsl:param name="UniqueNullableOutliner.GenerateIndexedViews" select="true()"/>
<!-- If true, turns off the rest of the nullable uniqueness processing (which is still a work in progress). -->
<xsl:param name="UniqueNullableOutliner.GenerateIndexedViewsOnly" select="$UniqueNullableOutliner.GenerateIndexedViews"/>
<xsl:param name="UniqueNullableOutliner.ForeignKeyOption" select="'triggers'"/>
<!-- Controls whether uniqueness constraints over a single column are outlined. -->
<xsl:param name="UniqueNullableOutliner.OutlineSingleColumnUniquenesses" select="true()"/>
<xsl:template match="*" mode="UniqueNullableOutliner">
<xsl:param name="nullableColumnNames"/>
<xsl:copy>
<xsl:copy-of select="@*"/>
<xsl:apply-templates mode="UniqueNullableOutliner">
<xsl:with-param name="nullableColumnNames" select="$nullableColumnNames"/>
</xsl:apply-templates>
</xsl:copy>
</xsl:template>
<!-- Filter out any UNIQUE constraint on a COLUMN that doesn't also contain a NOT NULL constraint. -->
<xsl:template match="ddl:columnConstraintDefinition[ddl:uniqueKeyword and not(parent::ddl:columnDefinition/ddl:columnConstraintDefinition/ddl:notNullKeyword)]" mode="UniqueNullableOutliner">
<xsl:param name="nullableColumnNames"/>
<!-- We only want to filter these out if we are outlining them. -->
<xsl:if test="not($UniqueNullableOutliner.OutlineSingleColumnUniquenesses)">
<xsl:copy>
<xsl:copy-of select="@*"/>
<xsl:apply-templates mode="UniqueNullableOutliner">
<xsl:with-param name="nullableColumnNames" select="$nullableColumnNames"/>
</xsl:apply-templates>
</xsl:copy>
</xsl:if>
</xsl:template>
<!-- Filter out any UNIQUE constraint on a TABLE that includes one or more nullable COLUMNs. -->
<xsl:template match="ddl:tableConstraintDefinition" mode="UniqueNullableOutliner">
<xsl:param name="nullableColumnNames"/>
<xsl:if test="not(ddl:uniqueConstraintDefinition[dep:simpleColumnReference[dsf:getInformationSchemaForm(@name) = $nullableColumnNames] and ($UniqueNullableOutliner.OutlineSingleColumnUniquenesses or count(dep:simpleColumnReference) > 1)])">
<xsl:copy>
<xsl:copy-of select="@*"/>
<xsl:apply-templates mode="UniqueNullableOutliner">
<xsl:with-param name="nullableColumnNames" select="$nullableColumnNames"/>
</xsl:apply-templates>
</xsl:copy>
</xsl:if>
</xsl:template>
<xsl:template match="ddl:tableDefinition" mode="UniqueNullableOutliner">
<xsl:variable name="catalogAndSchema" select="@catalog | @schema"/>
<xsl:variable name="table" select="."/>
<xsl:variable name="tableName" select="string(@name)"/>
<xsl:variable name="nullableColumnNamesFragment">
<xsl:for-each select="ddl:columnDefinition[not(ddl:columnConstraintDefinition/ddl:notNullKeyword)]">
<NullableColumnName name="{dsf:getInformationSchemaForm(@name)}"/>
</xsl:for-each>
</xsl:variable>
<xsl:variable name="nullableColumnNames" select="exsl:node-set($nullableColumnNamesFragment)/child::*/@name"/>
<!-- Copy the table excluding the uniquenesses that span nullable columns. -->
<xsl:copy>
<xsl:copy-of select="@*"/>
<xsl:apply-templates mode="UniqueNullableOutliner">
<xsl:with-param name="nullableColumnNames" select="$nullableColumnNames"/>
</xsl:apply-templates>
</xsl:copy>
<!-- Create a temporary fragment to hold the parameters passed to the templates for each uniqueness constraint. -->
<xsl:variable name="uniquenessesFragment">
<xsl:if test="$UniqueNullableOutliner.OutlineSingleColumnUniquenesses">
<!-- For each for handling a uniqueness that spans a single nullable COLUMN. -->
<xsl:for-each select="ddl:columnDefinition[ddl:columnConstraintDefinition/ddl:uniqueKeyword and not(ddl:columnConstraintDefinition/ddl:notNullKeyword)]">
<uniqueness>
<xsl:attribute name="name">
<xsl:variable name="uniquenessConstraintName" select="string(ddl:columnConstraintDefinition[ddl:uniqueKeyword]/@name)"/>
<xsl:choose>
<xsl:when test="$uniquenessConstraintName">
<xsl:value-of select="$uniquenessConstraintName"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="dsf:makeValidIdentifier(concat(dsf:unescapeIdentifier($tableName), '_', dsf:unescapeIdentifier(@name), '_Uniqueness'))"/>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<column name="{@name}"/>
</uniqueness>
</xsl:for-each>
</xsl:if>
<xsl:for-each select="ddl:tableConstraintDefinition[ddl:uniqueConstraintDefinition[@type = 'UNIQUE' and dep:simpleColumnReference[dsf:getInformationSchemaForm(@name) = $nullableColumnNames] and ($UniqueNullableOutliner.OutlineSingleColumnUniquenesses or count(dep:simpleColumnReference) > 1)]]">
<uniqueness name="{@name}">
<xsl:for-each select="ddl:uniqueConstraintDefinition/dep:simpleColumnReference">
<column name="{@name}"/>
</xsl:for-each>
</uniqueness>
</xsl:for-each>
</xsl:variable>
<xsl:variable name="uniquenesses" select="exsl:node-set($uniquenessesFragment)/child::*"/>
<xsl:for-each select="$uniquenesses">
<xsl:if test="$UniqueNullableOutliner.GenerateIndexedViews">
<xsl:apply-templates select="$table" mode="UniqueNullableOutliner.ForViewDefinition">
<xsl:with-param name="nullableColumnNames" select="$nullableColumnNames"/>
<xsl:with-param name="uniquenessName" select="@name"/>
<xsl:with-param name="uniquenessColumnNames" select="column/@name"/>
</xsl:apply-templates>
</xsl:if>
<xsl:if test="not($UniqueNullableOutliner.GenerateIndexedViewsOnly)">
<xsl:choose>
<xsl:when test="$UniqueNullableOutliner.UniquenessOption = 'backingTable'">
<xsl:apply-templates select="$table" mode="UniqueNullableOutliner.ForBackingTable">
<xsl:with-param name="nullableColumnNames" select="$nullableColumnNames"/>
<xsl:with-param name="uniquenessName" select="@name"/>
<xsl:with-param name="uniquenessColumnNames" select="column/@name"/>
</xsl:apply-templates>
</xsl:when>
<xsl:when test ="$UniqueNullableOutliner.UniquenessOption = 'Trigger'">
<xsl:apply-templates select="$table" mode="UniqueNullableOutliner.ForTrigger">
<xsl:with-param name="nullableColumnNames" select="$nullableColumnNames"/>
<xsl:with-param name="uniquenessName" select="@name"/>
<xsl:with-param name="uniquenessColumnNames" select="column/@name"/>
</xsl:apply-templates>
</xsl:when>
<xsl:otherwise>
<xsl:message terminate="yes">
<xsl:text>ERROR: UniqueNullableOutliner.UniquenessOption value '</xsl:text>
<xsl:value-of select="$UniqueNullableOutliner.UniquenessOption"/>
<xsl:text>' is not recognized.</xsl:text>
</xsl:message>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
</xsl:for-each>
</xsl:template>
<!-- Templates for Outlining to Views with Unique Indexes -->
<xsl:template match="ddl:tableDefinition" mode="UniqueNullableOutliner.ForViewDefinition">
<xsl:param name="nullableColumnNames"/>
<xsl:param name="uniquenessName"/>
<xsl:param name="uniquenessColumnNames"/>
<ddl:viewDefinition name="{$uniquenessName}" dpp:isUniqueNullableView="true">
<xsl:copy-of select="@catalog | @schema"/>
<xsl:for-each select="$uniquenessColumnNames">
<dep:columnNameDefinition name="{.}"/>
</xsl:for-each>
<dml:querySpecification>
<dml:selectList>
<xsl:for-each select="$uniquenessColumnNames">
<dep:columnReference name="{.}"/>
</xsl:for-each>
</dml:selectList>
<dml:fromClause>
<dml:tableName name="{@name}">
<xsl:copy-of select="@catalog | @schema"/>
</dml:tableName>
</dml:fromClause>
<dml:whereClause>
<xsl:variable name="nullableColumns" select="$uniquenessColumnNames[dsf:getInformationSchemaForm(.) = $nullableColumnNames]"/>
<xsl:choose>
<xsl:when test="count($nullableColumns) = 1">
<xsl:for-each select="$nullableColumns">
<dep:nullPredicate type="NOT NULL">
<dep:columnReference name="{.}"/>
</dep:nullPredicate>
</xsl:for-each>
</xsl:when>
<xsl:otherwise>
<dep:and>
<xsl:for-each select="$nullableColumns">
<dep:nullPredicate type="NOT NULL">
<dep:columnReference name="{.}"/>
</dep:nullPredicate>
</xsl:for-each>
</dep:and>
</xsl:otherwise>
</xsl:choose>
</dml:whereClause>
</dml:querySpecification>
</ddl:viewDefinition>
</xsl:template>
<!-- End of View Specific Templates -->
<!-- Templates for Outlining to Backing Tables -->
<xsl:template match="ddl:tableDefinition" mode="UniqueNullableOutliner.ForBackingTable">
<xsl:param name="nullableColumnNames"/>
<xsl:param name="uniquenessName"/>
<xsl:param name="uniquenessColumnNames"/>
<xsl:variable name="table" select="."/>
<ddl:tableDefinition name="{$uniquenessName}" dpp:isUniqueBackingTable="true">
<xsl:copy-of select="@catalog | @schema"/>
<xsl:variable name="isSingleColumn" select="boolean(count($uniquenessColumnNames) = 1)"/>
<xsl:for-each select="$uniquenessColumnNames">
<!-- Do a nested for-each here to keep the columns in the order that they appear in the uniqueness constraint. -->
<xsl:for-each select="$table/ddl:columnDefinition[dsf:getInformationSchemaForm(@name) = dsf:getInformationSchemaForm(current())]">
<xsl:copy>
<xsl:copy-of select="@*"/>
<!-- Copy the datatype. -->
<xsl:copy-of select="*[1]"/>
<ddl:columnConstraintDefinition>
<ddl:notNullKeyword/>
</ddl:columnConstraintDefinition>
<xsl:if test="$isSingleColumn">
<ddl:columnConstraintDefinition>
<ddl:primaryKeyKeyword/>
</ddl:columnConstraintDefinition>
</xsl:if>
</xsl:copy>
</xsl:for-each>
</xsl:for-each>
<xsl:if test="not($isSingleColumn)">
<ddl:tableConstraintDefinition name="{$uniquenessName}">
<ddl:uniqueConstraintDefinition type="PRIMARY KEY">
<xsl:for-each select="$uniquenessColumnNames">
<dep:simpleColumnReference name="{.}"/>
</xsl:for-each>
</ddl:uniqueConstraintDefinition>
</ddl:tableConstraintDefinition>
</xsl:if>
</ddl:tableDefinition>
<ddl:triggerDefinition name="{dsf:makeValidIdentifier(concat(dsf:unescapeIdentifier($uniquenessName),'_Insert'))}" actionTime="BEFORE" forEach="ROW">
<xsl:copy-of select="@catalog | @schema"/>
<ddl:event type="INSERT"/>
<ddl:table>
<xsl:copy-of select="@catalog | @schema | @name"/>
</ddl:table>
<ddl:referencing>
<ddl:newRow name="NewRow"/>
</ddl:referencing>
<ddl:atomicBlock>
<dml:insertStatement name="{$uniquenessName}">
<xsl:copy-of select="@catalog | @schema"/>
<xsl:for-each select="$uniquenessColumnNames">
<dep:simpleColumnRefernence name="{.}"/>
</xsl:for-each>
<dml:tableValueConstructor>
<xsl:for-each select="$uniquenessColumnNames">
<dep:columnReference name="NewRow.{.}"/>
</xsl:for-each>
</dml:tableValueConstructor>
</dml:insertStatement>
</ddl:atomicBlock>
</ddl:triggerDefinition>
<ddl:triggerDefinition name="{dsf:makeValidIdentifier(concat(dsf:unescapeIdentifier($uniquenessName),'_Delete'))}" actionTime="AFTER" forEach="STATEMENT">
<xsl:copy-of select="@catalog | @schema"/>
<ddl:event type="DELETE"/>
<ddl:table>
<xsl:copy-of select="@catalog | @schema | @name"/>
</ddl:table>
<ddl:referencing>
<ddl:oldTable name="OldTable"/>
</ddl:referencing>
<ddl:atomicBlock>
<dml:deleteStatement name="{$uniquenessName}">
<xsl:copy-of select="@catalog | @schema"/>
<dml:whereClause>
<dep:inPredicate type="IN">
<xsl:for-each select="$uniquenessColumnNames">
<dep:columnReference name="{.}"/>
</xsl:for-each>
</dep:inPredicate>
</dml:whereClause>
<dml:querySpecification>
<dml:selectList>
<xsl:for-each select="$uniquenessColumnNames">
<dep:columnReference name="{.}"/>
</xsl:for-each>
</dml:selectList>
<dml:fromClause>
<dml:tableName name="NewTable"/>
</dml:fromClause>
</dml:querySpecification>
</dml:deleteStatement>
</ddl:atomicBlock>
</ddl:triggerDefinition>
<ddl:triggerDefinition name="{dsf:makeValidIdentifier(concat(dsf:unescapeIdentifier($uniquenessName),'_Update'))}" actionTime="BEFORE" forEach="STATEMENT">
<xsl:copy-of select="@catalog | @schema"/>
<ddl:event type="UPDATE">
<xsl:for-each select="$uniquenessColumnNames">
<dep:simpleColumnReference name="{.}"/>
</xsl:for-each>
</ddl:event>
<ddl:table>
<xsl:copy-of select="@catalog | @schema | @name"/>
</ddl:table>
<ddl:referencing>
<ddl:oldTable name="OldTable"/>
</ddl:referencing>
<ddl:atomicBlock>
<dml:deleteStatement name="{$uniquenessName}">
<xsl:copy-of select="@catalog | @schema"/>
<dml:whereClause>
<dep:inPredicate type="IN">
<xsl:for-each select="$uniquenessColumnNames">
<dep:columnReference name="{.}"/>
</xsl:for-each>
</dep:inPredicate>
</dml:whereClause>
<dml:querySpecification>
<dml:selectList>
<xsl:for-each select="$uniquenessColumnNames">
<dep:columnReference name="{.}"/>
</xsl:for-each>
</dml:selectList>
<dml:fromClause>
<dml:tableName name="NewTable"/>
</dml:fromClause>
</dml:querySpecification>
</dml:deleteStatement>
</ddl:atomicBlock>
</ddl:triggerDefinition>
<!-- TODO: Create link from uniqueness to Backing Tables -->
<!-- TODO: Ridirect foreign keys that span all COLUMNS of the backing table to the backing table. -->
</xsl:template>
<!-- End of Backing Table Specific Templates-->
<!-- Templates for Outlining to Triggers-->
<xsl:template match="ddl:tableDefinition" mode="UniqueNullableOutliner.ForTrigger">
<xsl:param name="nullableColumnNames"/>
<xsl:param name="uniquenessName"/>
<xsl:param name="uniquenessColumnNames"/>
<!-- For Update -->
<ddl:triggerDefinition name="{dsf:makeValidIdentifier(concat(dsf:unescapeIdentifier($uniquenessName),'_Update'))}" actionTime="BEFORE" forEach="STATEMENT">
<xsl:copy-of select="@catalog | @schema"/>
<ddl:event type="UPDATE">
<xsl:for-each select="$uniquenessColumnNames">
<dep:simpleColumnReference name="{.}"/>
</xsl:for-each>
</ddl:event>
<ddl:table>
<xsl:copy-of select="@catalog | @schema | @name"/>
</ddl:table>
<ddl:referencing>
<ddl:oldTable name="OldTable"/>
</ddl:referencing>
<ddl:atomicBlock>
<dml:deleteStatement name="{$uniquenessName}">
<xsl:copy-of select="@catalog | @schema"/>
<dml:whereClause>
<dep:inPredicate type="IN">
<xsl:for-each select="$uniquenessColumnNames">
<dep:columnReference name="{.}"/>
</xsl:for-each>
</dep:inPredicate>
</dml:whereClause>
<dml:querySpecification>
<dml:selectList>
<xsl:for-each select="$uniquenessColumnNames">
<dep:columnReference name="{.}"/>
</xsl:for-each>
</dml:selectList>
<dml:fromClause>
<dml:tableName name="NewTable"/>
</dml:fromClause>
</dml:querySpecification>
</dml:deleteStatement>
</ddl:atomicBlock>
</ddl:triggerDefinition>
<!-- ???
CREATE TRIGGER Table3NullsTrigger ON Table3 FOR INSERT, UPDATE
AS
IF (SELECT count( pk ) FROM inserted
WHERE exists (SELECT pk FROM Table3 WHERE Table3.Col1 = inserted.Col1 AND Table3.pk!= inserted.pk)) > 0
BEGIN
ROLLBACK TRANSACTION
END
GO-->
<!-- For Insert -->
<ddl:triggerDefinition name="InsertUnqiuenessCheck" actionTime="BEFORE">
<xsl:copy-of select="@catalog | @schema"/>
<ddl:event type="INSERT">
<xsl:for-each select="$uniquenessColumnNames">
<dep:simpleColumnReference name="{.}"/>
</xsl:for-each>
</ddl:event>
<ddl:table/>
<ddl:atomicBlock>
<ddl:sqlParameterDeclaration name="">
<ddt:userDefinedType name="concat('@', $)"/>
</ddl:sqlParameterDeclaration>
</ddl:atomicBlock>
</ddl:triggerDefinition>
</xsl:template>
<!-- End of Uniqueness Trigger Specific Templates-->
<!-- Templates for attaching backing tables to actual tables. -->
<!-- Remove alter table statements that contain nullable columns, and replace them with triggers. -->
<!--<xsl:template match="ddl:alterTableStatement/ddl:addTableConstraintDefinition/ddl:referencesSpecification/dep:simpleColumnReference[@name = $nullableColumnNames">
<ddl:triggerDefinition name ="">
<ddl:event type="UPDATE">
<xsl:for-each select="">
<dep:simpleColumnReference name=""/>
</xsl:for-each>
</ddl:event>
<ddl:table name="" catalog="" schema="">
</ddl:table>
</ddl:triggerDefinition>
</xsl:template>-->
<!--
Uniqueness TRIGGER:
After Insert on TableWithUniqueness
After Update on TableWithUniqueness
-->
<!--<ddl:triggerDefinition actionTime="AFTER" name="">
<ddl:event type="INSERT">
</ddl:event>
</ddl:triggerDefinition>
<ddl:triggerDefinition actionTime="AFTER" name="">
<ddl:event type="UPDATE">
</ddl:event>
</ddl:triggerDefinition>-->
<!--
Foreign Key TRIGGER:
After Update on TableWithUniqueness
After Delete on TableWithUniqueness
After Insert on RefrenceTable
After Update on RefrenceTable
Backing Table TRIGGER:
Before Insert on UniquenessTable
Before Update on UniquenessTable
After Delete on UniquenessTable
-->
<!-- Backing tables require a trigger to auto populate the backing table -->
<!-- Trigger to lock the table? -->
<!-- End of Backing Table Specific Templates-->
<!-- Templates for Outlining to Triggers -->
<!-- End of Trigger Specific Templates-->
<!-- Template for Enforcing Foreign keys through triggers -->
<!--<xsl:template match="">
<ddl:triggerDefinition actionTime="BEFORE">
<xsl:copy-of select="@name"/>
<ddl:event type="INSERT">
<dep:simpleColumnReference></dep:simpleColumnReference>
<dep:simpleColumnReference/>
</ddl:event>
<ddl:table/>
<ddl:atomicBlock>
</ddl:atomicBlock>
</ddl:triggerDefinition>
</xsl:template>-->
<!-- Need Insert / Update / Delete triggers for table being keyed to -->
<!-- End of Templates for Foreign Keys-->
</xsl:stylesheet> | 39.996101 | 299 | 0.671605 |
d910e08baadf3b5e7d294ea6ff8fcb018706e9ca | 680 | xsl | XSLT | xml/table-test/orange.xsl | MenteaXML/xslt3testbed | 5fe8d52fcb33adbb94bb02c42777fc5ed3088d36 | [
"Unlicense"
] | 2 | 2018-05-18T19:36:33.000Z | 2018-06-13T05:06:24.000Z | xml/table-test/orange.xsl | MenteaXML/xslt3testbed | 5fe8d52fcb33adbb94bb02c42777fc5ed3088d36 | [
"Unlicense"
] | null | null | null | xml/table-test/orange.xsl | MenteaXML/xslt3testbed | 5fe8d52fcb33adbb94bb02c42777fc5ed3088d36 | [
"Unlicense"
] | null | null | null | <?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="3.0"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
exclude-result-prefixes="xs">
<!-- Rely on imports to import main stylesheet. -->
<xsl:import href="red-blue.xsl" />
<xsl:template match="table[@style eq 'orange']">
<xsl:next-match>
<xsl:with-param
name="table-attributes"
as="attribute()*"
tunnel="yes">
<xsl:attribute name="background-color" select="'orange'" />
</xsl:with-param>
</xsl:next-match>
</xsl:template>
</xsl:stylesheet>
| 28.333333 | 66 | 0.610294 |
dc715bea3f42b17e7dd5dc76d0723774993f1bf0 | 240 | xslt | XSLT | dependencies/src/4Suite-XML-1.0.2/test/Xml/Xslt/Core/test-apply-imports-1.xslt | aleasims/Peach | bb56841e943d719d5101fee0a503ed34308eda04 | [
"MIT"
] | null | null | null | dependencies/src/4Suite-XML-1.0.2/test/Xml/Xslt/Core/test-apply-imports-1.xslt | aleasims/Peach | bb56841e943d719d5101fee0a503ed34308eda04 | [
"MIT"
] | null | null | null | dependencies/src/4Suite-XML-1.0.2/test/Xml/Xslt/Core/test-apply-imports-1.xslt | aleasims/Peach | bb56841e943d719d5101fee0a503ed34308eda04 | [
"MIT"
] | 1 | 2020-07-26T03:57:45.000Z | 2020-07-26T03:57:45.000Z | <?xml version="1.0"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0"
>
<xsl:template match="example">
<pre><xsl:apply-templates/></pre>
</xsl:template>
</xsl:stylesheet>
| 20 | 50 | 0.583333 |
fa595110f489abbc570724da85405254cbe54d98 | 72,781 | xsl | XSLT | wwwroot/ewcommon/xsl/Mailer/MailerLayouts.xsl | beachcomber/ProteanCMS | 8e70ce2912c60262398461b45064ee6f98df640d | [
"Apache-2.0"
] | 1 | 2019-01-04T17:37:20.000Z | 2019-01-04T17:37:20.000Z | wwwroot/ewcommon/xsl/Mailer/MailerLayouts.xsl | beachcomber/ProteanCMS | 8e70ce2912c60262398461b45064ee6f98df640d | [
"Apache-2.0"
] | null | null | null | wwwroot/ewcommon/xsl/Mailer/MailerLayouts.xsl | beachcomber/ProteanCMS | 8e70ce2912c60262398461b45064ee6f98df640d | [
"Apache-2.0"
] | null | null | null | <?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" exclude-result-prefixes="#default ms dt ew" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ms="urn:schemas-microsoft-com:xslt" xmlns:dt="urn:schemas-microsoft-com:datatypes" xmlns="http://www.w3.org/1999/xhtml" xmlns:ew="urn:ew">
<xsl:variable name="siteURL">
<xsl:variable name="serverVariableURL">
<xsl:call-template name="getServerVariable">
<xsl:with-param name="valueName" select="'HTTP_HOST'"/>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="https">
<xsl:call-template name="getServerVariable">
<xsl:with-param name="valueName" select="'HTTPS'"/>
</xsl:call-template>
</xsl:variable>
<xsl:choose>
<xsl:when test="not($https='on')">
<xsl:text>http://</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>https://</xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="$serverVariableURL"/>
</xsl:variable>
<!-- Mailer Default Variables -->
<xsl:variable name="emailWidth">
<xsl:apply-templates select="/Page" mode="emailWidth" />
</xsl:variable>
<xsl:variable name="emailColPad">
<xsl:apply-templates select="/Page" mode="emailColPad" />
</xsl:variable>
<xsl:variable name="emailBoxPad">
<xsl:apply-templates select="/Page" mode="emailBoxPad" />
</xsl:variable>
<xsl:variable name="bodyFont">
<xsl:apply-templates select="/Page" mode="bodyFont" />
</xsl:variable>
<xsl:variable name="bodySize">
<xsl:apply-templates select="/Page" mode="bodySize" />
</xsl:variable>
<xsl:variable name="bodyColour">
<xsl:apply-templates select="/Page" mode="bodyColour" />
</xsl:variable>
<xsl:variable name="linkColour">
<xsl:apply-templates select="/Page" mode="linkColour" />
</xsl:variable>
<xsl:variable name="bgColour">
<xsl:apply-templates select="/Page" mode="bgColour" />
</xsl:variable>
<xsl:variable name="HxFont">
<xsl:apply-templates select="/Page" mode="HxFont" />
</xsl:variable>
<xsl:variable name="HxSize">
<xsl:apply-templates select="/Page" mode="HxSize" />
</xsl:variable>
<xsl:variable name="HxStyle">
<xsl:apply-templates select="/Page" mode="HxStyle" />
</xsl:variable>
<xsl:variable name="HxColour">
<xsl:apply-templates select="/Page" mode="HxColour" />
</xsl:variable>
<xsl:variable name="HxBoxColour">
<xsl:apply-templates select="/Page" mode="HxBoxColour" />
</xsl:variable>
<xsl:variable name="btnPadV">7px</xsl:variable>
<xsl:variable name="btnPadH">13px</xsl:variable>
<xsl:variable name="btnPad">
<xsl:value-of select="$btnPadV"/>
<xsl:text> </xsl:text>
<xsl:value-of select="$btnPadH"/>
</xsl:variable>
<xsl:variable name="btnColour">#ffffff</xsl:variable>
<xsl:variable name="btnBackground">#000000</xsl:variable>
<xsl:variable name="boxMargin">20</xsl:variable>
<xsl:variable name="lineHeight">120%</xsl:variable>
<!-- Syle Default Settings -->
<xsl:template match="Page" mode="emailWidth">650</xsl:template>
<xsl:template match="Page" mode="emailColPad">10</xsl:template>
<xsl:template match="Page" mode="emailBoxPad">10</xsl:template>
<xsl:template match="Page" mode="bodyFont">Arial</xsl:template>
<xsl:template match="Page" mode="bodySize">2</xsl:template>
<xsl:template match="Page" mode="bodyColour">#000000</xsl:template>
<xsl:template match="Page" mode="bgColour">#ffffff</xsl:template>
<xsl:template match="Page" mode="linkColour">#5cbaf1</xsl:template>
<xsl:template match="Page" mode="HxFont">Verdana</xsl:template>
<xsl:template match="Page" mode="HxSize">3</xsl:template>
<xsl:template match="Page" mode="HxStyle">text-decoration: none;font-weight:700;</xsl:template>
<xsl:template match="Page" mode="HxColour">#000000</xsl:template>
<xsl:template match="Page" mode="HxBoxColour">#333333</xsl:template>
<xsl:template match="Content" mode="getThWidth">150</xsl:template>
<xsl:template match="Content" mode="getThHeight">125</xsl:template>
<xsl:variable name="mailer_utm_campaign">
<xsl:call-template name="mailer_utm_campaign"/>
</xsl:variable>
<xsl:template name="mailer_utm_campaign">
<xsl:if test="not($adminMode)">
<xsl:text>utm_medium=email</xsl:text>
<xsl:text>&utm_source=mailingList</xsl:text>
<xsl:text>&utm_campaign=</xsl:text>
<xsl:value-of select="translate(/Page/Menu/descendant-or-self::MenuItem[@id=$pageId]/@name,' ','-')"/>
<xsl:text>&email=[email]</xsl:text>
</xsl:if>
</xsl:template>
<xsl:template match="Page[@adminMode='false']" mode="adminStyle">
<link type="text/css" rel="stylesheet" href="/ewcommon/css/admin/admin.less"/>
<!-- IF IE6 BRING IN IE6 files -->
<xsl:if test="contains(/Page/Request/ServerVariables/Item[@name='HTTP_USER_AGENT'], 'MSIE 6.0') and not(contains(Request/ServerVariables/Item[@name='HTTP_USER_AGENT'], 'MSIE 7')) and not(contains(Request/ServerVariables/Item[@name='HTTP_USER_AGENT'], 'Opera'))">
<link type="text/css" rel="stylesheet" href="/ewcommon/css/admin/skins/ie6.css"/>
</xsl:if>
</xsl:template>
<!--####################### Page Level Templates, can be overridden later. ##############################-->
<xsl:template match="Page">
<html>
<xsl:choose>
<xsl:when test="/Page/Contents/Content[@name='XmlLang']">
<xsl:attribute name="xml:lang">
<xsl:value-of select="Contents/Content[@name='XmlLang']"/>
</xsl:attribute>
<xsl:attribute name="lang">
<xsl:value-of select="Contents/Content[@name='XmlLang']"/>
</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="xml:lang">
<xsl:value-of select="@lang"/>
</xsl:attribute>
<xsl:attribute name="lang">
<xsl:value-of select="@lang"/>
</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<head>
<title>
<xsl:apply-templates select="/" mode="PageTitle"/>
<xsl:text> </xsl:text>
</title>
<xsl:if test="/Page/@baseUrl">
<base href="{/Page/@baseUrl}"/>
</xsl:if>
<xsl:if test="/Page/@adminMode">
<xsl:apply-templates select="." mode="commonStyle"/>
<xsl:apply-templates select="." mode="js"/>
</xsl:if>
<xsl:apply-templates select="." mode="emailStyle"/>
</head>
<xsl:apply-templates select="." mode="bodyBuilder"/>
</html>
</xsl:template>
<xsl:template match="Page" mode="commonStyle">
<link rel="stylesheet" type="text/css" href="/ewcommon/css/base-bs.less"/>
<xsl:apply-templates select="." mode="adminStyle"/>
<link rel="stylesheet" type="text/css" href="/ewcommon/css/admin/adminmailer.css"/>
<xsl:apply-templates select="." mode="siteStyle"/>
</xsl:template>
<xsl:template match="Page" mode="siteStyle">
<!-- Placeholder -->
</xsl:template>
<xsl:template match="Page" mode="emailStyle">
<!-- Placeholder -->
</xsl:template>
<!-- -->
<!-- ################################################ Layout Types are specified in the LayoutsManifest.XML file ####################### -->
<xsl:template match="Page" mode="mainLayout">
<xsl:apply-templates select="." mode="Layout"/>
</xsl:template>
<!-- Generic Templates for displaying HTML content instead of using copy-of which introduces xmlns errors -->
<xsl:template match="Content" mode="displayBrief">
<xsl:apply-templates select="node()" mode="cleanXhtml"/>
</xsl:template>
<!-- Generic Template for displaying Flash Movie -->
<xsl:template match="Content[@type='FlashMovie']" mode="displayBrief">
<span class="alert">
<h3>Flash is not supported in emails</h3>
</span>
</xsl:template>
<!-- -->
<!-- ################################################ Layout Headers ############################################## -->
<!-- -->
<xsl:template match="/" mode="layoutHeader">
<xsl:param name="colspan"/>
<xsl:if test="/Page/Contents/Content[@position='header'] or /Page/@adminMode">
<tr>
<td style="width:100%;vertical-align:top;" valign="top" class="moduleContainer" id="header">
<xsl:if test="$colspan!=''">
<xsl:attribute name="colspan">
<xsl:value-of select="$colspan"/>
</xsl:attribute>
</xsl:if>
<xsl:apply-templates select="/Page" mode="addMailModule">
<xsl:with-param name="text">Add Module</xsl:with-param>
<xsl:with-param name="position">header</xsl:with-param>
</xsl:apply-templates>
</td>
</tr>
</xsl:if>
</xsl:template>
<!-- -->
<xsl:template match="/" mode="layoutFooter">
<xsl:param name="colspan"/>
<xsl:if test="/Page/Contents/Content[@position='footer'] or /Page/@adminMode">
<tr>
<td style="width:100%;vertical-align:top;" valign="top" class="moduleContainer" id="footer">
<xsl:if test="$colspan!=''">
<xsl:attribute name="colspan">
<xsl:value-of select="$colspan"/>
</xsl:attribute>
</xsl:if>
<xsl:apply-templates select="/Page" mode="addMailModule">
<xsl:with-param name="text">Add Module</xsl:with-param>
<xsl:with-param name="position">footer</xsl:with-param>
</xsl:apply-templates>
</td>
</tr>
</xsl:if>
</xsl:template>
<!-- ## Default Layout ############################################################################ -->
<xsl:template match="Page" mode="Layout">
<div class="template" id="template_1_Column">
<xsl:apply-templates select="/" mode="layoutHeader"/>
<div class="content">
<xsl:choose>
<xsl:when test="@layout=''">
<xsl:call-template name="term2000" />
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="term2001" />
<xsl:text> </xsl:text>
<strong>
<xsl:value-of select="@layout"/>
</strong>
<xsl:text> </xsl:text>
<xsl:call-template name="term2002" />
</xsl:otherwise>
</xsl:choose>
<xsl:text> </xsl:text>
</div>
<xsl:apply-templates select="/" mode="layoutFooter"/>
</div>
</xsl:template>
<!-- -->
<!-- ## Error Layout ############################################################################# -->
<xsl:template match="Page[@layout='Error']" mode="Layout">
<xsl:choose>
<xsl:when test="/Page/Contents/Content[@name='1005']">
<xsl:apply-templates select="/Page/Contents/Content[@name='1005']" mode="displayBrief"/>
</xsl:when>
<xsl:when test="Contents/Content">
<xsl:apply-templates select="Contents/Content" mode="displayBrief"/>
</xsl:when>
<xsl:otherwise>
<div class="template" id="Error" >
<xsl:call-template name="term2003" />
</div>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- -->
<!-- ## Layouts ############################################## -->
<xsl:template match="Page[@layout='Modules_1_Column']" mode="Layout">
<table cellpadding="0" cellspacing="0" border="0" width="100%" style="width:100% !important" class="template" id="template_2_Columns">
<xsl:apply-templates select="/" mode="layoutHeader">
<xsl:with-param name="colspan" select="'1'"/>
</xsl:apply-templates>
<tr>
<td class="moduleContainer" id="column1">
<xsl:apply-templates select="/Page" mode="addMailModule">
<xsl:with-param name="text">Add Module</xsl:with-param>
<xsl:with-param name="position">column1</xsl:with-param>
</xsl:apply-templates>
</td>
</tr>
<xsl:apply-templates select="/" mode="layoutFooter">
<xsl:with-param name="colspan" select="'1'"/>
</xsl:apply-templates>
</table>
</xsl:template>
<xsl:template match="Page[@layout='Modules_2_Columns']" mode="Layout">
<table cellpadding="0" cellspacing="0" border="0" width="100%" style="width:100% !important" class="template" id="template_2_Columns">
<xsl:apply-templates select="/" mode="layoutHeader">
<xsl:with-param name="colspan" select="'2'"/>
</xsl:apply-templates>
<tr>
<td style="width:50%;padding-right:7px;vertical-align:top;" valign="top" class="moduleContainer" id="column1">
<xsl:apply-templates select="/Page" mode="addMailModule">
<xsl:with-param name="text">Add Module</xsl:with-param>
<xsl:with-param name="position">column1</xsl:with-param>
</xsl:apply-templates>
</td>
<td style="width:50%;padding-left:7px;vertical-align:top;" valign="top" class="moduleContainer" id="column2">
<xsl:apply-templates select="/Page" mode="addMailModule">
<xsl:with-param name="text">Add Module</xsl:with-param>
<xsl:with-param name="position">column2</xsl:with-param>
</xsl:apply-templates>
</td>
</tr>
<xsl:apply-templates select="/" mode="layoutFooter">
<xsl:with-param name="colspan" select="'2'"/>
</xsl:apply-templates>
</table>
</xsl:template>
<xsl:template match="Page[@layout='Modules_2_Columns_66_33']" mode="Layout">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<xsl:apply-templates select="/" mode="layoutHeader">
<xsl:with-param name="colspan" select="'2'"/>
</xsl:apply-templates>
<tr>
<td id="column1" style="width:66%;padding-right:7px;vertical-align:top;" valign="top" class="moduleContainer">
<xsl:apply-templates select="/Page" mode="addMailModule">
<xsl:with-param name="text">Add Module</xsl:with-param>
<xsl:with-param name="position">column1</xsl:with-param>
</xsl:apply-templates>
</td>
<td id="column2" style="width:34%;padding-left:7px;vertical-align:top;" valign="top" class="moduleContainer">
<xsl:apply-templates select="/Page" mode="addMailModule">
<xsl:with-param name="text">Add Module</xsl:with-param>
<xsl:with-param name="position">column2</xsl:with-param>
</xsl:apply-templates>
</td>
</tr>
<xsl:apply-templates select="/" mode="layoutFooter">
<xsl:with-param name="colspan" select="'2'"/>
</xsl:apply-templates>
</table>
</xsl:template>
<xsl:template match="Page[@layout='Modules_2_Columns_33_66']" mode="Layout">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<xsl:apply-templates select="/" mode="layoutHeader">
<xsl:with-param name="colspan" select="'2'"/>
</xsl:apply-templates>
<tr>
<td id="column1" style="width:34%;padding-right:7px;vertical-align:top;" valign="top" class="moduleContainer">
<xsl:apply-templates select="/Page" mode="addMailModule">
<xsl:with-param name="text">Add Module</xsl:with-param>
<xsl:with-param name="position">column1</xsl:with-param>
</xsl:apply-templates>
</td>
<td id="column2" style="width:66%;padding-left:7px;vertical-align:top;" valign="top" class="moduleContainer">
<xsl:apply-templates select="/Page" mode="addMailModule">
<xsl:with-param name="text">Add Module</xsl:with-param>
<xsl:with-param name="position">column2</xsl:with-param>
</xsl:apply-templates>
</td>
</tr>
<xsl:apply-templates select="/" mode="layoutFooter">
<xsl:with-param name="colspan" select="'2'"/>
</xsl:apply-templates>
</table>
</xsl:template>
<xsl:template match="Page[@layout='Modules_3_Columns']" mode="Layout">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<xsl:apply-templates select="/" mode="layoutHeader">
<xsl:with-param name="colspan" select="'3'"/>
</xsl:apply-templates>
<tr>
<td style="width:33%;padding-right:7px;vertical-align:top;" valign="top" class="moduleContainer" id="column1">
<xsl:apply-templates select="/Page" mode="addMailModule">
<xsl:with-param name="text">Add Module</xsl:with-param>
<xsl:with-param name="position">column1</xsl:with-param>
</xsl:apply-templates>
</td>
<td style="width:33%;vertical-align:top;" valign="top" class="moduleContainer" id="column2">
<xsl:apply-templates select="/Page" mode="addMailModule">
<xsl:with-param name="text">Add Module</xsl:with-param>
<xsl:with-param name="position">column2</xsl:with-param>
</xsl:apply-templates>
</td>
<td style="width:33%;padding-left:7px;vertical-align:top;" valign="top" class="moduleContainer" id="column3">
<xsl:apply-templates select="/Page" mode="addMailModule">
<xsl:with-param name="text">Add Module</xsl:with-param>
<xsl:with-param name="position">column3</xsl:with-param>
</xsl:apply-templates>
</td>
</tr>
<xsl:apply-templates select="/" mode="layoutFooter">
<xsl:with-param name="colspan" select="'2'"/>
</xsl:apply-templates>
</table>
</xsl:template>
<!-- ####################### Module Handlers ####################### -->
<xsl:template match="Content[@type='Module']" mode="displayModule">
<div class="module" id="mod_{@id}">
<xsl:choose>
<xsl:when test="@box!='false' and @box!=''">
<xsl:apply-templates select="." mode="moduleBox"/>
</xsl:when>
<xsl:otherwise>
<div>
<xsl:apply-templates select="." mode="inlinePopupOptions" />
</div>
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="width:100%;margin-bottom:{$boxMargin}px">
<tr>
<td width="100%" style="width:100%;">
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="width:100%;">
<xsl:if test="/Page/@adminMode">
<tr>
<td width="100%" style="width:100%;">
<xsl:if test="@rss and @rss!='false'">
<xsl:attribute name="colspan">2</xsl:attribute>
</xsl:if>
</td>
</tr>
</xsl:if>
<xsl:if test="(@rss and @rss!='false') or @title!=''">
<tr>
<xsl:if test="@title!=''">
<td width="100%" style="width:100%;">
<h2 class="title" style ="margin-bottom: 10px; margin-top: 0px;">
<xsl:apply-templates select="." mode="moduleLink">
<xsl:with-param name="headingColour">
<xsl:value-of select="$HxColour"/>
</xsl:with-param>
</xsl:apply-templates>
</h2>
</td>
</xsl:if>
<xsl:if test="@rss and @rss!='false'">
<td width="20" style="width:20px;">
<xsl:apply-templates select="." mode="rssLink" />
</td>
</xsl:if>
</tr>
</xsl:if>
<tr>
<td style="width:100%;" width="100%">
<xsl:if test="@rss and @rss!='false'">
<xsl:attribute name="colspan">2</xsl:attribute>
</xsl:if>
<xsl:apply-templates select="." mode="displayBrief"/>
</td>
</tr>
<xsl:if test="@linkText!='' and @link!=''">
<tr>
<td width="100%" style="width:100%;" align="right">
<xsl:if test="@rss and @rss!='false'">
<xsl:attribute name="colspan">2</xsl:attribute>
</xsl:if>
<xsl:apply-templates select="." mode="moreLink">
<xsl:with-param name="link">
<xsl:choose>
<xsl:when test="format-number(@link,'0')!='NaN'">
<xsl:variable name="pageId" select="@link"/>
<xsl:apply-templates select="/Page/Menu/descendant-or-self::MenuItem[@id=$pageId]" mode="getHref"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="@link"/>
</xsl:otherwise>
</xsl:choose>
</xsl:with-param>
<xsl:with-param name="linkText" select="@linkText"/>
<xsl:with-param name="altText" select ="@title"/>
</xsl:apply-templates>
</td>
</tr>
</xsl:if>
</table>
</td>
</tr>
</table>
</xsl:otherwise>
</xsl:choose>
</div>
</xsl:template>
<xsl:template match="Content" mode="moduleBox">
<table width="100%" style="width:100%;">
<!-- define classes for box -->
<xsl:attribute name="class">
<xsl:text>box </xsl:text>
<xsl:value-of select="translate(@box,' ','-')"/>
<!-- if no title, we may still want TL/TR for rounded boxs with no title bar,
stled differently to a title bar. -->
<xsl:if test="@title=''">
<xsl:text> boxnotitle</xsl:text>
</xsl:if>
</xsl:attribute>
<tr>
<td width="100%;" style="width:100%;">
<xsl:if test="/Page/@adminMode">
<tr>
<td>
<xsl:if test="@rss and @rss!='false'">
<xsl:attribute name="colspan">2</xsl:attribute>
</xsl:if>
<div>
<xsl:apply-templates select="." mode="inlinePopupOptions" />
</div>
</td>
</tr>
</xsl:if>
<tr>
<td style="padding:5px;">
<xsl:choose>
<xsl:when test="@title!=''">
<h2 class="title">
<xsl:apply-templates select="." mode="moduleLink"/>
</h2>
</xsl:when>
<xsl:otherwise>
<!-- Needed, if no title don't want TL/TR to be empty -->
<xsl:text> </xsl:text>
</xsl:otherwise>
</xsl:choose>
</td>
<xsl:if test="@rss and @rss!='false'">
<td width="20" style="width:20px;" >
<xsl:apply-templates select="." mode="rssLink" />
</td>
</xsl:if>
</tr>
<tr>
<td width="100%" style="width:100%;padding:{$emailBoxPad}px;" class="content">
<xsl:if test="@rss and @rss!='false'">
<xsl:attribute name="colspan">2</xsl:attribute>
</xsl:if>
<xsl:apply-templates select="." mode="displayBrief"/>
</td>
</tr>
<xsl:if test="@linkText!='' and @link!=''">
<tr>
<td width="100%" style="width:100%;">
<xsl:if test="@rss and @rss!='false'">
<xsl:attribute name="colspan">2</xsl:attribute>
</xsl:if>
<xsl:apply-templates select="." mode="moreLink">
<xsl:with-param name="link">
<xsl:choose>
<xsl:when test="format-number(@link,'0')!='NaN'">
<xsl:variable name="pageId" select="@link"/>
<xsl:apply-templates select="/Page/Menu/descendant-or-self::MenuItem[@id=$pageId]" mode="getHref"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="@link"/>
</xsl:otherwise>
</xsl:choose>
</xsl:with-param>
<xsl:with-param name="linkText" select="@linkText"/>
<xsl:with-param name="altText" select="@title"/>
</xsl:apply-templates>
</td>
</tr>
</xsl:if>
</td>
</tr>
</table>
</xsl:template>
<xsl:template match="Content[@type='Module']" mode="moduleTitle">
<xsl:value-of select="@title"/>
</xsl:template>
<!-- ## Generic displayBrief ##################################################################### -->
<xsl:template match="Content" mode="displayBrief">
<xsl:apply-templates select="node()" mode="cleanXhtml"/>
</xsl:template>
<!-- ## Generic Module displayBrief ##################################################################### -->
<xsl:template match="Content[@type='Module']" mode="displayBrief">
<span class="alert">* Module type unknown *</span>
</xsl:template>
<!-- ## Generic displayBrief for Formatted Text and Images ##################################################################### -->
<xsl:template match="Content[@moduleType='FormattedText' or @moduleType='Image']" mode="displayBrief">
<font face="{$bodyFont}" size="{$bodySize}" color="{$bodyColour}">
<xsl:apply-templates select="node()" mode="cleanXhtml"/>
</font>
</xsl:template>
<!-- ## IMAGE BASIC CONTENT TYPE - Cater for a link ############################################### -->
<xsl:template match="Content[@type='Image']" mode="displayBrief">
<xsl:choose>
<xsl:when test="@internalLink!=''">
<xsl:variable name="pageId" select="@internalLink"/>
<xsl:variable name="href">
<xsl:apply-templates select="//MenuItem[@id=$pageId]" mode="getHref" />
</xsl:variable>
<xsl:variable name="pageName">
<xsl:apply-templates select="//MenuItem[@id=$pageId]" mode="getDisplayName" />
</xsl:variable>
<a href="{$href}?{$mailer_utm_campaign}" title="{$pageName}">
<xsl:apply-templates select="./node()" mode="cleanXhtml"/>
</a>
</xsl:when>
<xsl:when test="@externalLink!=''">
<a href="{@externalLink}?{$mailer_utm_campaign}" title="{@name}">
<xsl:if test="not(contains(@externalLink,/Page/Request/ServerVariables/Item[@name='SERVER_NAME']/node()))">
<xsl:attribute name="target">_blank</xsl:attribute>
</xsl:if>
<xsl:apply-templates select="./node()" mode="cleanXhtml"/>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="node()" mode="cleanXhtml"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- Image Module Display with Link -->
<xsl:template match="Content[@type='Module' and @moduleType='Image' and @link!='']" mode="displayBrief">
<a>
<xsl:attribute name="href">
<xsl:choose>
<xsl:when test="format-number(@link,'0')!='NaN'">
<xsl:variable name="pageId" select="@link"/>
<xsl:apply-templates select="/Page/Menu/descendant-or-self::MenuItem[@id=$pageId]" mode="getHref"/>
<xsl:text>?</xsl:text>
<xsl:call-template name="mailer_utm_campaign"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="@link"/>
<xsl:text>?</xsl:text>
<xsl:call-template name="mailer_utm_campaign"/>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:attribute name="title">
<xsl:choose>
<xsl:when test="format-number(@link,'0')!='NaN'">
<xsl:variable name="pageId" select="@url"/>
<xsl:value-of select="/Page/Menu/descendant-or-self::MenuItem[@id=$pageId]/@name"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="@linkText"/>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:if test="@linkType='external'">
<xsl:attribute name="rel">external</xsl:attribute>
</xsl:if>
<xsl:apply-templates select="node()" mode="cleanXhtml"/>
</a>
</xsl:template>
<!-- -->
<xsl:template match="Content[@type='Module' and @moduleType='FlashMovie']" mode="displayBrief">
<h1 style="color:#F00;">FLASH IS NOT SUPPORTED IN EMAILS - Please Delete</h1>
</xsl:template>
<xsl:template match="Content[@type='Module' and contains(@moduleType,'ListEmail')]" mode="displayBrief">
<!-- Set Variables -->
<xsl:variable name="contentType" select="@contentType" />
<xsl:variable name="queryStringParam" select="concat('startPos',@id)"/>
<xsl:variable name="startPos" select="number(concat('0',/Page/Request/QueryString/Item[@name=$queryStringParam]))"/>
<xsl:variable name="contentList">
<xsl:apply-templates select="." mode="getContent">
<xsl:with-param name="contentType" select="$contentType" />
<xsl:with-param name="startPos" select="$startPos" />
</xsl:apply-templates>
</xsl:variable>
<xsl:variable name="totalCount">
<xsl:choose>
<xsl:when test="@display='related'">
<xsl:value-of select="count(Content[@type=$contentType])"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="count(/Page/Contents/Content[@type=$contentType])"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<!-- Output Module -->
<table class="ContentList" width="100%" style="width:100%;">
<!--<xsl:if test="/Page/@adminMode">
<tr>
<td width="100%" style="width:100%;">
<xsl:attribute name="colspan">
<xsl:choose>
<xsl:when test="count(ms:node-set($contentList)/*) = 0">1</xsl:when>
<xsl:when test="count(ms:node-set($contentList)/*) < @cols">
<xsl:value-of select="count(ms:node-set($contentList)/*)"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="@cols"/>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
</td>
</tr>
</xsl:if>-->
<xsl:if test="count(ms:node-set($contentList)/*) > 0">
<xsl:call-template name="outputContentListTDs">
<xsl:with-param name="contentList" select="$contentList" />
<xsl:with-param name="cols" select="@cols" />
<xsl:with-param name="sortBy" select="@sortBy" />
<xsl:with-param name="colWidth">
<xsl:value-of select="floor(100 div @cols)"/>
</xsl:with-param>
</xsl:call-template>
</xsl:if>
</table>
</xsl:template>
<xsl:template name="outputContentListTDs">
<xsl:param name="contentList" />
<xsl:param name="cols" />
<xsl:param name="sortBy" />
<xsl:param name="colWidth" />
<xsl:if test="ms:node-set($contentList)/*">
<tr>
<xsl:for-each select="ms:node-set($contentList)/*[position() <= $cols]">
<td width="{$colWidth}%" style="width:{$colWidth}%;vertical-align:top;padding-bottom:{$emailBoxPad}px" valign="top">
<xsl:apply-templates select="." mode="displayBrief">
<xsl:with-param name="sortBy" select="$sortBy"/>
</xsl:apply-templates>
</td>
</xsl:for-each>
</tr>
<xsl:call-template name="outputContentListTDs">
<xsl:with-param name="colWidth" select="$colWidth"/>
<xsl:with-param name="cols" select="@cols" />
<xsl:with-param name="contentList">
<xsl:for-each select="ms:node-set($contentList)/*[position() > $cols]">
<xsl:copy-of select="."/>
</xsl:for-each>
</xsl:with-param>
</xsl:call-template>
</xsl:if>
</xsl:template>
<!-- NewsArticle Brief -->
<xsl:template match="Content[@type='NewsArticle']" mode="displayBrief">
<xsl:param name="sortBy"/>
<!-- articleBrief -->
<xsl:variable name="parentURL">
<xsl:apply-templates select="." mode="getHref"/>
</xsl:variable>
<div class="listItem">
<xsl:apply-templates select="." mode="inlinePopupOptions">
<xsl:with-param name="class" select="'listItem'"/>
<xsl:with-param name="sortBy" select="$sortBy"/>
</xsl:apply-templates>
<table cellpadding="0" cellspacing="0" width="100%" style="width:100%;">
<tr>
<td>
<h3 class="title" style="margin-top:0">
<a href="{$parentURL}?{$mailer_utm_campaign}" title="Read More - {Headline/node()}">
<font face="{$HxFont}" size="{$HxSize}" color="{$HxColour}" style="{$HxStyle}">
<xsl:value-of select="Headline/node()" />
</font>
</a>
</h3>
<font face="{$bodyFont}" size="{$bodySize}" color="{$bodyColour}">
<xsl:if test="@publish!=''">
<p class="date">
<xsl:value-of select="/Page/Contents/Content[@name='articleLabel']"/>
<xsl:call-template name="DisplayDate">
<xsl:with-param name="date" select="@publish"/>
</xsl:call-template>
</p>
</xsl:if>
<xsl:if test="Strapline/node()!=''">
<p style="line-height:{$lineHeight}">
<xsl:call-template name="truncate-string">
<xsl:with-param name="text" select="Strapline/node()"/>
<xsl:with-param name="length" select="130"/>
</xsl:call-template>
<xsl:text> </xsl:text>
</p>
</xsl:if>
<p style="padding-top:{$btnPadV};">
<table cellpadding="0" cellspacing="0" >
<tr>
<td style="background:{$btnBackground};padding:{$btnPad};">
<a style="white-space:nowrap;color:{$btnColour};">
<xsl:attribute name="href">
<xsl:apply-templates select="." mode="getHref" />
<xsl:text>?</xsl:text>
<xsl:call-template name="mailer_utm_campaign"/>
</xsl:attribute>
<xsl:attribute name="title">
<xsl:text>view </xsl:text>
<xsl:apply-templates select="." mode="getDisplayName" />
</xsl:attribute>
<xsl:text>Read more</xsl:text>
</a>
</td>
</tr>
</table>
</p>
</font>
</td>
<xsl:if test="Images/img/@src!=''">
<td style="text-align:right;">
<a href="{$parentURL}?{$mailer_utm_campaign}" title="Read More - {Headline/node()}" style="border:none; float:right; margin-left:10px;">
<xsl:apply-templates select="." mode="displayThumbnail"/>
</a>
</td>
</xsl:if>
</tr>
</table>
</div>
</xsl:template>
<!-- -->
<!-- Event Brief -->
<xsl:template match="Content[@type='Event']" mode="displayBrief">
<xsl:param name="sortBy"/>
<!-- articleBrief -->
<xsl:variable name="parentURL">
<xsl:apply-templates select="." mode="getHref"/>
</xsl:variable>
<div class="listItem vevent">
<xsl:apply-templates select="." mode="inlinePopupOptions">
<xsl:with-param name="class" select="'listItem vevent'"/>
<xsl:with-param name="sortBy" select="$sortBy"/>
</xsl:apply-templates>
<h3 class="title">
<a href="{$parentURL}?{$mailer_utm_campaign}" title="Read More - {Headline/node()}" class="url summary">
<font face="{$HxFont}" size="2" color="{$HxColour}">
<xsl:value-of select="Headline/node()"/>
</font>
</a>
</h3>
<xsl:if test="Images/img/@src!=''">
<a href="{$parentURL}?{$mailer_utm_campaign}" title="Read More - {Headline/node()}">
<xsl:apply-templates select="." mode="displayThumbnail"/>
</a>
</xsl:if>
<font face="{$bodyFont}" size="{$bodySize}" color="{$bodyColour}">
<xsl:if test="StartDate/node()!=''">
<p class="date">
<span class="dtstart">
<xsl:call-template name="DisplayDate">
<xsl:with-param name="date" select="StartDate/node()"/>
</xsl:call-template>
<span class="value-title" title="{StartDate/node()}T{translate(Times/@start,',',':')}" ></span>
</span>
<xsl:if test="EndDate/node()!='' and EndDate/node() != StartDate/node()">
<xsl:text> - </xsl:text>
<span class="dtend">
<xsl:call-template name="DisplayDate">
<xsl:with-param name="date" select="EndDate/node()"/>
</xsl:call-template>
<span class="value-title" title="{EndDate/node()}T{translate(Times/@end,',',':')}"></span>
</span>
</xsl:if>
</p>
</xsl:if>
<xsl:if test="Location/Venue!=''">
<p class="location vcard">
<span class="fn org">
<xsl:value-of select="Location/Venue"/>
</span>
</p>
</xsl:if>
<p class="summary">
<xsl:call-template name="truncate-string">
<xsl:with-param name="text" select="Strap/node()"/>
<xsl:with-param name="length" select="130"/>
</xsl:call-template>
<!--<xsl:apply-templates select="Strap/node()" mode="cleanXhtml"/>-->
<xsl:text> </xsl:text>
<a style="white-space:nowrap;">
<xsl:attribute name="href">
<xsl:apply-templates select="." mode="getHref" />
<xsl:text>?</xsl:text>
<xsl:call-template name="mailer_utm_campaign"/>
</xsl:attribute>
<xsl:attribute name="title">
<xsl:text>view </xsl:text>
<xsl:apply-templates select="." mode="getDisplayName" />
</xsl:attribute>
<xsl:text>read more ></xsl:text>
</a>
</p>
</font>
</div>
</xsl:template>
<!-- Product Brief old -->
<!--<xsl:template match="Content[@type='Product']" mode="displayBrief">
<xsl:param name="sortBy"/>
<xsl:param name="pos"/>
<xsl:variable name="parId">
<xsl:choose>
<xsl:when test="@parId > 0">
<xsl:value-of select="@parId"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="/Page/@id"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="parentURL">
<xsl:apply-templates select="self::Content" mode="getHref">
<xsl:with-param name="parId" select="$parId"/>
</xsl:apply-templates>
</xsl:variable>
<div class="listItem hproduct">
<xsl:apply-templates select="." mode="inlinePopupOptions">
<xsl:with-param name="class" select="'listItem hproduct'"/>
<xsl:with-param name="sortBy" select="$sortBy"/>
</xsl:apply-templates>
<h3 class="fn title">
<a href="{$parentURL}{$mailer_utm_campaign}" title="{@name}">
<font face="{$HxFont}" size="2" color="{$HxColour}">
<xsl:apply-templates select="Name" mode="displayBrief"/>
</font>
</a>
</h3>
<xsl:if test="Images/img/@src!=''">
<a href="{$parentURL}{$mailer_utm_campaign}" class="url">
<xsl:apply-templates select="." mode="displayThumbnail"/>
</a>
</xsl:if>
<font face="{$bodyFont}" size="{$bodySize}" color="{$bodyColour}">
<xsl:if test="Manufacturer/node()!=''">
<p class="manufacturer">
<xsl:if test="/Page/Contents/Content[@name='makeLabel']">
<span class="label">
<xsl:value-of select="/Page/Contents/Content[@name='makeLabel']"/>
</span> 
</xsl:if>
<span class="brand">
<xsl:apply-templates select="Manufacturer" mode="displayBrief"/>
</span>
</p>
</xsl:if>
<xsl:if test="StockCode/node()!=''">
<p class="sku stockCode">
<span class="label">
<xsl:call-template name="term2014" />
<xsl:text>: </xsl:text>
</span>
<xsl:apply-templates select="StockCode/node()" mode="cleanXhtml"/>
</p>
</xsl:if>
<xsl:choose>
<xsl:when test="Content[@type='SKU']">
<xsl:apply-templates select="Content[@type='SKU'][1]" mode="displayPrice" />
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="." mode="displayPrice" />
</xsl:otherwise>
</xsl:choose>
<xsl:if test="ShortDescription/node()!=''">
<p class="description">
<xsl:call-template name="truncate-string">
<xsl:with-param name="text" select="ShortDescription/node()"/>
<xsl:with-param name="length" select="130"/>
</xsl:call-template>
<xsl:text> </xsl:text>
<a style="white-space:nowrap;">
<xsl:attribute name="href">
<xsl:apply-templates select="." mode="getHref" />
<xsl:call-template name="mailer_utm_campaign"/>
</xsl:attribute>
<xsl:attribute name="title">
<xsl:text>view </xsl:text>
<xsl:apply-templates select="." mode="getDisplayName" />
</xsl:attribute>
<xsl:text>read more ></xsl:text>
</a>
</p>
</xsl:if>
</font>
</div>
</xsl:template>-->
<!-- Product Brief new -->
<xsl:template match="Content[@type='Product']" mode="displayBrief">
<xsl:param name="sortBy"/>
<xsl:param name="pos"/>
<xsl:variable name="parId">
<xsl:choose>
<xsl:when test="@parId > 0">
<xsl:value-of select="@parId"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="/Page/@id"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="parentURL">
<xsl:apply-templates select="self::Content" mode="getHref">
<xsl:with-param name="parId" select="$parId"/>
</xsl:apply-templates>
</xsl:variable>
<tr class="listItem hproduct">
<tr>
<td colspan="4">
<xsl:apply-templates select="." mode="inlinePopupOptions">
<xsl:with-param name="class" select="'listItem hproduct'"/>
<xsl:with-param name="sortBy" select="$sortBy"/>
</xsl:apply-templates>
<h3 class="fn title">
<a href="{$parentURL}?{$mailer_utm_campaign}" title="{@name}">
<b>
<font face="{$HxFont}" size="5" color="{$HxColour}">
<xsl:apply-templates select="Name" mode="cleanXhtml"/>
</font>
</b>
</a>
</h3>
</td>
</tr>
<!--displayPrice-->
<tr>
<xsl:if test="Images/img/@src!=''">
<td align="right" valign="top" style="padding: 10px 20px 10px 40px;">
<a href="{$parentURL}?{$mailer_utm_campaign}" class="url">
<xsl:apply-templates select="." mode="displayThumbnail"/>
</a>
</td>
</xsl:if>
<xsl:if test="Manufacturer/node()!=''">
<!--<td class="manufacturer" >-->
<td class="brand" >
<b>
<xsl:call-template name="term2081" />
<xsl:text>: </xsl:text>
</b>
<xsl:apply-templates select="Manufacturer" mode="cleanXhtml"/>
</td>
<!--</td>-->
</xsl:if>
</tr>
<tr>
<td>
<xsl:choose>
<xsl:when test="Content[@type='SKU']">
<xsl:apply-templates select="Content[@type='SKU'][1]" mode="displayPrice" />
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="." mode="displayPrice" />
</xsl:otherwise>
</xsl:choose>
</td>
</tr>
<tr >
<td >
<!--ShortDescription-->
<xsl:if test="ShortDescription/node()!=''">
<xsl:apply-templates select="ShortDescription/node()" mode="cleanXhtml"/>
<br/>
</xsl:if>
</td>
</tr>
</tr>
<!--read more-->
<td>
<a style="white-space:nowrap; background:{$btnBackground};color:{$btnColour}; font-family:{$bodyFont}; text-decoration:none;padding:{$btnPad};border:0;">
<xsl:attribute name="href">
<xsl:apply-templates select="." mode="getHref" />
<xsl:text>?</xsl:text>
<xsl:call-template name="mailer_utm_campaign"/>
</xsl:attribute>
<xsl:attribute name="title">
<xsl:text>view </xsl:text>
<xsl:apply-templates select="." mode="getDisplayName" />
</xsl:attribute>
<xsl:text>read more ></xsl:text>
</a>
</td>
</xsl:template>
<xsl:template match="Content[@type='Product']" mode="getThWidth">250</xsl:template>
<xsl:template match="Content[@type='Product']" mode="getThHeight">250</xsl:template>
<!-- Document Brief -->
<xsl:template match="Content[@type='Document']" mode="displayBrief">
<xsl:param name="sortBy"/>
<!-- documentBrief -->
<xsl:variable name="parentURL">
<xsl:apply-templates select="self::Content" mode="getHref">
<xsl:with-param name="parId" select="@parId"/>
</xsl:apply-templates>
</xsl:variable>
<xsl:variable name="preURL" select="substring(Website,1,3)" />
<xsl:variable name="linkURL">
<xsl:choose>
<xsl:when test="$preURL='www' or $preURL='WWW'">
<xsl:text>http://</xsl:text>
<xsl:value-of select="Url"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="Url"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<div class="listItem document">
<xsl:apply-templates select="." mode="inlinePopupOptions">
<xsl:with-param name="class" select="'list document'"/>
<xsl:with-param name="sortBy" select="$sortBy"/>
</xsl:apply-templates>
<h3>
<a href="/ewcommon/tools/download.ashx?docId={@id}" rel="external">
<xsl:attribute name="title">
<!-- click here to download a copy of this document -->
<xsl:apply-templates select="." mode="getDisplayName"/>
</xsl:attribute>
<font face="{$HxFont}" size="2" color="{$HxColour}">
<xsl:value-of select="Title/node()"/>
</font>
</a>
</h3>
<font face="{$bodyFont}" size="{$bodySize}" color="{$bodyColour}">
<xsl:if test="Body/node()!=''">
<div class="description">
<!--<xsl:apply-templates select="Body/node()" mode="cleanXhtml"/>-->
<xsl:call-template name="truncate-string">
<xsl:with-param name="text" select="Body/node()"/>
<xsl:with-param name="length" select="130"/>
</xsl:call-template>
<xsl:text> </xsl:text>
<a style="white-space:nowrap;">
<xsl:attribute name="href">
<xsl:apply-templates select="." mode="getHref" />
<xsl:text>?</xsl:text>
<xsl:call-template name="mailer_utm_campaign"/>
</xsl:attribute>
<xsl:attribute name="title">
<xsl:text>view </xsl:text>
<xsl:apply-templates select="." mode="getDisplayName" />
</xsl:attribute>
<xsl:text>read more ></xsl:text>
</a>
</div>
</xsl:if>
<p class="link">
<a href="/ewcommon/tools/download.ashx?docId={@id}" rel="external" class="{substring-after(Path,'.')}icon">
<xsl:attribute name="title">
<!-- click here to download a copy of this document -->
<xsl:apply-templates select="." mode="getDisplayName"/>
</xsl:attribute>
<!--Download-->
<xsl:call-template name="term2028" />
<xsl:text> </xsl:text>
<xsl:choose>
<xsl:when test="contains(Path,'.pdf')">
<!--Adobe PDF-->
<xsl:call-template name="term2029" />
</xsl:when>
<xsl:when test="contains(Path,'.doc')">
<!--Word Document-->
<xsl:call-template name="term2030" />
</xsl:when>
<xsl:when test="contains(Path,'.xls')">
<!--Excel Spreadsheet-->
<xsl:call-template name="term2031" />
</xsl:when>
<xsl:when test="contains(Path,'.zip')">
<!--Zip Archive-->
<xsl:call-template name="term2032" />
</xsl:when>
<xsl:when test="contains(Path,'.ppt')">
<!--PowerPoint Presentation-->
<xsl:call-template name="term2033" />
</xsl:when>
<xsl:when test="contains(Path,'.zip')">
<!--PowerPoint Slideshow-->
<xsl:call-template name="term2034" />
</xsl:when>
<xsl:when test="contains(Path,'.jpg')">
<!--JPEG Image file-->
<xsl:call-template name="term2035" />
</xsl:when>
<xsl:when test="contains(Path,'.gif')">
<!--GIF Image file-->
<xsl:call-template name="term2036" />
</xsl:when>
<xsl:when test="contains(Path,'.png')">
<!--PNG Image file-->
<xsl:call-template name="term2037" />
</xsl:when>
<xsl:otherwise>
<!--Unknown File Type-->
<xsl:call-template name="term2038" />
</xsl:otherwise>
</xsl:choose>
</a>
</p>
</font>
</div>
</xsl:template>
<!-- Job Brief -->
<xsl:template match="Content[@type='Job']" mode="displayBrief">
<xsl:param name="sortBy"/>
<!-- vacancyBrief -->
<xsl:variable name="parId">
<xsl:choose>
<xsl:when test="@parId > 0">
<xsl:value-of select="@parId"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="/Page/@id"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="parentURL">
<xsl:apply-templates select="self::Content" mode="getHref">
<xsl:with-param name="parId" select="$parId"/>
</xsl:apply-templates>
</xsl:variable>
<div class="listItem list-group-item">
<xsl:apply-templates select="." mode="inlinePopupOptions">
<xsl:with-param name="class" select="'listItem list-group-item'"/>
</xsl:apply-templates>
<div class="lIinner">
<h3 class="title">
<a href="{$parentURL}?{$mailer_utm_campaign}" title="{JobTitle/node()}">
<xsl:value-of select="JobTitle/node()"/>
</a>
</h3>
<table border="0">
<tr>
<td rowspan="6" width="60%" valign="top">
<xsl:if test="Summary/node()!=''">
<xsl:apply-templates select="Summary/node()" mode="cleanXhtml"/>
</xsl:if>
</td>
<td rowspan="6" valign="top" width="4%"> </td>
<td width="18%">
<font face="{$bodyFont}" size="{$bodySize}" color="{$bodyColour}">
<xsl:call-template name="term2062" />
<xsl:text>: </xsl:text>
</font>
</td>
<td width="18%">
<font face="{$bodyFont}" size="{$bodySize}" color="{$bodyColour}">
<xsl:call-template name="DisplayDate">
<xsl:with-param name="date" select="@publish"/>
</xsl:call-template>
</font>
</td>
</tr>
<xsl:if test="ContractType/node()!=''">
<tr>
<td>
<font face="{$bodyFont}" size="{$bodySize}" color="{$bodyColour}">
<!--Contract Type-->
<xsl:call-template name="term2063" />
<xsl:text>: </xsl:text>
</font>
</td>
<td>
<font face="{$bodyFont}" size="{$bodySize}" color="{$bodyColour}">
<xsl:value-of select="ContractType/node()"/>
</font>
</td>
</tr>
</xsl:if>
<xsl:if test="Ref/node()!=''">
<tr>
<td>
<font face="{$bodyFont}" size="{$bodySize}" color="{$bodyColour}">
<!--Ref-->
<xsl:call-template name="term2064" />
<xsl:text>: </xsl:text>
</font>
</td>
<td>
<font face="{$bodyFont}" size="{$bodySize}" color="{$bodyColour}">
<xsl:value-of select="Ref/node()"/>
</font>
</td>
</tr>
</xsl:if>
<xsl:if test="Location/node()!=''">
<tr>
<td>
<font face="{$bodyFont}" size="{$bodySize}" color="{$bodyColour}">
<!--Location-->
<xsl:call-template name="term2065" />
<xsl:text>: </xsl:text>
</font>
</td>
<td>
<font face="{$bodyFont}" size="{$bodySize}" color="{$bodyColour}">
<xsl:value-of select="Location/node()"/>
</font>
</td>
</tr>
</xsl:if>
<xsl:if test="Salary/node()!=''">
<tr>
<td>
<font face="{$bodyFont}" size="{$bodySize}" color="{$bodyColour}">
<!--Salary-->
<xsl:call-template name="term2066" />
<xsl:text>: </xsl:text>
</font>
</td>
<td>
<font face="{$bodyFont}" size="{$bodySize}" color="{$bodyColour}">
<xsl:value-of select="Salary/node()"/>
</font>
</td>
</tr>
</xsl:if>
<xsl:if test="ApplyBy/node()!=''">
<tr>
<td>
<font face="{$bodyFont}" size="{$bodySize}" color="{$bodyColour}">
<!--Deadline for applications-->
<xsl:call-template name="term2067" />
<xsl:text>: </xsl:text>
</font>
</td>
<td>
<font face="{$bodyFont}" size="{$bodySize}" color="{$bodyColour}">
<xsl:call-template name="DisplayDate">
<xsl:with-param name="date" select="ApplyBy/node()"/>
</xsl:call-template>
</font>
</td>
</tr>
</xsl:if>
</table>
<font face="{$bodyFont}" size="{$bodySize}" color="{$bodyColour}">
<a style="white-space:nowrap;text-align:right;">
<xsl:attribute name="href">
<xsl:apply-templates select="." mode="getHref" />
<xsl:text>?</xsl:text>
<xsl:call-template name="mailer_utm_campaign"/>
</xsl:attribute>
<xsl:attribute name="title">
<xsl:text>view </xsl:text>
<xsl:apply-templates select="." mode="getDisplayName" />
</xsl:attribute>
<font face="{$bodyFont}" color="{$linkColour}">
<xsl:text>more ></xsl:text>
</font>
</a>
</font>
</div>
</div>
</xsl:template>
<!--*********************************** Placeholder for Xform Editing when no Admin XSL used. ************-->
<xsl:template match="/" mode="optOutStatement">
<xsl:param name="style"/>
<xsl:choose>
<xsl:when test="/Page/@adminMode">
<div>
<xsl:if test="$style!=''">
<xsl:attribute name="style">
<xsl:value-of select="$style"/>
</xsl:attribute>
</xsl:if>
<xsl:apply-templates select="/Page" mode="inlinePopupSingle">
<xsl:with-param name="type">FormattedText</xsl:with-param>
<xsl:with-param name="text">Add Opt Out Statement</xsl:with-param>
<xsl:with-param name="name">mailerOptOutStatement</xsl:with-param>
</xsl:apply-templates>
<xsl:apply-templates select="/Page/Contents/Content[@name='mailerOptOutStatement']" mode="displayBrief"/>
<xsl:if test="not(/Page/Contents/Content[@name='mailerOptOutStatement'])">
<xsl:apply-templates select="/" mode="optOutDefaultStatement"/>
</xsl:if>
</div>
</xsl:when>
<xsl:otherwise>
<span>
<xsl:if test="$style!=''">
<xsl:attribute name="style">
<xsl:value-of select="$style"/>
</xsl:attribute>
</xsl:if>
<xsl:choose>
<xsl:when test="/Page/Contents/Content[@name='mailerOptOutStatement']">
<xsl:apply-templates select="/Page/Contents/Content[@name='mailerOptOutStatement']" mode="displayBrief"/>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="/" mode="optOutDefaultStatement"/>
</xsl:otherwise>
</xsl:choose>
</span>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- -->
<xsl:template match="/" mode="optOutDefaultStatement">
<p>
<xsl:text>To </xsl:text>
<strong>UNSUBSCRIBE</strong>
<xsl:text>, please log onto your Account and adjust your newsletter settings </xsl:text>
<a title="Go to Account">
<xsl:attribute name="href">
<xsl:value-of select="$siteURL"/>
<xsl:value-of select="/Page/Menu[@id='Site']/MenuItem/descendant-or-self::MenuItem[layout/node()='Logon_Register']/@url"/>
</xsl:attribute>
<xsl:text>Click Here.</xsl:text>
</a>
<br/>
<xsl:text>However if you did not choose to receive this email please contact the website administrator or reply to sender.</xsl:text>
</p>
<unsubscribe>
<xsl:text>Unsubscribe</xsl:text>
</unsubscribe>
</xsl:template>
<!-- -->
<xsl:template name="rssSubscribe">
<img src="{$siteURL}/ewcommon/images/icons/rss16x16.png" width="16" height="16" alt="RSS" style="border:none;"/>
</xsl:template>
<xsl:template name="eonicDeveloperLink">
<xsl:param name="style"/>
<xsl:variable name="href">
<xsl:text>http://www.eonic.co.uk/</xsl:text>
<xsl:call-template name="mailer_utm_campaign_eonic"/>
</xsl:variable>
<a class="devLink" href="{$href}" title="This newsletter was generated by eonicweb4. Click here to see what eonic can offer you." target="new" style="{$style}">
<xsl:text>generated by eonic</xsl:text>
<strong>web</strong>
<xsl:text>4</xsl:text>
</a>
</xsl:template>
<!-- -->
<xsl:template name="mailer_utm_campaign_eonic">
<xsl:text>?utm_medium=email</xsl:text>
<xsl:text>&utm_source=</xsl:text>
<xsl:value-of select="$siteURL"/>
<xsl:text>&utm_campaign=mailer</xsl:text>
</xsl:template>
<!-- -->
<!-- -->
<xsl:template match="Content[@type='Module']" mode="moduleLink">
<xsl:param name="headingColour"/>
<xsl:choose>
<xsl:when test="@link!=''">
<a>
<xsl:attribute name="href">
<xsl:choose>
<xsl:when test="format-number(@link,'0')!='NaN'">
<xsl:variable name="pageId" select="@link"/>
<xsl:apply-templates select="/Page/Menu/descendant-or-self::MenuItem[@id=$pageId]" mode="getHref"/>
<xsl:text>?</xsl:text>
<xsl:call-template name="mailer_utm_campaign"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="@link"/>
<xsl:text>?</xsl:text>
<xsl:call-template name="mailer_utm_campaign"/>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:attribute name="title">
<xsl:choose>
<xsl:when test="format-number(@link,'0')!='NaN'">
<xsl:variable name="pageId" select="@link"/>
<xsl:apply-templates select="/Page/Menu/descendant-or-self::MenuItem[@id=$pageId]" mode="getDisplayName" />
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="@linkText and @linkText!=''">
<xsl:value-of select="@linkText"/>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="." mode="moduleTitle"/>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:if test="@linkType='external'">
<xsl:attribute name="rel">external</xsl:attribute>
</xsl:if>
<font face="{$HxFont}" size="4" color="{@headingColour}">
<xsl:apply-templates select="." mode="moduleTitle"/>
</font>
</a>
</xsl:when>
<xsl:otherwise>
<font face="{$HxFont}" size="4" color="{@headingColour}">
<xsl:apply-templates select="." mode="moduleTitle"/>
</font>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- -->
<xsl:template match="*" mode="moreLink">
<xsl:param name="link"/>
<xsl:param name="linkText"/>
<xsl:param name="altText"/>
<table cellpadding="0" cellspacing="0" >
<tr>
<td style="white-space:nowrap;background:{$btnBackground};padding:{$btnPad};">
<a style="white-space:nowrap; color:{$btnColour}; font-family: {$bodyFont}; text-decoration:none;">
<xsl:choose>
<xsl:when test="$linkText!=''">
<xsl:value-of select="$linkText"/>
</xsl:when>
<xsl:otherwise>Read more</xsl:otherwise>
</xsl:choose>
</a>
</td>
</tr>
</table>
</xsl:template>
<xsl:template match="p" mode="cleanXhtml">
<font face="{$bodyFont}" size="{$bodySize}" color="{$bodyColour}">
<xsl:element name="{name()}">
<!-- process attributes -->
<xsl:for-each select="@*">
<!-- remove attribute prefix (if any) -->
<xsl:attribute name="{name()}">
<xsl:value-of select="." />
</xsl:attribute>
</xsl:for-each>
<xsl:apply-templates mode="cleanXhtml"/>
</xsl:element>
</font>
</xsl:template>
<xsl:template match="h2" mode="cleanXhtml">
<h2 face="{$bodyFont}" size="{$bodySize}" color="{$bodyColour}" style ="margin-bottom: 10px; margin-top: 20px;">
<!-- process attributes -->
<xsl:for-each select="@*">
<!-- remove attribute prefix (if any) -->
<xsl:attribute name="{name()}">
<xsl:value-of select="." />
</xsl:attribute>
</xsl:for-each>
<xsl:apply-templates mode="cleanXhtml"/>
</h2>
</xsl:template>
<xsl:template match="a" mode="cleanXhtml">
<xsl:variable name="href">
<xsl:choose>
<xsl:when test="contains(@href,'http://')">
<xsl:value-of select="@href"/>
</xsl:when>
<xsl:when test="contains(@href,'https://')">
<xsl:value-of select="@href"/>
</xsl:when>
<xsl:when test="contains(@href,'mailto:')">
<xsl:value-of select="@href"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$siteURL"/>
<xsl:value-of select="@href"/>
<xsl:choose>
<xsl:when test="contains(@href,'?')">&</xsl:when>
<xsl:otherwise>
<xsl:text>?</xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="$mailer_utm_campaign"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<a href="{$href}" title="{@title}" style="{@style}">
<xsl:apply-templates mode="cleanXhtml"/>
</a>
</xsl:template>
<xsl:template match="img" mode="cleanXhtml">
<!-- Stick in Variable and then ms:nodest it
- ensures its self closing and we can process all nodes!! -->
<xsl:variable name="img">
<xsl:element name="img">
<xsl:for-each select="@*[name()!='onclick']">
<xsl:attribute name="{name()}">
<xsl:choose>
<!-- ##### @Attribute Conditions ##### -->
<xsl:when test="name()='src'">
<xsl:variable name="newSrc">
<xsl:call-template name="replace-string">
<xsl:with-param name="text" select="." />
<xsl:with-param name="replace" select="' '" />
<xsl:with-param name="with" select="'%20'" />
</xsl:call-template>
</xsl:variable>
<xsl:choose>
<xsl:when test="contains(.,'http://')">
<xsl:value-of select="$newSrc"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$siteURL"/>
<xsl:value-of select="$newSrc"/>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<!-- ##### VALIDATION - Attribute "align" can not be used for this element. ##### -->
<xsl:when test="name()='class' and (ancestor::img[@align] or contains(ancestor::img/@style,'float: '))">
<xsl:variable name="align" select="ancestor::img/@align"/>
<xsl:variable name="float" select="substring-before(substring-after(ancestor::img/@style,'float: '),';')"/>
<xsl:value-of select="." />
<xsl:text> align</xsl:text>
<xsl:choose>
<xsl:when test="@align">
<xsl:value-of select="$align"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$float"/>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="." />
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
</xsl:for-each>
<!-- ##### VALIDATION - Attribute "align" can not be used for this element. ##### -->
<xsl:if test="not(@class) and (@align or contains(@style,'float: '))">
<xsl:attribute name="class">
<xsl:variable name="float" select="substring-before(substring-after(@style,'float: '),';')"/>
<xsl:variable name="align" select="@align"/>
<xsl:text>align</xsl:text>
<xsl:choose>
<xsl:when test="@align">
<xsl:value-of select="$align"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$float"/>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
</xsl:if>
<!-- ##### VALIDATION - required attribute "alt" ##### -->
<xsl:if test="not(@alt)">
<xsl:attribute name="alt"></xsl:attribute>
</xsl:if>
</xsl:element>
</xsl:variable>
<xsl:copy-of select="ms:node-set($img)"/>
</xsl:template>
<xsl:template match="Content | MenuItem" mode="displayThumbnail">
<xsl:param name="style"/>
<xsl:param name="align"/>
<xsl:param name="hspace"/>
<xsl:param name="vspace"/>
<!-- IF SO THAT we don't get empty tags if NO IMAGE -->
<xsl:if test="Images/img[@src and @src!='']">
<!-- SRC VALUE -->
<xsl:variable name="src">
<xsl:choose>
<!-- IF Thumbnail use that -->
<xsl:when test="Images/img[@class='thumbnail']/@src!=''">
<xsl:value-of select="Images/img[@class='thumbnail']/@src"/>
</xsl:when>
<!-- IF Full Size use that -->
<xsl:when test="Images/img[@class='detail']/@src!=''">
<xsl:value-of select="Images/img[@class='detail']/@src"/>
</xsl:when>
<!-- ELSE use display -->
<xsl:otherwise>
<xsl:value-of select="Images/img[@class='display']/@src"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<!-- ALT VALUE -->
<xsl:variable name="alt">
<xsl:choose>
<!-- IF Thumbnail use that -->
<xsl:when test="Images/img[@class='thumbnail']/@alt!=''">
<xsl:value-of select="Images/img[@class='thumbnail']/@alt"/>
</xsl:when>
<!-- IF Full Size use that -->
<xsl:when test="Images/img[@class='detail']/@alt!=''">
<xsl:value-of select="Images/img[@class='detail']/@alt"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="@name"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="max-width">
<xsl:apply-templates select="." mode="getThWidth"/>
</xsl:variable>
<xsl:variable name="max-height">
<xsl:apply-templates select="." mode="getThHeight"/>
</xsl:variable>
<!-- IF Image to resize -->
<xsl:if test="$src!=''">
<xsl:variable name="newSrc">
<xsl:call-template name="resize-image">
<xsl:with-param name="path" select="$src"/>
<xsl:with-param name="max-width" select="$max-width"/>
<xsl:with-param name="max-height" select="$max-height"/>
<xsl:with-param name="file-prefix">
<xsl:text>~th-</xsl:text>
<xsl:value-of select="$max-width"/>
<xsl:text>x</xsl:text>
<xsl:value-of select="$max-height"/>
<xsl:text>/~th-</xsl:text>
</xsl:with-param>
<xsl:with-param name="file-suffix" select="''"/>
<xsl:with-param name="quality" select="100"/>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="image">
<img>
<!-- SRC -->
<xsl:attribute name="src">
<xsl:value-of select="$siteURL"/>
<xsl:value-of select="$newSrc"/>
</xsl:attribute>
<!-- Width -->
<xsl:attribute name="width">
<xsl:value-of select="ew:ImageWidth($newSrc)" />
</xsl:attribute>
<!-- Height -->
<xsl:attribute name="height">
<xsl:value-of select="ew:ImageHeight($newSrc)" />
</xsl:attribute>
<!-- Height -->
<xsl:attribute name="alt">
<xsl:value-of select="$alt" />
</xsl:attribute>
<!-- Height -->
<xsl:attribute name="class">
<xsl:text>photo thumbnail resized</xsl:text>
</xsl:attribute>
<xsl:if test="$style!=''">
<xsl:attribute name="style">
<xsl:value-of select="$style" />
</xsl:attribute>
</xsl:if>
<xsl:if test="$align!=''">
<xsl:attribute name="align">
<xsl:value-of select="$align" />
</xsl:attribute>
</xsl:if>
<xsl:if test="$hspace!=''">
<xsl:attribute name="hspace">
<xsl:value-of select="$hspace" />
</xsl:attribute>
</xsl:if>
<xsl:if test="$vspace!=''">
<xsl:attribute name="vspace">
<xsl:value-of select="$vspace" />
</xsl:attribute>
</xsl:if>
</img>
</xsl:variable>
<xsl:apply-templates select="ms:node-set($image)/*" mode="cleanXhtml" />
</xsl:if>
</xsl:if>
</xsl:template>
<xsl:template name="getSiteURL">
<xsl:text>http://</xsl:text>
<xsl:value-of select="/Page/Request/ServerVariables/Item[@name='SERVER_NAME']/node()"/>
</xsl:template>
</xsl:stylesheet> | 39.901864 | 267 | 0.514489 |
621fbd5b8494ee2d4187ede657877837729369eb | 997 | xsl | XSLT | tasks/03-instruction-for-objective/instr-obj.xsl | MALTT-STIC/stic-2-xml-dtd-xslt | 9de543f277fbc59420f3707eb13005b8c783b115 | [
"MIT"
] | null | null | null | tasks/03-instruction-for-objective/instr-obj.xsl | MALTT-STIC/stic-2-xml-dtd-xslt | 9de543f277fbc59420f3707eb13005b8c783b115 | [
"MIT"
] | null | null | null | tasks/03-instruction-for-objective/instr-obj.xsl | MALTT-STIC/stic-2-xml-dtd-xslt | 9de543f277fbc59420f3707eb13005b8c783b115 | [
"MIT"
] | null | null | null | <?xml version="1.0" encoding="UTF-8"?>
<!-- Define the XSL transformation element -->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" doctype-system="about:legacy-compat" encoding="UTF-8" indent="yes" />
<xsl:template match="objectives">
<html>
<head>
<title>A list of objectives</title>
</head>
<body>
<h1>A list of objectives</h1>
<xsl:apply-templates/>
</body>
</html>
</xsl:template>
<xsl:template match="objective">
<section>
<xsl:apply-templates />
</section>
</xsl:template>
<xsl:template match="title">
<h2>
<xsl:apply-templates/>
</h2>
</xsl:template>
<xsl:template match="description">
<p>
<xsl:apply-templates/>
</p>
</xsl:template>
<!-- YOUR CODE HERE -->
</xsl:stylesheet> | 21.673913 | 99 | 0.514544 |
5f96db0321224006058982602134c7f62191a0fd | 681 | xsl | XSLT | core/standards/xslt_xpath/OASIS-XSLT/xalan/math/math98.xsl | gsnedders/presto-testo | a0acfbef13a3f8cae67cc7145216d31b67aa8eb4 | [
"BSD-3-Clause"
] | null | null | null | core/standards/xslt_xpath/OASIS-XSLT/xalan/math/math98.xsl | gsnedders/presto-testo | a0acfbef13a3f8cae67cc7145216d31b67aa8eb4 | [
"BSD-3-Clause"
] | 6 | 2016-10-02T10:20:44.000Z | 2016-10-02T18:49:27.000Z | t/test_data/testsuite/TESTS/Xalan_Conformance_Tests/math/math98.xsl | jonathanstowe/XML-XSLT | 9392ac9fa5dc976469e0f333f75329c200e4d025 | [
"FSFAP"
] | null | null | null | <?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- FileName: math98 -->
<!-- Document: http://www.w3.org/TR/xpath -->
<!-- DocVersion: 19991116 -->
<!-- Section: 4.4 -->
<!-- Creator: David Marston -->
<!-- Purpose: Test of repeated use of -. Space away from - when required. -->
<xsl:variable name="anum" select="10"/>
<xsl:template match="doc">
<out>
<xsl:value-of select="100-9-7-4-17-18-5"/><xsl:text>,</xsl:text>
<xsl:value-of select="100-n6 -4-n1 -1-11"/><xsl:text>,</xsl:text>
<xsl:value-of select="100-$anum -5-15-$anum"/>
</out>
</xsl:template>
</xsl:stylesheet>
| 30.954545 | 80 | 0.581498 |
10fe2f5b70da83925001fadb923597ca596eddaa | 1,246 | xslt | XSLT | AWSSDK/Amazon.EC2/Model/GetConsoleOutputResponse.xslt | mahanthbeeraka/dataservices-sdk-dotnet | 1dd81b8a2b6595d0b36d2efe06a78a5a619ea889 | [
"Apache-2.0"
] | 38 | 2015-01-20T21:46:22.000Z | 2021-02-01T19:17:50.000Z | AWSSDK/Amazon.EC2/Model/GetConsoleOutputResponse.xslt | mahanthbeeraka/dataservices-sdk-dotnet | 1dd81b8a2b6595d0b36d2efe06a78a5a619ea889 | [
"Apache-2.0"
] | 3 | 2018-11-03T02:49:47.000Z | 2020-11-05T05:53:06.000Z | AWSSDK/Amazon.EC2/Model/GetConsoleOutputResponse.xslt | mahanthbeeraka/dataservices-sdk-dotnet | 1dd81b8a2b6595d0b36d2efe06a78a5a619ea889 | [
"Apache-2.0"
] | 42 | 2015-02-22T20:37:25.000Z | 2022-03-25T15:18:10.000Z | <?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ec2="default-ec2-namespace" exclude-result-prefixes="ec2">
<xsl:output method="xml" omit-xml-declaration="no" indent="yes"/>
<xsl:template match="ec2:GetConsoleOutputResponse">
<xsl:element name="GetConsoleOutputResponse">
<xsl:element name="ResponseMetadata">
<xsl:element name="RequestId">
<xsl:value-of select="ec2:requestId"/>
</xsl:element>
</xsl:element>
<xsl:element name="GetConsoleOutputResult">
<xsl:element name="ConsoleOutput">
<xsl:element name="InstanceId">
<xsl:value-of select="ec2:instanceId"/>
</xsl:element>
<xsl:element name="Timestamp">
<xsl:value-of select="ec2:timestamp"/>
</xsl:element>
<xsl:element name="Output">
<xsl:value-of select="ec2:output"/>
</xsl:element>
</xsl:element>
</xsl:element>
</xsl:element>
</xsl:template>
</xsl:stylesheet>
| 46.148148 | 143 | 0.52809 |
9d3cc26bc1701609c8f7bbc8a252aa8b51bf7a38 | 35,697 | xsl | XSLT | observation-manager/observation-manager-app/src/main/resources/xsl/oal2html/transform_uk.xsl | capape/observation-manager | e8cd135d45f9f9af13013770a140df4d3d7c27c9 | [
"Apache-2.0"
] | 5 | 2020-05-26T02:28:55.000Z | 2020-11-18T11:12:02.000Z | observation-manager/observation-manager-app/src/main/resources/xsl/oal2html/transform_uk.xsl | capape/observation-manager | e8cd135d45f9f9af13013770a140df4d3d7c27c9 | [
"Apache-2.0"
] | 9 | 2020-05-26T02:31:15.000Z | 2021-12-14T21:35:46.000Z | observation-manager/observation-manager-app/src/main/resources/xsl/oal2html/transform_uk.xsl | capape/observation-manager | e8cd135d45f9f9af13013770a140df4d3d7c27c9 | [
"Apache-2.0"
] | null | null | null | <?xml version="1.0" encoding="UTF-8"?>
<!-- Version 0.920RC2/UK0.1 -->
<!-- Build 16 -->
<!-- Last modified 27.02.2010 22:38:44 -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:external="http://ExternalFunction.xalan-c++.xml.apache.org" exclude-result-prefixes="external">
<!-- Formatting Angle -->
<xsl:template name="angle">
<xsl:param name="angle"/>
<xsl:value-of select="$angle"/>
<xsl:choose>
<xsl:when test="$angle[@unit='arcsec']">”</xsl:when>
<xsl:when test="$angle[@unit='arcmin']">′</xsl:when>
<xsl:when test="$angle[@unit='deg']">°</xsl:when>
<xsl:when test="$angle[@unit='rad']"> рад</xsl:when>
</xsl:choose>
</xsl:template>
<xsl:template match="session">
<p>
<xsl:text disable-output-escaping="yes"><a name="session</xsl:text>
<xsl:value-of select="@id"/>
<xsl:text disable-output-escaping="yes">"></xsl:text>
<b>Сесії: <xsl:value-of select="substring-before(begin, 'T')"/> у <xsl:value-of select="substring-after(begin, 'T')"/></b>
<xsl:value-of select="session"/>
<xsl:text disable-output-escaping="yes"></a></xsl:text>
</p>
<!-- Date of Observation -->
<table border="0" cellspacing="0" cellpadding="2" style="font-size:12;font-family:Verdana, Arial">
<tr>
<td>Початок:</td>
<td>
<xsl:value-of select="substring-before(begin, 'T')"/> у <xsl:value-of select="substring-after(begin, 'T')"/>
</td>
</tr>
<tr>
<td>Кінець:</td>
<td>
<xsl:value-of select="substring-before(end, 'T')"/> у <xsl:value-of select="substring-after(end, 'T')"/>
</td>
</tr>
</table>
<!-- Coobservers -->
<xsl:if test="count(coObserver)>0">
<p>Спостерігачі:
<ul>
<xsl:for-each select="coObserver">
<xsl:sort select="key('observerKey', .)/name"/>
<li>
<xsl:text disable-output-escaping="yes"><a href="#observer</xsl:text>
<xsl:value-of select="."/>
<xsl:text disable-output-escaping="yes">"></xsl:text>
<xsl:value-of select="key('observerKey', .)/name"/><xsl:text> </xsl:text><xsl:value-of select="key('observerKey', .)/surname"/>
<xsl:text disable-output-escaping="yes"></a></xsl:text>
</li>
</xsl:for-each>
</ul>
</p>
</xsl:if>
<xsl:if test="count(weather)>0 or count(equipment)>0 or count(comments)>0">
<table border="0" cellspacing="0" cellpadding="2" style="font-size:12;font-family:Verdana, Arial">
<!-- Weather -->
<xsl:if test="count(weather)>0">
<tr>
<td valign="top">Погода:</td>
<td valign="top">
<xsl:value-of select="weather"/>
</td>
</tr>
</xsl:if>
<!-- Equipment -->
<xsl:if test="count(equipment)>0">
<tr>
<td valign="top">Обладнання:</td>
<td valign="top">
<xsl:value-of select="equipment"/>
</td>
</tr>
</xsl:if>
<!-- Comments -->
<xsl:if test="count(comments)>0">
<tr>
<td valign="top">Примітки:</td>
<td valign="top">
<xsl:value-of select="comments"/>
</td>
</tr>
</xsl:if>
</table>
</xsl:if>
<xsl:call-template name="linkTop"/>
</xsl:template>
<xsl:template match="target">
<p>
<xsl:text disable-output-escaping="yes"><a name="target</xsl:text>
<xsl:value-of select="@id"/>
<xsl:text disable-output-escaping="yes">"></xsl:text>
<b>Об'єкт: </b>
<xsl:choose>
<xsl:when test="@type='oal:PlanetTargetType' or @type='oal:MoonTargetType' or @type='oal:SunTargetType'">
<xsl:choose>
<xsl:when test="name='SUN'">Сонце</xsl:when>
<xsl:when test="name='MERCURY'">Мекурій</xsl:when>
<xsl:when test="name='VENUS'">Венера</xsl:when>
<xsl:when test="name='EARTH'">Земля</xsl:when>
<xsl:when test="name='MOON'">Місяць</xsl:when>
<xsl:when test="name='MARS'">Марс</xsl:when>
<xsl:when test="name='JUPITER'">Юпітер</xsl:when>
<xsl:when test="name='SATURN'">Сатурн</xsl:when>
<xsl:when test="name='URANUS'">Уран</xsl:when>
<xsl:when test="name='NEPTUNE'">Нептун</xsl:when>
<xsl:otherwise><xsl:value-of select="name"/></xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise><xsl:value-of select="name"/></xsl:otherwise>
</xsl:choose>
<xsl:text disable-output-escaping="yes"></a></xsl:text>
</p>
<xsl:choose>
<xsl:when test="@type='oal:deepSkyGX'">Галактика</xsl:when>
<xsl:when test="@type='oal:deepSkyGC'">Кулясте скупчення</xsl:when>
<xsl:when test="@type='oal:deepSkyGN'">Світла туманність</xsl:when>
<xsl:when test="@type='oal:deepSkyOC'">РОзсіяне скупчення</xsl:when>
<xsl:when test="@type='oal:deepSkyPN'">Планетарна туманність</xsl:when>
<xsl:when test="@type='oal:deepSkyQS'">Квазар</xsl:when>
<xsl:when test="@type='oal:deepSkyDS'">Подвійна зоря</xsl:when>
<xsl:when test="@type='oal:deepSkyDN'">Темна туманність</xsl:when>
<xsl:when test="@type='oal:deepSkyAS'">Астеризм</xsl:when>
<xsl:when test="@type='oal:deepSkySC'">Зоряне поле</xsl:when>
<xsl:when test="@type='oal:deepSkyMS'">Кратна зоряна система</xsl:when>
<xsl:when test="@type='oal:deepSkyCG'">Скупчення галактик</xsl:when>
<xsl:when test="@type='oal:variableStarTargetType'">Змінна зоря</xsl:when>
<xsl:when test="@type='oal:SunTargetType'">Сонце</xsl:when>
<xsl:when test="@type='oal:MoonTargetType'">Місяць</xsl:when>
<xsl:when test="@type='oal:PlanetTargetType'">Планета</xsl:when>
<xsl:when test="@type='oal:MinorPlanetTargetType'">Мала планета</xsl:when>
<xsl:when test="@type='oal:CometTargetType'">Комета</xsl:when>
<xsl:when test="@type='oal:UndefinedTargetType'">Некласіфікований об'єкт</xsl:when>
<xsl:otherwise>(unknown Type)</xsl:otherwise>
</xsl:choose>
<xsl:if test="count(constellation)>0"> у <xsl:value-of select="constellation"/>
</xsl:if>
<p/>
<xsl:if test="count(alias)>0">
<div style="font-size:10">Інші назви: <xsl:for-each select="alias">
<xsl:value-of select="."/>
<xsl:if test="position() != last()">, </xsl:if>
</xsl:for-each>
</div>
<br/>
</xsl:if>
<table border="0" cellspacing="0" cellpadding="2" style="font-size:12;font-family:Verdana, Arial">
<xsl:if test="boolean(position/ra)">
<tr>
<td>RA:</td>
<td>
<xsl:call-template name="formatHHMM">
<xsl:with-param name="node" select="position/ra"/>
</xsl:call-template>
</td>
</tr>
</xsl:if>
<xsl:if test="boolean(position/dec)">
<tr>
<td>DEC:</td>
<td>
<xsl:call-template name="formatDDMM">
<xsl:with-param name="node" select="position/dec"/>
</xsl:call-template>
</td>
</tr>
</xsl:if>
<!-- Output from attributes of Subclasses -->
<xsl:if test="contains(@type,'oal:deepSky')">
<!-- Deep Sky -->
<xsl:if test="boolean(smallDiameter) and boolean(largeDiameter)">
<tr>
<td>Розмір:</td>
<td>
<xsl:call-template name="angle">
<xsl:with-param name="angle" select="smallDiameter"/>
</xsl:call-template> ×
<xsl:call-template name="angle">
<xsl:with-param name="angle" select="largeDiameter"/>
</xsl:call-template>
</td>
</tr>
</xsl:if>
<xsl:if test="boolean(visMag)">
<tr>
<td>m(вид.):</td>
<td>
<xsl:value-of select="visMag"/> mag</td>
</tr>
</xsl:if>
<xsl:if test="boolean(surfBr)">
<tr>
<td>Поверхнева яскравість:</td>
<td>
<xsl:value-of select="surfBr"/> mags/sq.arcmin</td>
</tr>
</xsl:if>
<!-- TODO -->
<xsl:for-each select="surfBr/following-sibling::*">
<tr>
<td>
<xsl:value-of select="local-name()"/>:</td>
<td>
<xsl:value-of select="."/>
</td>
</tr>
</xsl:for-each>
</xsl:if>
<!-- ################################################################### -->
<!-- TODO: Other subclasses like planets -->
<!-- ################################################################### -->
<xsl:if test="boolean(observer)">
<tr>
<td>Походження:</td>
<td>
<xsl:value-of select="key('observerKey', observer)/surname"/>,
<xsl:text/>
<xsl:value-of select="key('observerKey', observer)/name"/>
</td>
</tr>
</xsl:if>
<xsl:if test="boolean(datasource)">
<tr>
<td>Походження:</td>
<td>
<xsl:value-of select="datasource"/>
</td>
</tr>
</xsl:if>
</table>
</xsl:template>
<xsl:template name="formatHHMM">
<xsl:param name="node"/>
<xsl:param name="hrs"><xsl:value-of select='floor($node div 15)'/></xsl:param>
<xsl:param name="hrs_rest"><xsl:value-of select='$node - ($hrs * 15)'/></xsl:param>
<xsl:param name="minutes"><xsl:value-of select='floor($hrs_rest * 60 div 15)'/></xsl:param>
<xsl:param name="minutes_rest"><xsl:value-of select='$hrs_rest - ($minutes div 60 * 15)'/></xsl:param>
<xsl:param name="sec"><xsl:value-of select='round($minutes_rest * 3600 div 15)'/></xsl:param>
<result><xsl:value-of select="$hrs"/>ч <xsl:if test="$minutes < 10">0</xsl:if><xsl:value-of select="$minutes"/>х <xsl:if test="$sec < 10">0</xsl:if><xsl:value-of select="$sec"/>с</result>
</xsl:template>
<xsl:template name="formatDDMM">
<xsl:param name="node"/>
<xsl:if test='$node < 0'>
<xsl:call-template name="formatDDMM_lower">
<xsl:with-param name="node" select="$node"/>
</xsl:call-template>
</xsl:if>
<xsl:if test="$node > 0 or $node = 0">
<xsl:call-template name="formatDDMM_higher">
<xsl:with-param name="node" select="$node"/>
</xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:template name="formatDDMM_lower">
<xsl:param name="node"/>
<xsl:param name="abs_degrees"><xsl:value-of select='- $node'/></xsl:param>
<xsl:param name="degs"><xsl:value-of select='floor($abs_degrees)'/></xsl:param>
<xsl:param name="degs_rest"><xsl:value-of select='$abs_degrees - $degs'/></xsl:param>
<xsl:param name="minutes"><xsl:value-of select='floor(60 * ($degs_rest))'/></xsl:param>
<xsl:param name="minutes_rest"><xsl:value-of select='$degs_rest - ($minutes div 60)'/></xsl:param>
<xsl:param name="sec"><xsl:value-of select='round($minutes_rest * 3600)'/></xsl:param>
<result>-<xsl:value-of select="$degs"/><xsl:text>° </xsl:text><xsl:if test="$minutes < 10">0</xsl:if><xsl:value-of select="$minutes"/><xsl:text>' </xsl:text><xsl:if test="$sec < 10">0</xsl:if><xsl:value-of select="$sec"/><xsl:text>"</xsl:text></result>
</xsl:template>
<xsl:template name="formatDDMM_higher">
<xsl:param name="node"/>
<xsl:param name="degs"><xsl:value-of select='floor($node)'/></xsl:param>
<xsl:param name="degs_rest"><xsl:value-of select='$node - $degs'/></xsl:param>
<xsl:param name="minutes"><xsl:value-of select='floor(60 * ($degs_rest))'/></xsl:param>
<xsl:param name="minutes_rest"><xsl:value-of select='$degs_rest - ($minutes div 60)'/></xsl:param>
<xsl:param name="sec"><xsl:value-of select='round($minutes_rest * 3600)'/></xsl:param>
<result><xsl:value-of select="$degs"/><xsl:text>° </xsl:text><xsl:if test="$minutes < 10">0</xsl:if><xsl:value-of select="$minutes"/><xsl:text>' </xsl:text><xsl:if test="$sec < 10">0</xsl:if><xsl:value-of select="$sec"/><xsl:text>"</xsl:text></result>
</xsl:template>
<xsl:template match="observer">
<p>
<xsl:text disable-output-escaping="yes"><a name="observer</xsl:text>
<xsl:value-of select="@id"/>
<xsl:text disable-output-escaping="yes">"></xsl:text>
<b>Спостерігач: </b>
<xsl:value-of select="name"/>
<xsl:text> </xsl:text>
<xsl:value-of select="surname"/>
<xsl:text disable-output-escaping="yes"></a></xsl:text>
</p>
<xsl:if test="count(contact) > 0">Контакти:<br/>
<ul>
<xsl:for-each select="contact">
<li>
<xsl:value-of select="."/>
</li>
</xsl:for-each>
</ul>
</xsl:if>
<xsl:call-template name="linkTop"/>
</xsl:template>
<xsl:template match="site">
<p>
<xsl:text disable-output-escaping="yes"><a name="site</xsl:text>
<xsl:value-of select="@id"/>
<xsl:text disable-output-escaping="yes">"></xsl:text>
<b>Місце спостереження: </b>
<xsl:value-of select="name"/>
<xsl:text disable-output-escaping="yes"></a></xsl:text>
</p>
<table border="0" cellspacing="0" cellpadding="2" style="font-size:12;font-family:Verdana, Arial">
<tr>
<td>Довгота:</td>
<td>
<xsl:call-template name="angle">
<xsl:with-param name="angle" select="longitude"/>
</xsl:call-template>
</td>
</tr>
<tr>
<td>Широта:</td>
<td>
<xsl:call-template name="angle">
<xsl:with-param name="angle" select="latitude"/>
</xsl:call-template>
</td>
</tr>
<tr>
<td>Часовий пояс:</td>
<td>UT<xsl:if test="timezone >= 0">+</xsl:if>
<xsl:value-of select="timezone"/> хв.</td>
</tr>
</table>
<xsl:call-template name="linkTop"/>
</xsl:template>
<xsl:template match="scope">
<p>
<xsl:text disable-output-escaping="yes"><a name="scope</xsl:text>
<xsl:value-of select="@id"/>
<xsl:text disable-output-escaping="yes">"></xsl:text>
<b>Телескоп: </b>
<xsl:value-of select="model"/>
<xsl:text disable-output-escaping="yes"></a></xsl:text>
</p>
<table border="0" cellspacing="0" cellpadding="2" style="font-size:12;font-family:Verdana, Arial">
<xsl:if test="count(type)>0">
<tr>
<td>Тип:</td>
<td>
<xsl:value-of select="type"/>
</td>
</tr>
</xsl:if>
<xsl:if test="count(vendor)>0">
<tr>
<td>Виробник:</td>
<td>
<xsl:value-of select="vendor"/>
</td>
</tr>
</xsl:if>
<tr>
<td>Апертура:</td>
<td>
<xsl:value-of select="aperture"/> mm</td>
</tr>
<xsl:if test="count(focalLength)>0">
<tr>
<td>Фокусна відстань:</td>
<td>
<xsl:value-of select="focalLength"/> mm</td>
</tr>
</xsl:if>
<xsl:if test="count(magnification)>0">
<tr>
<td>Збільшення:</td>
<td>
<xsl:value-of select="magnification"/> ×</td>
</tr>
</xsl:if>
<xsl:if test="count(trueField)>0">
<tr>
<td>Дійсне поле зору:</td>
<td>
<xsl:call-template name="angle">
<xsl:with-param name="angle" select="trueField"/>
</xsl:call-template>
</td>
</tr>
</xsl:if>
<xsl:if test="count(lightGrasp)>0">
<tr>
<td>Світлова ефективність:</td>
<td>
<xsl:value-of select="lightGrasp"/>
</td>
</tr>
</xsl:if>
</table>
<xsl:call-template name="linkTop"/>
</xsl:template>
<xsl:template match="eyepiece">
<p>
<xsl:text disable-output-escaping="yes"><a name="eyepiece</xsl:text>
<xsl:value-of select="@id"/>
<xsl:text disable-output-escaping="yes">"></xsl:text>
<xsl:if test="count(maxFocalLength)>0">
<b>Зум-окуляр: </b>
</xsl:if>
<xsl:if test="count(maxFocalLength)=0">
<b>Окуляр: </b>
</xsl:if>
<xsl:value-of select="model"/>
<xsl:text disable-output-escaping="yes"></a></xsl:text>
</p>
<table border="0" cellspacing="0" cellpadding="2" style="font-size:12;font-family:Verdana, Arial">
<xsl:if test="count(vendor)>0">
<tr>
<td>Виробник:</td>
<td>
<xsl:value-of select="vendor"/>
</td>
</tr>
</xsl:if>
<tr>
<td>Фокусна відстань:</td>
<td>
<xsl:value-of select="focalLength"/>
<xsl:if test="count(maxFocalLength)>0">-<xsl:value-of select="maxFocalLength"/></xsl:if> mm
</td>
</tr>
<xsl:if test="count(apparentFOV)>0">
<tr>
<td>Видиме поле зору:</td>
<td>
<xsl:call-template name="angle">
<xsl:with-param name="angle" select="apparentFOV"/>
</xsl:call-template>
</td>
</tr>
</xsl:if>
</table>
<xsl:call-template name="linkTop"/>
</xsl:template>
<xsl:template match="lens">
<p>
<xsl:text disable-output-escaping="yes"><a name="lens</xsl:text>
<xsl:value-of select="@id"/>
<xsl:text disable-output-escaping="yes">"></xsl:text>
<b>Лінзи: </b>
<xsl:value-of select="model"/>
<xsl:text disable-output-escaping="yes"></a></xsl:text>
</p>
<table border="0" cellspacing="0" cellpadding="2" style="font-size:12;font-family:Verdana, Arial">
<xsl:if test="count(vendor)>0">
<tr>
<td>Виробник:</td>
<td>
<xsl:value-of select="vendor"/>
</td>
</tr>
</xsl:if>
<tr>
<td>Фактор корегування:</td>
<td>
<xsl:value-of select="factor"/> x</td>
</tr>
</table>
<xsl:call-template name="linkTop"/>
</xsl:template>
<xsl:template match="imager">
<p>
<xsl:text disable-output-escaping="yes"><a name="imager</xsl:text>
<xsl:value-of select="@id"/>
<xsl:text disable-output-escaping="yes">"></xsl:text>
<xsl:if test="count(pixelsX)>0">
<b>Камера ПЗЗ: </b>
</xsl:if>
<xsl:if test="count(pixelsX)=0">
<b>Камера: </b>
</xsl:if>
<xsl:value-of select="model"/>
<xsl:text disable-output-escaping="yes"></a></xsl:text>
</p>
<table border="0" cellspacing="0" cellpadding="2" style="font-size:12;font-family:Verdana, Arial">
<xsl:if test="count(vendor)>0">
<tr>
<td>Виробник:</td>
<td>
<xsl:value-of select="vendor"/>
</td>
</tr>
</xsl:if>
<xsl:if test="count(pixelsX)>0">
<tr>
<td>Пікселі:</td>
<td>
<xsl:value-of select="pixelsX"/>x<xsl:value-of select="pixelsY"/>
</td>
</tr>
</xsl:if>
</table>
<xsl:call-template name="linkTop"/>
</xsl:template>
<xsl:template match="filter">
<p>
<xsl:text disable-output-escaping="yes"><a name="filter</xsl:text>
<xsl:value-of select="@id"/>
<xsl:text disable-output-escaping="yes">"></xsl:text>
<b>Фільтр: </b>
<xsl:value-of select="model"/>
<xsl:text disable-output-escaping="yes"></a></xsl:text>
</p>
<table border="0" cellspacing="0" cellpadding="2" style="font-size:12;font-family:Verdana, Arial">
<xsl:if test="count(type)>0">
<tr>
<td>Тип:</td>
<td>
<xsl:choose>
<xsl:when test="type='other'">Інший</xsl:when>
<xsl:when test="type='broad band'">Широкосмуговий</xsl:when>
<xsl:when test="type='narrow band'">Вузькосмуговий</xsl:when>
<xsl:when test="type='O-III'">OIII</xsl:when>
<xsl:when test="type='Solar'">Сонячний</xsl:when>
<xsl:when test="type='H-beta'">H-Beta</xsl:when>
<xsl:when test="type='H-alpha'">H-Alpha</xsl:when>
<xsl:when test="type='color'">Кольоровий</xsl:when>
<xsl:when test="type='neutral'">Нейтральний</xsl:when>
<xsl:when test="type='corrective'">Корегуючий</xsl:when>
<xsl:otherwise>(невідомий тип)</xsl:otherwise>
</xsl:choose>
</td>
</tr>
<xsl:if test="count(color)>0">
<tr>
<td>Колір:</td>
<td>
<xsl:choose>
<xsl:when test="color='light red'">Світло-червоний</xsl:when>
<xsl:when test="color='red'">Червоний</xsl:when>
<xsl:when test="color='deep red'">Темно-червоний</xsl:when>
<xsl:when test="color='orange'">Оранжевий</xsl:when>
<xsl:when test="color='light yellow'">Світло-жовтий</xsl:when>
<xsl:when test="color='deep yellow'">Темно-жовтий</xsl:when>
<xsl:when test="color='yellow'">Жовтий</xsl:when>
<xsl:when test="color='yellow-green'">Жовто-зелений</xsl:when>
<xsl:when test="color='light green'">Світло-зелений</xsl:when>
<xsl:when test="color='green'">Зелений</xsl:when>
<xsl:when test="color='medium blue'">Світло-синій</xsl:when>
<xsl:when test="color='pale blue'">Блакитний</xsl:when>
<xsl:when test="color='blue'">Синій</xsl:when>
<xsl:when test="color='deep blue'">Темно-синій</xsl:when>
<xsl:when test="color='violet'">Фіолетовий</xsl:when>
<xsl:otherwise>(невідомий колір)</xsl:otherwise>
</xsl:choose>
</td>
</tr>
</xsl:if>
<xsl:if test="count(wratten)>0">
<tr>
<td>Код за Wratten:</td>
<td>
<xsl:value-of select="wratten"/>
</td>
</tr>
</xsl:if>
<xsl:if test="count(schott)>0">
<tr>
<td>Код за Schott:</td>
<td>
<xsl:value-of select="schott"/>
</td>
</tr>
</xsl:if>
</xsl:if>
</table>
<xsl:call-template name="linkTop"/>
</xsl:template>
<xsl:template match="result">
<ul>
<xsl:if test="string-length(description)>0">
<li>
<xsl:value-of select="description"/>
<br/>
</li>
</xsl:if>
<xsl:if test="contains(./@type,'findingsDeepSkyType') or contains(./@type,'findingsDeepSkyOCType') or contains(./@type,'findingsDeepSkyDSType')">
<!-- Print scale of german Deep Sky List -->
<li>Візуальне сприйняття:
<xsl:choose>
<xsl:when test="contains(./@type,'findingsDeepSkyOCType')">
<!-- open starcluster -->
<xsl:choose>
<xsl:when test="rating = '1'">Simple conspicuous, extremly nice starcluster</xsl:when>
<xsl:when test="rating = '2'">Conspicuous, nice starcluster</xsl:when>
<xsl:when test="rating = '3'">Good viewable starcluster</xsl:when>
<xsl:when test="rating = '4'">Starcluster not very conspicuous</xsl:when>
<xsl:when test="rating = '5'">Starcluster can hardly be seen</xsl:when>
<xsl:when test="rating = '6'">Starcluster dubiously sighted</xsl:when>
<xsl:when test="rating = '7'">At the given position alsmost no stars</xsl:when>
</xsl:choose>
</xsl:when>
<xsl:when test="contains(./@type,'findingsDeepSkyDSType')">
<!-- Double stars -->
<xsl:choose>
<xsl:when test="rating = '1'">Doublestar could be resolved</xsl:when>
<xsl:when test="rating = '2'">Doublestar appears as "8"</xsl:when>
<xsl:when test="rating = '3'">Doublestar couldn't be resolved</xsl:when>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<!-- other objecttype -->
<xsl:choose>
<xsl:when test="rating = '1'">Звичайно помітний об’єкт в окулярі</xsl:when>
<xsl:when test="rating = '2'">Добре видимий прямим зором</xsl:when>
<xsl:when test="rating = '3'">Видимий прямим зором</xsl:when>
<xsl:when test="rating = '4'">Видимий тільки боковим зором</xsl:when>
<xsl:when test="rating = '5'">Об’єкт ледь видно боковим зором</xsl:when>
<xsl:when test="rating = '6'">Об’єкт видно непевно</xsl:when>
<xsl:when test="rating = '7'">Об’єкт не видно</xsl:when>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</li>
<xsl:if test="./@stellar='true'">
<li>Вдається зореподібним<br/>
</li>
</xsl:if>
<xsl:if test="./@resolved='true'">
<li>Вдається розв'язаним<br/>
</li>
</xsl:if>
<xsl:if test="./@mottled='true'">
<li>Вдається структурованим<br/>
</li>
</xsl:if>
<xsl:if test="count(smallDiameter)>0 and count(largeDiameter)>0">
<li>Розмір: <xsl:call-template name="angle">
<xsl:with-param name="angle" select="smallDiameter"/>
</xsl:call-template>
×<xsl:call-template name="angle">
<xsl:with-param name="angle" select="largeDiameter"/>
</xsl:call-template>
</li>
</xsl:if>
</xsl:if>
<xsl:if test="contains(./@type,'findingsVariableStarType')">
<xsl:if test="string-length(visMag)>0">
<br/>
<li>
<xsl:if test="./visMag/@fainterThan='true'">слабша за </xsl:if>
блиск: <xsl:value-of select="visMag"/>
<xsl:if test="./visMag/@uncertain='true'"> (невпевнено)</xsl:if>
<br/>
</li>
</xsl:if>
<xsl:if test="string-length(chartID)>0">
<li>
Мапа: <xsl:value-of select="chartID"/>
<xsl:if test="./chartID/@nonAAVSOchart='true'"> (не-AAVSO мапа)</xsl:if>
<br/>
</li>
</xsl:if>
<xsl:if test="count(comparisonStar) > 0"><li>Зорі порівняння:<br/>
<ul>
<xsl:for-each select="comparisonStar">
<li>
<xsl:value-of select="."/>
</li>
</xsl:for-each>
</ul>
</li>
</xsl:if>
</xsl:if>
</ul>
</xsl:template>
<xsl:template match="image">
<xsl:param name="imgFile" select="."/>
<xsl:param name="imgTag" select="concat('img src="', $imgFile, '"')"/>
<p><xsl:text disable-output-escaping="yes"><</xsl:text><xsl:value-of select="$imgTag"/><xsl:text disable-output-escaping="yes">></xsl:text>
<br/><xsl:value-of select="$imgFile"/>
</p>
</xsl:template>
<xsl:output method="html"/>
<!-- resolve references -->
<xsl:key name="sessionKey" match="sessions/session" use="@id"/>
<xsl:key name="targetKey" match="targets/target" use="@id"/>
<xsl:key name="observerKey" match="observers/observer" use="@id"/>
<xsl:key name="siteKey" match="sites/site" use="@id"/>
<xsl:key name="scopeKey" match="scopes/scope" use="@id"/>
<xsl:key name="eyepieceKey" match="eyepieces/eyepiece" use="@id"/>
<xsl:key name="lensKey" match="lenses/lens" use="@id"/>
<xsl:key name="imagerKey" match="imagers/imager" use="@id"/>
<xsl:key name="filterKey" match="filters/filter" use="@id"/>
<xsl:template match="/">
<HTML>
<HEAD>
<TITLE>Журнал спостережень</TITLE>
</HEAD>
<BODY>
<div align="center" style="font-size:24;font-family:Verdana,Arial;color:#0000C0">Журнал спостережень</div>
<div style="font-size:12;font-family:Verdana, Arial">
<h3>Спостереження</h3>
<a name="obslist"/>
<xsl:apply-templates select="//observation"/>
<h3>Посилання</h3>
<xsl:for-each select="//sessions/session">
<xsl:sort select="begin"/>
<xsl:apply-templates select="."/>
</xsl:for-each>
<xsl:for-each select="//observers/observer">
<xsl:sort select="name"/>
<xsl:sort select="surname"/>
<xsl:apply-templates select="."/>
</xsl:for-each>
<xsl:for-each select="//sites/site">
<xsl:sort select="name"/>
<xsl:apply-templates select="."/>
</xsl:for-each>
<xsl:for-each select="//scopes/scope">
<xsl:sort select="model"/>
<xsl:apply-templates select="."/>
</xsl:for-each>
<xsl:for-each select="//eyepieces/eyepiece">
<xsl:sort select="focalLength"/>
<xsl:sort select="model"/>
<xsl:apply-templates select="."/>
</xsl:for-each>
<xsl:for-each select="//lenses/lens">
<xsl:sort select="factor"/>
<xsl:sort select="model"/>
<xsl:apply-templates select="."/>
</xsl:for-each>
<xsl:for-each select="//filters/filter">
<xsl:sort select="model"/>
<xsl:sort select="type"/>
<xsl:apply-templates select="."/>
</xsl:for-each>
<xsl:for-each select="//imagers/imager">
<xsl:sort select="model"/>
<xsl:sort select="type"/>
<xsl:apply-templates select="."/>
</xsl:for-each>
<script type="text/javascript">
<xsl:text disable-output-escaping="yes">
<!--
document.write("Створено: " + document.lastModified);
//-->
</xsl:text>
</script>
</div>
</BODY>
</HTML>
</xsl:template>
<xsl:template match="observation">
<xsl:apply-templates select="key('targetKey', target)"/>
<table border="0" cellspacing="3" cellpadding="3" style="font-size:14;font-family:Verdana,Arial">
<tr>
<td valign="top">
<table border="1" cellspacing="0" cellpadding="2" width="400" style="font-size:14;font-family:Verdana,Arial">
<tr>
<td>Спостерігач</td>
<td>
<xsl:text disable-output-escaping="yes"><a href="#observer</xsl:text>
<xsl:value-of select="observer"/>
<xsl:text disable-output-escaping="yes">"></xsl:text>
<xsl:value-of select="key('observerKey', observer)/name"/>
<xsl:text/>
<xsl:text> </xsl:text>
<xsl:value-of select="key('observerKey', observer)/surname"/>
<xsl:text disable-output-escaping="yes"></a></xsl:text>
</td>
</tr>
<xsl:if test="count(site) = 1">
<tr>
<td>Місце спостереження</td>
<td>
<xsl:text disable-output-escaping="yes"><a href="#site</xsl:text>
<xsl:value-of select="site"/>
<xsl:text disable-output-escaping="yes">"></xsl:text>
<xsl:value-of select="key('siteKey', site)/name"/>
<xsl:text disable-output-escaping="yes"></a></xsl:text>
</td>
</tr>
</xsl:if>
<tr>
<td>
<xsl:choose>
<xsl:when test="count(end) = 1">Початок</xsl:when>
<xsl:otherwise>Time</xsl:otherwise>
</xsl:choose>
</td>
<td>
<xsl:value-of select="substring-before(begin, 'T')"/> у <xsl:value-of select="substring-after(begin, 'T')"/>
</td>
<xsl:if test="count(end) = 1">
<tr>
<td>Кінець</td>
<td>
<xsl:value-of select="substring-before(end, 'T')"/> у <xsl:value-of select="substring-after(end, 'T')"/>
</td>
</tr>
</xsl:if>
</tr>
<xsl:if test="count(faintestStar) = 1">
<tr>
<td>Найслабкіша зірка</td>
<td>
<xsl:value-of select="faintestStar"/> m</td>
</tr>
</xsl:if>
<xsl:if test="count(seeing) = 1">
<tr>
<td>Видимість</td>
<td>
<xsl:value-of select="seeing"/>
<xsl:choose>
<xsl:when test="seeing = 1"> (Досконала видимість, без тремтіння)</xsl:when>
<xsl:when test="seeing = 2"> (Незначне тремтіння зображення)</xsl:when>
<xsl:when test="seeing = 3"> (Помірна видимість)</xsl:when>
<xsl:when test="seeing = 4"> (Слабка видимість)</xsl:when>
<xsl:when test="seeing = 5"> (Дуже погана видимість)</xsl:when>
</xsl:choose>
</td>
</tr>
</xsl:if>
<xsl:if test="count(scope) = 1">
<tr>
<td>Телескоп</td>
<td>
<xsl:text disable-output-escaping="yes"><a href="#scope</xsl:text>
<xsl:value-of select="scope"/>
<xsl:text disable-output-escaping="yes">"></xsl:text>
<xsl:value-of select="key('scopeKey', scope)/model"/>
<xsl:text disable-output-escaping="yes"></a></xsl:text>
</td>
</tr>
</xsl:if>
<xsl:if test="count(eyepiece) = 1 or count(magnification) = 1">
<tr>
<td>Окуляр</td>
<td>
<xsl:choose>
<xsl:when test="count(eyepiece) = 1">
<xsl:text disable-output-escaping="yes"><a href="#eyepiece</xsl:text>
<xsl:value-of select="eyepiece"/>
<xsl:text disable-output-escaping="yes">"></xsl:text>
<xsl:value-of select="key('eyepieceKey', eyepiece)/model"/>
<xsl:text disable-output-escaping="yes"></a></xsl:text>
<xsl:if test="count(magnification) = 1">
<xsl:text disable-output-escaping="yes"> (V=</xsl:text>
<xsl:value-of select="magnification"/>
<xsl:text>)</xsl:text>
</xsl:if>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="count(magnification) = 1">
<xsl:text disable-output-escaping="yes">V=</xsl:text>
<xsl:value-of select="magnification"/>
</xsl:when>
<xsl:otherwise>
<xsl:text disable-output-escaping="yes">&nbsp;</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</td>
</tr>
</xsl:if>
<xsl:if test="count(filter) = 1">
<tr>
<td>Фільтр</td>
<td>
<xsl:text disable-output-escaping="yes"><a href="#filter</xsl:text>
<xsl:value-of select="filter"/>
<xsl:text disable-output-escaping="yes">"></xsl:text>
<xsl:value-of select="key('filterKey', filter)/model"/>
<xsl:text disable-output-escaping="yes"></a> </xsl:text>
<xsl:choose>
<xsl:when test="key('filterKey', filter)/type='other'">Інший</xsl:when>
<xsl:when test="key('filterKey', filter)/type='broad band'">Широкосмуговий</xsl:when>
<xsl:when test="key('filterKey', filter)/type='narrow band'">Вузькосмуговий</xsl:when>
<xsl:when test="key('filterKey', filter)/type='O-III'">OIII</xsl:when>
<xsl:when test="key('filterKey', filter)/type='solar'">Сонячний</xsl:when>
<xsl:when test="key('filterKey', filter)/type='H-beta'">H-Beta</xsl:when>
<xsl:when test="key('filterKey', filter)/type='H-alpha'">H-Alpha</xsl:when>
<xsl:when test="key('filterKey', filter)/type='color'">Кольоровий</xsl:when>
<xsl:when test="key('filterKey', filter)/type='neutral'">Нейтральний</xsl:when>
<xsl:when test="key('filterKey', filter)/type='corrective'">Корегуючий</xsl:when>
<xsl:otherwise>(невідомий тип)</xsl:otherwise>
</xsl:choose>
<!--<xsl:value-of select="key('filterKey', filter)/type"/> -->
</td>
</tr>
</xsl:if>
<xsl:if test="count(lens) = 1">
<tr>
<td>Лінзи</td>
<td>
<xsl:text disable-output-escaping="yes"><a href="#lens</xsl:text>
<xsl:value-of select="lens"/>
<xsl:text disable-output-escaping="yes">"></xsl:text>
<xsl:value-of select="key('lensKey', lens)/model"/>
<xsl:text disable-output-escaping="yes"></a></xsl:text>
</td>
</tr>
</xsl:if>
<xsl:if test="count(imager) = 1">
<tr>
<td>Камера</td>
<td>
<xsl:text disable-output-escaping="yes"><a href="#imager</xsl:text>
<xsl:value-of select="imager"/>
<xsl:text disable-output-escaping="yes">"></xsl:text>
<xsl:value-of select="key('imagerKey', imager)/model"/>
<xsl:text disable-output-escaping="yes"></a></xsl:text>
</td>
</tr>
</xsl:if>
<xsl:if test="count(session) = 1">
<tr>
<td>Сесія</td>
<td>
<xsl:text disable-output-escaping="yes"><a href="#session</xsl:text>
<xsl:value-of select="session"/>
<xsl:text disable-output-escaping="yes">"></xsl:text><xsl:value-of select="substring-before(begin, 'T')"/> у <xsl:value-of select="substring-after(begin, 'T')"/><xsl:text disable-output-escaping="yes"></a></xsl:text>
</td>
</tr>
</xsl:if>
</table>
</td>
<td width="100%" valign="top" bgcolor="#EEEEEE">
<h5>Результати спостереження</h5>
<p>
<xsl:for-each select="result">
<xsl:apply-templates select="."/>
<xsl:if test="position()!=last()">
<hr/>
</xsl:if>
</xsl:for-each>
</p>
</td>
</tr>
</table>
<xsl:for-each select="image">
<xsl:apply-templates select="."/>
</xsl:for-each>
<hr/>
</xsl:template>
<xsl:template name="linkTop">
<xsl:text disable-output-escaping="yes"><a href="#obslist"> >> Спостереження <<</a></xsl:text>
<hr/>
</xsl:template>
</xsl:stylesheet>
| 29.045566 | 275 | 0.568675 |
bee9805e811ac5502cc458b3980e4856be9515fd | 10,058 | xsl | XSLT | report_formats/c15ad349-bd8d-457a-880a-c7056532ee15/classification.xsl | NimaSaed/GVM-Docker | 77bf8b86f53fc69c1959c01836ba37438b379876 | [
"MIT"
] | 207 | 2019-09-04T21:29:32.000Z | 2022-03-31T12:42:25.000Z | report_formats/c15ad349-bd8d-457a-880a-c7056532ee15/classification.xsl | NimaSaed/GVM-Docker | 77bf8b86f53fc69c1959c01836ba37438b379876 | [
"MIT"
] | 228 | 2019-10-15T20:51:30.000Z | 2022-03-31T17:06:15.000Z | report_formats/c15ad349-bd8d-457a-880a-c7056532ee15/classification.xsl | NimaSaed/GVM-Docker | 77bf8b86f53fc69c1959c01836ba37438b379876 | [
"MIT"
] | 119 | 2019-11-14T13:26:03.000Z | 2022-03-27T07:22:47.000Z | <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template name="generate-tags">
<xsl:choose>
<xsl:when test="contains(value, 'cpe:/o:3com')">
<xsl:text>gsm_system_3com</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:alcatel')">
<xsl:text>gsm_system_alcatel</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:apple:iphone')">
<xsl:text>gsm_system_iphone</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:apple:mac_os')">
<xsl:text>gsm_system_mac</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:apple')">
<xsl:text>gsm_system_apple</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:bluecoat')">
<xsl:text>gsm_system_bluecoat</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:brocade')">
<xsl:text>gsm_system_brocade</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:canonical')">
<xsl:text>gsm_system_ubuntu</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:centos')">
<xsl:text>gsm_system_centos</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:cisco:ios')">
<xsl:text>gsm_system_cisco_networking</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:cisco')">
<xsl:text>gsm_system_cisco</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:compaq')">
<xsl:text>gsm_system_compaq</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:conectiva')">
<xsl:text>gsm_system_connectiva</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:corel')">
<xsl:text>gsm_system_Linux</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:cray')">
<xsl:text>gsm_system_cray</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:debian')">
<xsl:text>gsm_system_Linux</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:engardelinux')">
<xsl:text>gsm_system_Linux</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:extremenetworks')">
<xsl:text>gsm_system_extremenetworks</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:f5')">
<xsl:text>gsm_system_f5</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:fedoraproject')">
<xsl:text>gsm_system_Linux</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:freebsd')">
<xsl:text>gsm_system_freebsd</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:freenas')">
<xsl:text>gsm_system_freenas</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:gentoo')">
<xsl:text>gsm_system_gentoo</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:google:android')">
<xsl:text>gsm_system_android</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:greenbone')">
<xsl:text>gsm_system_gsm</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:hp:jetdirect')">
<xsl:text>gsm_system_printserver</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:hp')">
<xsl:text>gsm_system_hp</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:ibm')">
<xsl:text>gsm_system_ibm</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:juniper')">
<xsl:text>gsm_system_juniper</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:linux')">
<xsl:text>gsm_system_linux</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:mandrakesoft')">
<xsl:text>gsm_system_Linux</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:mandriva')">
<xsl:text>gsm_system_Linux</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:microsoft:ms-dos')">
<xsl:text>gsm_system_Windows_Client</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:microsoft:windows-9x')">
<xsl:text>gsm_system_Windows_Client</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:microsoft:windows-ce')">
<xsl:text>gsm_system_wince</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:microsoft:windows_mobile')">
<xsl:text>gsm_system_windows_mobile</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:microsoft:windows_2000')">
<xsl:text>gsm_system_Windows_Server</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:microsoft:windows_vista')">
<xsl:text>gsm_system_Windows_Client</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:microsoft:windows-nt')">
<xsl:text>gsm_system_Windows_Client</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:microsoft:windows_nt')">
<xsl:text>gsm_system_Windows_Client</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:microsoft:windows_server_2003')">
<xsl:text>gsm_system_Windows_Server</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:microsoft:windows_2003')">
<xsl:text>gsm_system_Windows_Server</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:microsoft:windows_7')">
<xsl:text>gsm_system_Windows_Client</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:microsoft:windows_server_2008')">
<xsl:text>gsm_system_Windows_Server</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:microsoft:windows_2008')">
<xsl:text>gsm_system_Windows_Server</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:microsoft:windows_server_2012')">
<xsl:text>gsm_system_Windows_Server</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:microsoft:windows_8')">
<xsl:text>gsm_system_Windows_Client</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:microsoft:windows_8.1')">
<xsl:text>gsm_system_Windows_Client</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:microsoft:windows_10')">
<xsl:text>gsm_system_Windows_Client</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:microsoft:windows_xp')">
<xsl:text>gsm_system_Windows_Client</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:microsoft:windows_embedded')">
<xsl:text>gsm_system_Windows_Embedded</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:microsoft:windows')">
<xsl:text>gsm_system_windows_unknown</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:microsoft')">
<xsl:text>gsm_system_microsoft</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:nec')">
<xsl:text>gsm_system_nec</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:netbsd')">
<xsl:text>gsm_system_netbsd</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:nokia')">
<xsl:text>gsm_system_nokia</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:novell:netware')">
<xsl:text>gsm_system_netware</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:novell')">
<xsl:text>gsm_system_novell</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:openbsd')">
<xsl:text>gsm_system_Linux</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:redhat')">
<xsl:text>gsm_system_Linux</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:rim:blackberry')">
<xsl:text>gsm_system_blackberry</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:sgi')">
<xsl:text>gsm_system_sgi</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:siemens')">
<xsl:text>gsm_system_siemens</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:slackware')">
<xsl:text>gsm_system_slackware</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:starnet')">
<xsl:text>gsm_system_starnet</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:sun')">
<xsl:text>gsm_system_sun</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:suse')">
<xsl:text>gsm_system_Linux</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:trustix')">
<xsl:text>gsm_system_Linux</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:univention')">
<xsl:text>gsm_system_univention</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:vmware')">
<xsl:text>gsm_system_vmware</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:windriver')">
<xsl:text>gsm_system_windriver</xsl:text>
</xsl:when>
<xsl:when test="contains(value, 'cpe:/o:yamaha')">
<xsl:text>gsm_system_yamaha</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>gsm_system_unkown</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
| 44.504425 | 81 | 0.586101 |
408fdd9e6a83cc8bef4b5bacf8faf631d1859373 | 1,649 | xsl | XSLT | xsl/xsl/xsl_xsl_CreateStandaloneStylesheet.xsl | mrwatson-de/fmCheckMate-XSLT | 2b0e5806181a294c6eac39e536f6e211223f93e3 | [
"MIT"
] | 2 | 2019-02-09T19:22:43.000Z | 2019-10-04T09:08:40.000Z | xsl/xsl/xsl_xsl_CreateStandaloneStylesheet.xsl | mrwatson-de/fmCheckMate-XSLT | 2b0e5806181a294c6eac39e536f6e211223f93e3 | [
"MIT"
] | 1 | 2021-10-17T05:28:32.000Z | 2021-10-17T05:28:32.000Z | xsl/xsl/xsl_xsl_CreateStandaloneStylesheet.xsl | mrwatson-de/fmCheckMate-XSLT | 2b0e5806181a294c6eac39e536f6e211223f93e3 | [
"MIT"
] | 1 | 2021-11-08T16:07:11.000Z | 2021-11-08T16:07:11.000Z | <?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- ===== AUTHOR =====
(c) Copyright 2020 MrWatson, russell@mrwatson.de All Rights Reserved.
===== PURPOSE =====
XSL-File: xsl_xsl_CreateStandaloneStylesheet.xsl
XML-Source: any.xsl
XML-Grammar: xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
XML-Content: any xslt stylesheet
Replaces xsl:include tags with the referenced stylesheets content.
IMPORTANT: If you have used xsl:import elements, you must first
replace them with xsl:include tags, splitting stylesheets if necessary
into a file containing the function and one containing the test code.
===== CHANGES HISTORY =====
(c) russell@mrwatson.de 2020
2014-09-29 MrW: Version 1.1 Extended to document the included content with comments.
2011-02-09 MrW: Version 1.0
-->
<!-- ===== HEAD ===== -->
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:include href="../../../fmCheckMate/xsl/_inc/inc.Clone.xsl"/>
<!-- ===== TEMPLATES ===== -->
<!-- Copy import files ionto main body of the stylesheet -->
<xsl:template match="//xsl:include">
<xsl:comment>
<xsl:value-of select="'vvvvvvvvvvvvvvvvv'"/>
<xsl:value-of select="concat(' INCLUDE ',@href,' ')"/>
<xsl:value-of select="'vvvvvvvvvvvvvvvvv'"/>
</xsl:comment>
<xsl:apply-templates select="document(@href)/xsl:stylesheet/*"/>
<xsl:comment>
<xsl:value-of select="'^^^^^^^^^^^^^^^^^^'"/>
<xsl:value-of select="concat(' INCLUDE ',@href,' ')"/>
<xsl:value-of select="'^^^^^^^^^^^^^^^^^^'"/>
</xsl:comment>
</xsl:template>
</xsl:stylesheet>
| 36.644444 | 85 | 0.655549 |
3c40f2274226b7b2c65877a7c2ccb7f8f770145b | 824 | xslt | XSLT | test/xslt/borrowed/mb_20041215_05.xslt | zepheira/amara | d3ffe07d6e2266b34d72b012a82d572c8edbf1e7 | [
"Apache-2.0"
] | 6 | 2015-01-30T03:50:36.000Z | 2022-03-20T16:09:58.000Z | test/xslt/borrowed/mb_20041215_05.xslt | zepheira/amara | d3ffe07d6e2266b34d72b012a82d572c8edbf1e7 | [
"Apache-2.0"
] | 2 | 2015-02-04T17:18:47.000Z | 2019-09-27T23:39:52.000Z | test/xslt/borrowed/mb_20041215_05.xslt | zepheira/amara | d3ffe07d6e2266b34d72b012a82d572c8edbf1e7 | [
"Apache-2.0"
] | 6 | 2015-02-04T16:16:18.000Z | 2019-10-30T20:07:48.000Z | <?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:exsl="http://exslt.org/common"
xmlns:f="http://xmlns.4suite.org/ext"
extension-element-prefixes="f"
exclude-result-prefixes="exsl">
<xsl:output method="xml" encoding="us-ascii" indent="yes"/>
<xsl:key name="foo" match="node()" use="."/>
<xsl:key name="bar" match="z:*" use="." xmlns:z="planetz"/>
<xsl:template match="/">
<xsl:variable name="keys">
<f:dump-keys force-update="yes"/>
</xsl:variable>
<zz:KeyDump xmlns:zz="http://xmlns.4suite.org/reserved">
<xsl:for-each select="exsl:node-set($keys)//zz:Key">
<xsl:sort select="@name"/>
<xsl:copy-of select="."/>
</xsl:for-each>
</zz:KeyDump>
</xsl:template>
</xsl:stylesheet>
| 30.518519 | 61 | 0.618932 |
a2f70dbd15d81912a116567cd3366163c658de53 | 95,798 | xsl | XSLT | wwwroot/obj/Release/Package/PackageTmp/ewcommon/xsl/Cart/FullResponsiveCart.xsl | dlemstra/EonicWeb5 | d3e08b9a8c4bbaae9d8c43d13b7c84469daa8ec7 | [
"Apache-2.0"
] | 1 | 2021-04-14T18:35:44.000Z | 2021-04-14T18:35:44.000Z | wwwroot/ewcommon/xsl/Cart/FullResponsiveCart.xsl | dlemstra/EonicWeb5 | d3e08b9a8c4bbaae9d8c43d13b7c84469daa8ec7 | [
"Apache-2.0"
] | null | null | null | wwwroot/ewcommon/xsl/Cart/FullResponsiveCart.xsl | dlemstra/EonicWeb5 | d3e08b9a8c4bbaae9d8c43d13b7c84469daa8ec7 | [
"Apache-2.0"
] | 1 | 2020-04-27T21:56:13.000Z | 2020-04-27T21:56:13.000Z | <?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" exclude-result-prefixes="#default ms dt" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ms="urn:schemas-microsoft-com:xslt" xmlns:dt="urn:schemas-microsoft-com:datatypes" xmlns="http://www.w3.org/1999/xhtml">
<xsl:template match="Content" mode="addToCartButton">
<xsl:param name="actionURL"/>
<xsl:variable name="parentURL">
<xsl:call-template name="getContentParURL"/>
</xsl:variable>
<xsl:variable name="siteURL">
<xsl:call-template name="getSiteURL"/>
</xsl:variable>
<xsl:variable name="secureURL">
<xsl:call-template name="getSecureURL"/>
</xsl:variable>
<xsl:variable name="price">
<xsl:choose>
<xsl:when test="Content[@type='SKU']">
<xsl:value-of select="Content[@type='SKU'][1]/Prices/Price[@currency=$page/Cart/@currency]/node()"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="Prices/Price[@currency=$page/Cart/@currency]/node()"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<div id="cartButtons{@id}" class="cartButtons">
<form action="{$actionURL}" method="post" class="ewXform">
<xsl:apply-templates select="." mode="Options_List"/>
<xsl:if test="$price>0 and not(format-number($price, '#.00')='NaN')">
<xsl:choose>
<xsl:when test="Content[@type='SKU']">
<xsl:apply-templates select="Content[@type='SKU'][1]" mode="showQuantity"/>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="." mode="showQuantity"/>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="/" mode="addtoCartButtons"/>
</xsl:if>
<div class="terminus"> </div>
</form>
</div>
</xsl:template>
<!-- -->
<!-- -->
<xsl:template match="Content[@type='Subscription']" mode="addToCartButton">
<xsl:variable name="parentURL">
<xsl:call-template name="getContentParURL"/>
</xsl:variable>
<xsl:variable name="siteURL">
<xsl:call-template name="getSiteURL"/>
</xsl:variable>
<xsl:variable name="secureURL">
<xsl:call-template name="getSecureURL"/>
</xsl:variable>
<xsl:variable name="price">
<xsl:value-of select="Prices/Price[@type='sale' and @currency=$page/Cart/@currency]/node()"/>
</xsl:variable>
<div id="cartButtons{@id}" class="cartButtons">
<form action="" method="post" class="ewXform">
<xsl:apply-templates select="." mode="Options_List"/>
<xsl:if test="not(format-number($price, '#.00')='NaN')">
<!-- Hard code 1 qty -->
<!--input class="qtybox" type="text" name="price_{@id}" id="price_{@id}" value="1"/-->
<input type="hidden" name="qty_{@id}" id="qty_{@id}" value="1"/>
<xsl:apply-templates select="/" mode="addtoCartButtons"/>
</xsl:if>
<div class="terminus"> </div>
</form>
</div>
</xsl:template>
<!-- -->
<!-- ################################################ Cart Full ############################################## -->
<!-- -->
<xsl:template match="Order" mode="cartFull">
<xsl:variable name="parentURL">
<xsl:call-template name="getContentParURL"/>
</xsl:variable>
<xsl:variable name="secureURL">
<xsl:call-template name="getSecureURL"/>
</xsl:variable>
<xsl:variable name="siteURL">
<xsl:call-template name="getSiteURL"/>
</xsl:variable>
<xsl:variable name="currentPage" select="/Page/Menu/descendant-or-self::MenuItem[@nId=/Page/@id]"/>
<div id="cartFull" class="cartFull">
<xsl:apply-templates select="." mode="orderProgressLegend"/>
<xsl:apply-templates select="." mode="orderAlert"/>
<xsl:apply-templates select="." mode="orderProcess"/>
<div class="terminus"> </div>
</div>
</xsl:template>
<xsl:template match="Order" mode="orderProgressLegend">
</xsl:template>
<xsl:template match="Order" mode="orderAlert">
</xsl:template>
<!--#-->
<!--############################## Order Procees - Default ################################-->
<!--#-->
<xsl:template match="Order" mode="orderProcessTitle">
<h2>
<!--Your Order - Generic - Cmd:-->
<xsl:call-template name="term3005" />
<xsl:text> (</xsl:text>
<xsl:value-of select="@cmd"/>
<xsl:text>)</xsl:text>
</h2>
</xsl:template>
<xsl:template match="Order[@errorMsg='-1']" mode="orderProcessTitle">
<h2>
<!--Your Order - Generic - Cmd:-->
<xsl:call-template name="term3005a" />
</h2>
<form method="post" id="cart" class="ewXform">
<button type="submit" name="cartBrief" value="Continue Shopping" class="btn btn-info btn-sm continue pull-left">
<i class="fa fa-chevron-left">
<xsl:text> </xsl:text>
</i><xsl:text> </xsl:text>Continue Shopping
</button>
</form>
</xsl:template>
<xsl:template match="Order[DiscountMessage]" mode="orderAlert">
<span class="alert">
<xsl:apply-templates select="DiscountMessage" mode="cleanXhtml"/>
</span>
</xsl:template>
<!-- ################ View Cart ############### -->
<xsl:template match="Order" mode="orderProcess">
<xsl:apply-templates select="." mode="orderProcessTitle"/>
<xsl:apply-templates select="." mode="orderErrorReports"/>
<xsl:apply-templates select="." mode="orderAddresses"/>
<xsl:apply-templates select="." mode="orderItems"/>
</xsl:template>
<!--#-->
<!--##############################Order Addresses ################################-->
<!--#-->
<xsl:template match="Order" mode="orderAddresses">
<xsl:variable name="parentURL">
<xsl:call-template name="getContentParURL"/>
</xsl:variable>
<div class="row" id="order-addresses">
<xsl:if test="Contact[@type='Billing Address']">
<div class="col-md-6">
<div id="billingAddress" class="cartAddress box Default-Box">
<xsl:apply-templates select="Contact[@type='Billing Address']" mode="cart">
<xsl:with-param name="parentURL" select="$parentURL"/>
<xsl:with-param name="cartType" select="'cart'"/>
</xsl:apply-templates>
<xsl:if test="not(@readonly)">
<!-- THIS SHOULD BE DONE IN THE ABOVE TEMPLATE - WILL -->
<!--<p class="optionButtons">
<a href="{$parentURL}?pgid={/Page/@id}&cartCmd=Billing" title="Click here to edit the details you have entered for the billing address" class="button">Edit Billing Address</a>
</p>-->
</xsl:if>
</div>
</div>
</xsl:if>
<xsl:if test="Contact[@type='Delivery Address'] and not(@hideDeliveryAddress)">
<div class="col-md-6">
<div id="deliveryAddress" class="cartAddress box Default-Box">
<xsl:choose>
<xsl:when test="@giftListId and false()">
<p class="addressTitle">
<!--Delivery Address Details-->
<xsl:call-template name="term3036" />
<xsl:text>:</xsl:text>
</p>
<p>
<!--Your order will be delivered to-->
<xsl:call-template name="term3037" />
<xsl:text>: </xsl:text>
<strong>
<xsl:value-of select="Contact[@type='Delivery Address']/GivenName"/>
</strong>
</p>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="Contact[@type='Delivery Address']" mode="cart">
<xsl:with-param name="parentURL" select="$parentURL"/>
<xsl:with-param name="cartType" select="'cart'"/>
</xsl:apply-templates>
<!-- THIS SHOULD BE DONE IN THE ABOVE TEMPLATE - WILL -->
<!--<p class="optionButtons">
<a href="{$parentURL}?pgid={/Page/@id}&cartCmd=Delivery" title="Click here to edit the details you have entered for the delivery address" class="button">Edit Delivery Address</a>
</p>-->
</xsl:otherwise>
</xsl:choose>
</div>
</div>
</xsl:if>
</div>
</xsl:template>
<xsl:template match="Contact" mode="cart">
<xsl:param name="parentURL"/>
<xsl:param name="cartType"/>
<xsl:variable name="secureURL">
<xsl:call-template name="getSecureURL"/>
</xsl:variable>
<xsl:variable name="type">
<xsl:value-of select="substring-before(@type,' ')"/>
</xsl:variable>
<div>
<xsl:if test="not(/Page/Cart/Order/@cmd='ShowInvoice') and not(/Page/Cart/Order/@cmd='MakePayment') and (ancestor::*[name()='Cart'])">
<xsl:if test="/Page/Cart/Order/@cmd!='MakePayment'">
<a href="{$parentURL}?pgid={/Page/@id}&{$cartType}Cmd={$type}" class="btn btn-default btn-sm pull-right">
<i class="fa fa-pencil"> </i> Edit <xsl:value-of select="@type"/>
</a>
</xsl:if>
</xsl:if>
<h4 class="addressTitle">
<xsl:value-of select="@type"/>
<xsl:text> </xsl:text>
<!--Details-->
<!--xsl:call-template name="term3070" /-->
</h4>
<p>
<xsl:value-of select="GivenName"/>
<br/>
<xsl:if test="Company/node()!=''">
<xsl:value-of select="Company"/>,
<br/>
</xsl:if>
<xsl:value-of select="Street"/>,
<br/>
<xsl:value-of select="City"/>,
<br/>
<xsl:if test="State/node()!=''">
<xsl:value-of select="State"/>
.<xsl:text> </xsl:text>
</xsl:if>
<xsl:value-of select="PostalCode"/>.
<br/>
<xsl:if test="Country/node()!=''">
<xsl:value-of select="Country"/>
<br/>
</xsl:if>
<!--Tel-->
<xsl:call-template name="term3071" />
<xsl:text>: </xsl:text>
<xsl:value-of select="Telephone"/>
<br/>
<xsl:if test="Fax/node()!=''">
<!--Fax-->
<xsl:call-template name="term3072" />
<xsl:text>: </xsl:text>
<xsl:value-of select="Fax"/>
<br/>
</xsl:if>
<xsl:if test="Email/node()!=''">
<!--Email-->
<xsl:call-template name="term3073" />
<xsl:text>: </xsl:text>
<xsl:value-of select="Email"/>
<br/>
</xsl:if>
</p>
</div>
</xsl:template>
<!--#-->
<!--############################## Error Reports ################################-->
<!--#-->
<xsl:template match="Order" mode="orderErrorReports">
<xsl:if test="@errorMsg > 0">
<div class="errorMessage">
<xsl:choose>
<!-- Error No. 1 - 99 : Standard errors from the Cart -->
<xsl:when test="@errorMsg='1'">
<!--<strong>The order has timed out and cannot continue</strong>, due to one of the following two reasons:<br/><br/>
1. The order had been left for over ten minutes without any updates. The details are automatically removed for security purposes.<br/><br/>
2. You may have disabled cookies or they are undetectable. The shopping cart requires cookies to be enabled in order to proceed.<br/><br/>
Please ensure cookies are enabled in your browser to continue shopping, or call for assistance. No transaction has been made.-->
<xsl:call-template name="term3030" />
</xsl:when>
<xsl:when test="@errorMsg='2'">
<!--The item(s) you are trying to add cannot be added to this shopping basket. <br/>
<br/> Please proceed to the checkout and pay for the items in the basket, and then continue with your shopping.-->
<xsl:call-template name="term3031" />
</xsl:when>
<xsl:when test="@errorMsg='3'">
<!--There is no valid delivery option for this order. This may be due to a combination of location, price, weight or quantity.<br/>
<br/> Please call for assistance.-->
<xsl:call-template name="term3032" />
</xsl:when>
<!-- Error No. 100+: Payment gateway errors-->
<!-- Worldpay errors-->
<xsl:when test="@errorMsg='1000'">
<!--The transaction was cancelled during the payment processing - this was either at your request or the request of our payment provider, Worldpay.<br/>
<br/> Please call for more information.-->
<xsl:call-template name="term3033" />
</xsl:when>
<xsl:when test="@errorMsg='1001'">
<!--The order reference could not be found, or the order did not have the correct status. This may occur if you have tried to pay for the same order twice, or if there has been a long duration between visiting our payment provider, Worldpay's site and entering payment details.<br/>
<br/> Please call for assistance.-->
<xsl:call-template name="term3034" />
</xsl:when>
<xsl:when test="@errorMsg='1002'">
<!--The payment provider, Worldpay, did not provide a valid response.<br/>
<br/> Please call for assistance.-->
<xsl:call-template name="term3035" />
</xsl:when>
<!-- Error No. 1000+ : Bespoke errors can be put here-->
</xsl:choose>
</div>
</xsl:if>
<xsl:if test="error/msg">
<p class="errorMessage">
<xsl:for-each select="error/msg">
<xsl:sort select="@type" order="ascending" data-type="text"/>
<span class="err_sub_msg {@type}">
<xsl:copy-of select="node()"/>
</span>
</xsl:for-each>
<a title="review cart" href="?cartCmd=Cart">Review cart ></a>
</p>
</xsl:if>
</xsl:template>
<!-- ################ New Cart ############### -->
<xsl:template match="Order[@cmd='Add' or @cmd='Cart' or @cmd='Confirm']" mode="orderProcessTitle">
<!--<h2>-->
<!--Your Order -->
<!--xsl:call-template name="term3007" /-->
<!--</h2>-->
</xsl:template>
<xsl:template match="Order[@cmd='Add' or @cmd='Cart' or @cmd='Confirm']" mode="orderProcess">
<xsl:apply-templates select="." mode="orderProcessTitle"/>
<xsl:apply-templates select="." mode="orderErrorReports"/>
<xsl:apply-templates select="." mode="orderAddresses"/>
<div class="terminus"> </div>
<div class="basket">
<xsl:if test="@cmd='Add' or @cmd='Cart'">
<xsl:apply-templates select="." mode="suggestedItems"/>
</xsl:if>
<form method="post" id="cart" class="ewXform">
<div class="cart-btns-top clearfix">
<xsl:apply-templates select="." mode="principleButton">
<xsl:with-param name="buttonClass">btn-action</xsl:with-param>
</xsl:apply-templates>
<button type="submit" name="cartBrief" value="Continue Shopping" class="btn btn-info btn-sm continue">
<i class="fa fa-chevron-left">
<xsl:text> </xsl:text>
</i><xsl:text> </xsl:text>Continue Shopping
</button>
<!--<button type="submit" name="cartUpdate" value="Update Order" class="btn btn-info btn-sm update">
<i class="fa fa-refresh">
<xsl:text> </xsl:text>
</i><xsl:text> </xsl:text>Update Order
</button>-->
<!--<button type="submit" name="cartQuit" value="Empty Order" class="btn btn-info btn-sm empty">
<i class="fa fa-trash-o">
<xsl:text> </xsl:text>
</i><xsl:text> </xsl:text>Empty Order
</button>-->
</div>
<xsl:apply-templates select="." mode="orderItems">
<xsl:with-param name="editQty">true</xsl:with-param>
</xsl:apply-templates>
<div class="cart-btns-btm clearfix">
<xsl:apply-templates select="." mode="principleButton">
<xsl:with-param name="buttonClass">btn-action</xsl:with-param>
</xsl:apply-templates>
<button type="submit" name="cartBrief" value="Continue Shopping" class="btn btn-info btn-sm continue">
<i class="fa fa-chevron-left">
<xsl:text> </xsl:text>
</i><xsl:text> </xsl:text>Continue Shopping
</button>
<!--<button type="submit" name="cartUpdate" value="Update Order" class="btn btn-info btn-sm update">
<i class="fa fa-refresh">
<xsl:text> </xsl:text>
</i><xsl:text> </xsl:text>Update Order
</button>
<button type="submit" name="cartQuit" value="Empty Order" class="btn btn-info btn-sm empty">
<i class="fa fa-trash-o">
<xsl:text> </xsl:text>
</i><xsl:text> </xsl:text>Empty Order
</button>-->
</div>
</form>
</div>
</xsl:template>
<!--#-->
<!--############################## Order Procees - Billing ################################-->
<!--#-->
<xsl:template match="Order[@cmd='Billing']" mode="orderProcessTitle">
</xsl:template>
<xsl:template match="Order[@cmd='Billing']" mode="orderProcess">
<xsl:apply-templates select="." mode="orderProcessTitle"/>
<xsl:apply-templates select="." mode="orderErrorReports"/>
<div id="template_1_Column" class="template template_1_Column">
<div class="panel panel-default">
<div class="panel-heading">
<h2 class="title">Your Address Details</h2>
</div>
<div class="panel-body">
<xsl:apply-templates select="." mode="orderEditAddresses"/>
</div>
</div>
</div>
<xsl:apply-templates select="." mode="displayNotes"/>
</xsl:template>
<!--#-->
<!--##############################Order Edit Addresses ################################-->
<!--#-->
<xsl:template match="Order" mode="orderEditAddresses">
<xsl:variable name="parentURL">
<xsl:call-template name="getContentParURL"/>
</xsl:variable>
<xsl:if test="/Page/Contents/Content[@type='xform' and (@name='Delivery Address' or @name='Billing Address') ]">
<!-- Don't display delivery address if hideDeliveryADress attribute is present -->
<div id="edit-addresses" class="row">
<xsl:choose>
<xsl:when test="/Page/Contents/Content[@type='xform' and @name='Billing Address']">
<div class="col-md-12">
<div id="billingAddress" class="cartAddress box Default-Box">
<xsl:apply-templates select="/Page/Contents/Content[@type='xform' and @name='Billing Address']" mode="xform"/>
</div>
</div>
</xsl:when>
<xsl:when test="Contact[@type='Billing Address']">
<div class="col-md-6">
<div id="billingAddress" class="cartAddress box Default-Box">
<xsl:apply-templates select="Contact[@type='Billing Address']" mode="cart">
<xsl:with-param name="parentURL" select="$parentURL"/>
<xsl:with-param name="cartType" select="'cart'"/>
</xsl:apply-templates>
<!-- THIS SHOULD BE DONE IN THE ABOVE TEMPLATE - WILL -->
<!--<p class="optionButtons">
<a href="{$parentURL}?pgid={/Page/@id}&cartCmd=Billing" title="Click here to edit the details you have entered for the billing address" class="button">Edit Billing Address</a>
</p>-->
</div>
</div>
</xsl:when>
</xsl:choose>
<xsl:if test="not(@hideDeliveryAddress)">
<xsl:choose>
<xsl:when test="/Page/Contents/Content[@type='xform' and @name='Delivery Address']">
<div class="col-md-12">
<div id="deliveryAddress" class="cartAddress box Default-Box">
<xsl:apply-templates select="/Page/Contents/Content[@type='xform' and @name='Delivery Address']" mode="xform"/>
</div>
</div>
</xsl:when>
<xsl:when test="Contact[@type='Delivery Address']">
<div class="col-md-6">
<div id="deliveryAddress" class="cartAddress box Default-Box">
<xsl:choose>
<xsl:when test="@giftListId and false()">
<p class="addressTitle">
<!--Delivery Address Details-->
<xsl:call-template name="term3036" />
<xsl:text>:</xsl:text>
</p>
<p>
<!--Your order will be delivered to-->
<xsl:call-template name="term3037" />
<xsl:text>: </xsl:text>
<strong>
<xsl:value-of select="Contact[@type='Delivery Address']/GivenName"/>
</strong>
</p>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="Contact[@type='Delivery Address']" mode="cart">
<xsl:with-param name="parentURL" select="$parentURL"/>
<xsl:with-param name="cartType" select="'cart'"/>
</xsl:apply-templates>
<!-- THIS SHOULD BE DONE IN THE ABOVE TEMPLATE - WILL -->
<!--<p class="optionButtons">
<a href="{$parentURL}?pgid={/Page/@id}&cartCmd=Delivery" title="Click here to edit the details you have entered for the delivery address" class="button">Edit Delivery Address</a>
</p>-->
</xsl:otherwise>
</xsl:choose>
</div>
</div>
</xsl:when>
</xsl:choose>
</xsl:if>
</div>
</xsl:if>
<!-- Terminus class fix to floating columns -->
<div class="terminus"> </div>
</xsl:template>
<!--#-->
<!--############################## Quote Procees - Logon ################################-->
<!--#-->
<xsl:template match="Order[@cmd='Logon']" mode="orderProcessTitle">
</xsl:template>
<xsl:template match="Order[@cmd='Logon']" mode="orderProcess">
<xsl:apply-templates select="." mode="orderProcessTitle"/>
<xsl:apply-templates select="." mode="orderErrorReports"/>
<xsl:variable name="anySub">
<xsl:for-each select="/Page/Cart/Order/Item">
<xsl:if test="contentType/node()='Subscription'">
<xsl:text>SubHere</xsl:text>
</xsl:if>
</xsl:for-each>
</xsl:variable>
<div id="template_1_Column" class="template template_1_Column">
<div id="column1">
<xsl:if test="$anySub=''">
<div class="account-btns-top clearfix">
<!--<button href="?pgid={/Page/@id}&cartCmd=Notes" class="btn pull-right btn-action">
Proceed without creating an account
<i class="fa fa-chevron-right">
<xsl:text></xsl:text>
</i>
</button>-->
<a href="?pgid={/Page/@id}&cartCmd=Notes" class="btn pull-right btn-action">
Continue with my order <i class="fa fa-chevron-right">
<xsl:text> </xsl:text>
</i>
</a>
</div>
</xsl:if>
<div class="row">
<div class="col-md-6">
<div id="cartLogonBox" class="panel panel-default cartBox">
<div class="panel-heading">
<h3 class="title">Logon - I have an account</h3>
</div>
<div class="panel-body">
<xsl:apply-templates select="/Page/Contents/Content[@type='xform' and @name='UserLogon']" mode="xform"/>
</div>
</div>
</div>
<div class="col-md-6">
<div id="cartRegisterBox" class="panel panel-default cartBox">
<div class="panel-heading">
<h3 class="title">Create new account</h3>
</div>
<div class="panel-body">
<xsl:apply-templates select="/Page/Contents/Content[@type='xform' and @name='CartRegistration']" mode="xform"/>
</div>
</div>
</div>
</div>
</div>
<xsl:if test="/Page/Cart/Order/Notes/PromotionalCode!=''">
<xsl:apply-templates select="." mode="principleButton"/>
<button type="submit" name="cartBrief" value="Continue Shopping" class="btn btn-info btn-sm continue">
<i class="fa fa-chevron-left">
<xsl:text> </xsl:text>
</i><xsl:text> </xsl:text>Continue Shopping
</button>
<button type="submit" name="cartUpdate" value="Update Order" class="btn btn-info btn-sm update">
<i class="fa fa-refresh">
<xsl:text> </xsl:text>
</i><xsl:text> </xsl:text>Update Order
</button>
<button type="submit" name="cartQuit" value="Empty Order" class="btn btn-info btn-sm empty">
<i class="fa fa-trash-o">
<xsl:text> </xsl:text>
</i><xsl:text> </xsl:text>Empty Order
</button>
<xsl:apply-templates select="." mode="orderItems">
<xsl:with-param name="editQty">true</xsl:with-param>
</xsl:apply-templates>
</xsl:if>
</div>
</xsl:template>
<!--#-->
<!--############################## Order Procees - Notes ################################-->
<!--#-->
<xsl:template match="Order[@cmd='Notes']" mode="orderProcessTitle">
</xsl:template>
<xsl:template match="Order[@cmd='Notes']" mode="orderProcess">
<xsl:apply-templates select="." mode="orderProcessTitle"/>
<xsl:apply-templates select="." mode="orderErrorReports"/>
<div class="box blueEdge cartBox">
<div class="tl">
<div class="tr">
<h2 class="title">
Additional Information
<!--xsl:call-template name="term3009" /-->
</h2>
</div>
</div>
<div class="content">
<xsl:apply-templates select="/Page/Contents/Content[@type='xform' and @name='notesForm']" mode="xform"/>
</div>
<div class="bl">
<div class="br"> </div>
</div>
</div>
<div class="box blueEdge">
<form method="post" id="cart">
<!--<div class="cartButtons">-->
<!--input type="submit" name="quoteLogon" value="Proceed" class="button principle"/-->
<button type="submit" name="cartBrief" value="Continue Shopping" class="btn btn-info btn-sm continue">
<i class="fa fa-chevron-left">
<xsl:text> </xsl:text>
</i><xsl:text> </xsl:text>Continue Shopping
</button>
<button type="submit" name="cartUpdate" value="Update Order" class="btn btn-info btn-sm update">
<i class="fa fa-refresh">
<xsl:text> </xsl:text>
</i><xsl:text> </xsl:text>Update Order
</button>
<button type="submit" name="cartQuit" value="Empty Order" class="btn btn-info btn-sm empty">
<i class="fa fa-trash-o">
<xsl:text> </xsl:text>
</i><xsl:text> </xsl:text>Empty Order
</button>
<!--</div>-->
<xsl:apply-templates select="." mode="orderItems">
<xsl:with-param name="editQty">true</xsl:with-param>
</xsl:apply-templates>
<!--<div class="cartButtons">-->
<!--input type="submit" name="quoteLogon" value="Proceed" class="button principle"/-->
<button type="submit" name="cartBrief" value="Continue Shopping" class="btn btn-info btn-sm continue">
<i class="fa fa-chevron-left">
<xsl:text> </xsl:text>
</i><xsl:text> </xsl:text>Continue Shopping
</button>
<button type="submit" name="cartUpdate" value="Update Order" class="btn btn-info btn-sm update">
<i class="fa fa-refresh">
<xsl:text> </xsl:text>
</i><xsl:text> </xsl:text>Update Order
</button>
<button type="submit" name="cartQuit" value="Empty Order" class="btn btn-info btn-sm empty">
<i class="fa fa-trash-o">
<xsl:text> </xsl:text>
</i><xsl:text> </xsl:text>Empty Order
</button>
<!--</div>-->
<div class="terminus"> </div>
</form>
</div>
</xsl:template>
<xsl:template match="Order[@cmd='Discounts']" mode="orderProcessTitle">
<h2>
<!--Your Order - Please enter a discount code-->
<xsl:call-template name="term3008" />
</h2>
</xsl:template>
<xsl:template match="Order[@cmd='Discounts']" mode="orderProcess">
<xsl:apply-templates select="." mode="orderProcessTitle"/>
<xsl:apply-templates select="." mode="orderErrorReports"/>
<div class="panel panel-default">
<div class="panel-body">
<xsl:apply-templates select="/Page/Contents/Content[@type='xform' and @name='discountsForm']" mode="xform"/>
</div>
</div>
<div class="box blueEdge">
<form method="post" id="cart">
<div class="cartButtons">
<!--input type="submit" name="quoteLogon" value="Proceed" class="button principle"/-->
<button type="submit" name="cartBrief" value="Continue Shopping" class="btn btn-info btn-sm continue">
<i class="fa fa-chevron-left">
<xsl:text> </xsl:text>
</i><xsl:text> </xsl:text>Continue Shopping
</button>
<button type="submit" name="cartUpdate" value="Update Order" class="btn btn-info btn-sm update">
<i class="fa fa-refresh">
<xsl:text> </xsl:text>
</i><xsl:text> </xsl:text>Update Order
</button>
<button type="submit" name="cartQuit" value="Empty Order" class="btn btn-info btn-sm empty">
<i class="fa fa-trash-o">
<xsl:text> </xsl:text>
</i><xsl:text> </xsl:text>Empty Order
</button>
<div class="terminus"> </div>
</div>
<div>
<xsl:apply-templates select="." mode="orderItems">
<xsl:with-param name="editQty">true</xsl:with-param>
</xsl:apply-templates>
</div>
<div class="cartButtons">
<button type="submit" name="cartBrief" value="Continue Shopping" class="btn btn-info btn-sm continue">
<i class="fa fa-chevron-left">
<xsl:text> </xsl:text>
</i><xsl:text> </xsl:text>Continue Shopping
</button>
<button type="submit" name="cartUpdate" value="Update Order" class="btn btn-info btn-sm update">
<i class="fa fa-refresh">
<xsl:text> </xsl:text>
</i><xsl:text> </xsl:text>Update Order
</button>
<button type="submit" name="cartQuit" value="Empty Order" class="btn btn-info btn-sm empty">
<i class="fa fa-trash-o">
<xsl:text> </xsl:text>
</i><xsl:text> </xsl:text>Empty Order
</button>
<div class="terminus"> </div>
</div>
<div class="terminus"> </div>
</form>
</div>
</xsl:template>
<!--#-->
<!--############################## Order Process - Choose Payment / Shipping Options ################################-->
<!--#-->
<xsl:template match="Order[@cmd='ChoosePaymentShippingOption']" mode="orderProcessTitle">
</xsl:template>
<xsl:template match="Order[@cmd='ChoosePaymentShippingOption']" mode="orderProcess">
<xsl:apply-templates select="." mode="orderProcessTitle"/>
<xsl:apply-templates select="." mode="orderErrorReports"/>
<div class="panel panel-default cartBox payment-tcs">
<div class="panel-heading">
<h2 class="title">Please agree to our terms of business</h2>
</div>
<div class="panel-body">
<xsl:apply-templates select="/Page/Contents/Content[@type='xform' and @name='optionsForm']" mode="xform"/>
</div>
</div>
<div class="panel panel-default cartBox check-address">
<div class="panel-body">
<xsl:apply-templates select="." mode="orderAddresses"/>
</div>
</div>
<xsl:apply-templates select="." mode="displayNotes"/>
<div class="panel panel-default cart-summary">
<div class="panel-body">
<form method="post" id="cart">
<xsl:apply-templates select="." mode="orderItems">
<xsl:with-param name="editQty">true</xsl:with-param>
</xsl:apply-templates>
<button type="submit" name="cartBrief" value="Continue Shopping" class="btn btn-info btn-sm continue">
<i class="fa fa-chevron-left">
<xsl:text> </xsl:text>
</i><xsl:text> </xsl:text>Continue Shopping
</button>
<button type="submit" name="cartUpdate" value="Update Order" class="btn btn-info btn-sm update">
<i class="fa fa-refresh">
<xsl:text> </xsl:text>
</i><xsl:text> </xsl:text>Update Order
</button>
<button type="submit" name="cartQuit" value="Empty Order" class="btn btn-info btn-sm empty">
<i class="fa fa-trash-o">
<xsl:text> </xsl:text>
</i><xsl:text> </xsl:text>Empty Order
</button>
<div class="terminus"> </div>
</form>
</div>
</div>
</xsl:template>
<!--#-->
<!--############################## Order Process - Enter Payment Details ################################-->
<!--#-->
<xsl:template match="Order[@cmd='EnterPaymentDetails' or @cmd='SubmitPaymentDetails']" mode="orderProcessTitle">
</xsl:template>
<xsl:template match="Order[(@cmd='EnterPaymentDetails' or @cmd='SubmitPaymentDetails') and /Page/Contents/Content[@type='xform' and (@name='Secure3D' or @name='Secure3DReturn')]]" mode="orderProcessTitle">
</xsl:template>
<xsl:template match="Order[@cmd='EnterPaymentDetails' or @cmd='SubmitPaymentDetails']" mode="orderProcess">
<xsl:apply-templates select="." mode="orderErrorReports"/>
<div class="panel panel-default ccForm">
<div class="panel-heading">
<h2 class="title">Please enter your payment details</h2>
</div>
<div class="panel-body">
<xsl:apply-templates select="/Page/Contents/Content[@type='xform' and (@name='PayForm' or @name='Secure3D' or @name='Secure3DReturn')]" mode="xform"/>
</div>
</div>
<!--form method="post" id="cart" class="ewXform">
<xsl:apply-templates select="." mode="orderItems"/>
<input type="submit" name="cartUpdate" value="Revise Order" class="button continue"/>
<input type="submit" name="cartQuit" value="Cancel Order" class="button empty"/>
<div class="terminus"> </div>
</form-->
</xsl:template>
<xsl:template match="input[@bind='cContactName']" mode="xform_control">
<xsl:variable name="label_low" select="translate(label,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')"/>
<xsl:variable name="inlineHint">
<xsl:choose>
<xsl:when test="hint[@class='inline']">
<xsl:value-of select="hint[@class='inline']/node()"/>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="msg_required_inline"/>
<xsl:value-of select="$label_low"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="ref">
<xsl:apply-templates select="." mode="getRefOrBind"/>
</xsl:variable>
<input type="text" name="{$ref}" id="{$ref}">
<xsl:choose>
<xsl:when test="@class!=''">
<xsl:attribute name="class">
<xsl:value-of select="@class"/>
<xsl:text> form-control</xsl:text>
</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="class">textbox form-control</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="value!=''">
<xsl:attribute name="value">
<xsl:value-of select="value"/>
</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="value">
<xsl:choose>
<xsl:when test ="/Page/User">
<xsl:variable name="userName">
<xsl:value-of select="/Page/User/FirstName/node()"/>
<xsl:text> </xsl:text>
<xsl:value-of select="/Page/User/LastName/node()"/>
</xsl:variable>
<xsl:value-of select="$userName"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$inlineHint"/>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:attribute name="onfocus">
<xsl:text>if (this.value=='</xsl:text>
<xsl:call-template name="escape-js">
<xsl:with-param name="string" select="$inlineHint"/>
</xsl:call-template>
<xsl:text>') {this.value=''}</xsl:text>
</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
</input>
</xsl:template>
<!-- -->
<xsl:template match="Order" mode="displayNotes">
<xsl:variable name="parentURL">
<xsl:call-template name="getContentParURL"/>
</xsl:variable>
<xsl:if test="Notes/Notes/node()!='' or Notes/PromotionalCode/node()!=''">
<xsl:if test="Notes/Notes/node()!=''">
<h3>
<!--Additional information for Your Order-->
<xsl:call-template name="term3010" />
</h3>
<xsl:apply-templates select="Notes/Notes/*" mode="displayNoteLine"/>
</xsl:if>
<xsl:if test="Notes/PromotionalCode/node()!=''">
<p>
<!--Promotional Code entered-->
<xsl:call-template name="term3011" />
<xsl:text>: </xsl:text>
<xsl:apply-templates select="Notes/PromotionalCode/node()" mode="cleanXhtml"/>
</p>
</xsl:if>
<xsl:if test="not(@readonly) and Notes/Notes/node()!=''">
<p class="optionButtons">
<a href="{$parentURL}?cartCmd=Notes" class="button">
<xsl:attribute name="title">
<!--Click here to edit the notes on this order.-->
<xsl:call-template name="term3012" />
</xsl:attribute>
<!--Edit Notes-->
<xsl:call-template name="term3013" />
</a>
</p>
</xsl:if>
</xsl:if>
</xsl:template>
<xsl:template match="*" mode="displayNoteLine">
<p>
<xsl:choose>
<xsl:when test="@label and @label!=''">
<xsl:value-of select="@label"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="name()"/>
</xsl:otherwise>
</xsl:choose>
<xsl:text>: </xsl:text>
<xsl:value-of select="node()"/>
</p>
</xsl:template>
<xsl:template match="Item" mode="displayNoteLine">
<p>
<xsl:value-of select="@name"/>
<xsl:text> </xsl:text>
<xsl:value-of select="@number"/>
<xsl:text> </xsl:text>
<xsl:value-of select="FirstName/node()"/>
<xsl:text> </xsl:text>
<xsl:value-of select="LastName/node()"/>
<xsl:text> </xsl:text>
<xsl:value-of select="Email/node()"/>
<xsl:text> </xsl:text>
<xsl:value-of select="JobTitle/node()"/>
<xsl:text> </xsl:text>
<xsl:value-of select="Company/node()"/>
</p>
</xsl:template>
<xsl:template match="input[@bind='cContactEmail']" mode="xform_control">
<xsl:variable name="label_low" select="translate(label,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')"/>
<xsl:variable name="inlineHint">
<xsl:choose>
<xsl:when test="hint[@class='inline']">
<xsl:value-of select="hint[@class='inline']/node()"/>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="msg_required_inline"/>
<xsl:value-of select="$label_low"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="ref">
<xsl:apply-templates select="." mode="getRefOrBind"/>
</xsl:variable>
<input type="text" name="{$ref}" id="{$ref}">
<xsl:choose>
<xsl:when test="@class!=''">
<xsl:attribute name="class">
<xsl:value-of select="@class"/>
<xsl:text> form-control</xsl:text>
</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="class">textbox form-control</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="value!=''">
<xsl:attribute name="value">
<xsl:value-of select="value"/>
</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="value">
<xsl:choose>
<xsl:when test ="/Page/User">
<xsl:value-of select="/Page/User/Email/node()"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$inlineHint"/>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:attribute name="onfocus">
<xsl:text>if (this.value=='</xsl:text>
<xsl:call-template name="escape-js">
<xsl:with-param name="string" select="$inlineHint"/>
</xsl:call-template>
<xsl:text>') {this.value=''}</xsl:text>
</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
</input>
</xsl:template>
<xsl:template match="Order" mode="orderProgressLegend">
<xsl:variable name="bMembership">
<xsl:call-template name="getSettings">
<xsl:with-param name="sectionName" select="'web'"/>
<xsl:with-param name="valueName" select="'Membership'"/>
</xsl:call-template>
</xsl:variable>
<!--new cart stepper-->
<div id="cartStepper" class="fuelux">
<div id="MyWizard" class="wizard">
<ul class="steps">
<li>
<xsl:attribute name="class">
<xsl:if test="/Page/Cart/Order/@cmd='Cart'">
<xsl:text> active</xsl:text>
</xsl:if>
<xsl:if test="/Page/Cart/Order/@cmd='Logon' or /Page/Cart/Order/@cmd='Notes' or /Page/Cart/Order/@cmd='Delivery' or /Page/Cart/Order/@cmd='Billing' or /Page/Cart/Order/@cmd='ChoosePaymentShippingOption' or /Page/Cart/Order/@cmd='EnterPaymentDetails'">
<xsl:text> complete</xsl:text>
</xsl:if>
</xsl:attribute>
<span class="badge badge-info">1</span>
<span class="step-text">
<xsl:text>Cart Details</xsl:text>
</span>
<span class="chevron">
<xsl:text> </xsl:text>
</span>
</li>
<xsl:if test="$bMembership='on'">
<li>
<xsl:attribute name="class">
<xsl:if test="/Page/Cart/Order/@cmd='Logon'">
<xsl:text> active</xsl:text>
</xsl:if>
<xsl:if test="/Page/Cart/Order/@cmd='Delivery' or /Page/Cart/Order/@cmd='Notes' or /Page/Cart/Order/@cmd='Billing' or /Page/Cart/Order/@cmd='ChoosePaymentShippingOption' or /Page/Cart/Order/@cmd='EnterPaymentDetails'">
<xsl:text> complete</xsl:text>
</xsl:if>
</xsl:attribute>
<span class="badge">2</span>
<span class="step-text">
<xsl:text>Login / Register</xsl:text>
</span>
<span class="chevron">
<xsl:text> </xsl:text>
</span>
</li>
</xsl:if>
<li>
<xsl:attribute name="class">
<xsl:text>step</xsl:text>
<xsl:if test="/Page/Cart/Order/@cmd='Billing'">
<xsl:text> active</xsl:text>
</xsl:if>
<xsl:if test="/Page/Cart/Order/@cmd='Delivery' or /Page/Cart/Order/@cmd='Notes' or /Page/Cart/Order/@cmd='ChoosePaymentShippingOption' or /Page/Cart/Order/@cmd='EnterPaymentDetails'">
<xsl:text> complete</xsl:text>
</xsl:if>
</xsl:attribute>
<xsl:choose>
<xsl:when test="$bMembership='on'">
<span class="badge">3</span>
</xsl:when>
<xsl:otherwise>
<span class="badge">2</span>
</xsl:otherwise>
</xsl:choose>
<span class="step-text">
<xsl:text>Address</xsl:text>
</span>
<span class="chevron">
<xsl:text> </xsl:text>
</span>
</li>
<li>
<xsl:attribute name="class">
<xsl:text>step</xsl:text>
<xsl:if test="/Page/Cart/Order/@cmd='ChoosePaymentShippingOption'">
<xsl:text> active</xsl:text>
</xsl:if>
<xsl:if test="/Page/Cart/Order/@cmd='EnterPaymentDetails'">
<xsl:text> completed</xsl:text>
</xsl:if>
</xsl:attribute>
<xsl:choose>
<xsl:when test="$bMembership='on'">
<span class="badge">4</span>
</xsl:when>
<xsl:otherwise>
<span class="badge">3</span>
</xsl:otherwise>
</xsl:choose>
<span class="step-text">
<xsl:text>Confirm</xsl:text>
</span>
<span class="chevron">
<xsl:text> </xsl:text>
</span>
</li>
<li>
<xsl:attribute name="class">
<xsl:text>step last</xsl:text>
<xsl:if test="/Page/Cart/Order/@cmd='EnterPaymentDetails'">
<xsl:text> active</xsl:text>
</xsl:if>
</xsl:attribute>
<xsl:choose>
<xsl:when test="$bMembership='on'">
<span class="badge">5</span>
</xsl:when>
<xsl:otherwise>
<span class="badge">4</span>
</xsl:otherwise>
</xsl:choose>
<span class="step-text">
<xsl:text>Payment</xsl:text>
</span>
<span class="chevron">
<xsl:text> </xsl:text>
</span>
</li>
</ul>
</div>
</div>
<!--end cart stepper-->
</xsl:template>
<xsl:template match="*[@bind='FirstName_0']" mode="xform_value_alt">
<xsl:value-of select="/Page/User/FirstName/node()"/>
</xsl:template>
<xsl:template match="*[@bind='LastName_0']" mode="xform_value_alt">
<xsl:value-of select="/Page/User/LastName/node()"/>
</xsl:template>
<xsl:template match="*[@bind='Email_0']" mode="xform_value_alt">
<xsl:value-of select="/Page/User/Email/node()"/>
</xsl:template>
<xsl:template match="*[@bind='Company_0']" mode="xform_value_alt">
<xsl:value-of select="/Page/User/Company/node()"/>
</xsl:template>
<xsl:template match="*[@bind='JobTitle_0']" mode="xform_value_alt">
<xsl:value-of select="/Page/User/Position/node()"/>
</xsl:template>
<xsl:template match="Order" mode="suggestedItems">
<xsl:if test="$page/ContentDetail/Content/Content[@type='Product' and @id!=$page/Cart/Order/Item/@contentId]">
<div class="relatedcontent panel panel-primary">
<div class="panel-heading">
<h3 class="panel-title">Recommended with this purchase</h3>
</div>
<div class="panel-body">
<xsl:for-each select="$page/ContentDetail/Content/Content[@type='Product' and @id!=$page/Cart/Order/Item/@contentId]">
<xsl:apply-templates select="." mode="displayBriefRelated"/>
</xsl:for-each>
</div>
</div>
</xsl:if>
</xsl:template>
<xsl:template match="Order" mode="suggestedItems">
</xsl:template>
<xsl:template match="Item" mode="CartProductName">
<xsl:value-of select="Name"/>
</xsl:template>
<xsl:template match="Item[contentType='Ticket']" mode="CartProductName">
<xsl:value-of select="Name"/> -
<xsl:call-template name="formatdate">
<xsl:with-param name="date" select="productDetail/StartDate/node()" />
<xsl:with-param name="format" select="'dddd'" />
</xsl:call-template>
<xsl:text> </xsl:text>
<xsl:call-template name="DD_Mon_YY">
<xsl:with-param name="date" select="productDetail/StartDate/node()"/>
</xsl:call-template>
</xsl:template>
<xsl:template match="Item" mode="orderItem">
<xsl:param name="editQty"/>
<xsl:variable name="parentURL">
<xsl:call-template name="getContentParURL"/>
</xsl:variable>
<xsl:variable name="secureURL">
<xsl:call-template name="getSecureURL"/>
</xsl:variable>
<xsl:variable name="siteURL">
<xsl:call-template name="getSiteURL"/>
</xsl:variable>
<!--<xsl:if test="Images/img[@class='detail']/@src and Images/img[@class='detail']/@src!=''">-->
<div class="cart-thumbnail">
<xsl:apply-templates select="productDetail" mode="displayThumbnail">
<xsl:with-param name="forceResize">true</xsl:with-param>
<xsl:with-param name="crop">true</xsl:with-param>
<xsl:with-param name="width">50</xsl:with-param>
<xsl:with-param name="height">50</xsl:with-param>
</xsl:apply-templates>
</div>
<!--</xsl:if>-->
<div class="description">
<a href="{$siteURL}{@url}" title="">
<xsl:apply-templates select="." mode="CartProductName"/>
</a>
<xsl:if test="@ref and @ref!=''">
<div class="ref">
<xsl:value-of select="@ref"/> 
<xsl:for-each select="Item">
<xsl:apply-templates select="option" mode="optionCodeConcat"/>
</xsl:for-each>
</div>
</xsl:if>
<!-- ################################# Line Options Info ################################# -->
<xsl:for-each select="Item">
<span class="optionList">
<xsl:apply-templates select="option" mode="optionDetail"/>
<!-- <xsl:if test="@price!=0">
Remmed by Rob
<xsl:value-of select="$currency"/>
<xsl:value-of select="format-number(@price,'#0.00')"/>
<xsl:apply-templates select="/Page" mode="formatPrice">
<xsl:with-param name="price" select="@price"/>
<xsl:with-param name="currency" select="/Page/Cart/@currencySymbol"/>
</xsl:apply-templates>
</xsl:if>-->
</span>
</xsl:for-each>
<!-- ################################# Line Discount Info ################################# -->
<xsl:if test="Discount">
<xsl:for-each select="DiscountPrice/DiscountPriceLine">
<xsl:sort select="@PriceOrder"/>
<xsl:variable name="DiscID">
<xsl:value-of select="@nDiscountKey"/>
</xsl:variable>
<div class="discount">
<xsl:if test="ancestor::Item/Discount[@nDiscountKey=$DiscID]/Images[@class='thumbnail']/@src!=''">
<xsl:copy-of select="ancestor::Item/Discount[@nDiscountKey=$DiscID]/Images[@class='thumbnail']"/>
</xsl:if>
<xsl:value-of select="ancestor::Item/Discount[@nDiscountKey=$DiscID]/@cDiscountName"/>
<!--RRP-->
<xsl:call-template name="term3053" />
<xsl:text>: </xsl:text>
<strike>
<xsl:value-of select="$currency"/>
<xsl:text>: </xsl:text>
<xsl:choose>
<xsl:when test="position()=1">
<!-- Remmed by Rob
<xsl:value-of select="format-number(ancestor::Item/DiscountPrice/@OriginalUnitPrice,'#0.00')"/>
-->
<xsl:apply-templates select="/Page" mode="formatPrice">
<xsl:with-param name="price" select="ancestor::Item/DiscountPrice/@OriginalUnitPrice"/>
<xsl:with-param name="currency" select="/Page/Cart/@currencySymbol"/>
</xsl:apply-templates>
</xsl:when>
<xsl:otherwise>
<!-- Remmed by Rob
<xsl:value-of select="format-number(preceding-sibling::DiscountPriceLine/@UnitPrice,'#0.00')"/>
-->
<xsl:apply-templates select="/Page" mode="formatPrice">
<xsl:with-param name="price" select="preceding-sibling::DiscountPriceLine/@UnitPrice"/>
<xsl:with-param name="currency" select="/Page/Cart/@currencySymbol"/>
</xsl:apply-templates>
</xsl:otherwise>
</xsl:choose>
</strike>
<!--less-->
<xsl:call-template name="term3054" />
<xsl:text>: </xsl:text>
<!-- Remmed by Rob
<xsl:value-of select="$currency"/>
<xsl:value-of select="format-number(@UnitSaving,'#0.00')"/>
-->
<xsl:apply-templates select="/Page" mode="formatPrice">
<xsl:with-param name="price" select="@UnitSaving"/>
<xsl:with-param name="currency" select="/Page/Cart/@currencySymbol"/>
</xsl:apply-templates>
</div>
</xsl:for-each>
<!--More will go here later-->
<xsl:for-each select="DiscountItem">
<xsl:variable name="DiscID">
<xsl:value-of select="@nDiscountKey"/>
</xsl:variable>
<div class="discount">
<xsl:value-of select="ancestor::Item/Discount[@nDiscountKey=$DiscID]/@cDiscountName"/>
<xsl:value-of select="@oldUnits - @Units"/> Unit<xsl:if test="(@oldUnits - @Units) > 1">s</xsl:if>
<!-- Remmed by Rob
<xsl:value-of select="$currency"/>
<xsl:value-of select="format-number(@TotalSaving,'#0.00')"/>
-->
<xsl:apply-templates select="/Page" mode="formatPrice">
<xsl:with-param name="price" select="@TotalSaving"/>
<xsl:with-param name="currency" select="/Page/Cart/@currencySymbol"/>
</xsl:apply-templates>
</div>
</xsl:for-each>
</xsl:if>
</div>
<!--<div class="ref">
<xsl:value-of select="@ref"/> 
<xsl:for-each select="Item">
<xsl:apply-templates select="option" mode="optionCodeConcat"/>
</xsl:for-each>
</div>-->
<div class="quantity">
<div class="quantity-input">
<xsl:choose>
<xsl:when test="$editQty!='true'">
<xsl:value-of select="@quantity"/>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="@quantity<'10'">
<select value="{@quantity}" class="cart-quantity" name="itemId-{@id}">
<option value="1">
<xsl:if test="@quantity=1">
<xsl:attribute name="selected">selected</xsl:attribute>
</xsl:if>
<xsl:text>1</xsl:text>
</option>
<option value="2">
<xsl:if test="@quantity=2">
<xsl:attribute name="selected">selected</xsl:attribute>
</xsl:if>
<xsl:text>2</xsl:text>
</option>
<option value="3"> <xsl:if test="@quantity=3">
<xsl:attribute name="selected">selected</xsl:attribute>
</xsl:if>
<xsl:text>3</xsl:text></option>
<option value="4">
<xsl:if test="@quantity=4">
<xsl:attribute name="selected">selected</xsl:attribute>
</xsl:if>
<xsl:text>4</xsl:text>
</option>
<option value="5">
<xsl:if test="@quantity=5">
<xsl:attribute name="selected">selected</xsl:attribute>
</xsl:if>
<xsl:text>5</xsl:text>
</option>
<option value="6">
<xsl:if test="@quantity=6">
<xsl:attribute name="selected">selected</xsl:attribute>
</xsl:if>
<xsl:text>6</xsl:text>
</option>
<option value="7">
<xsl:if test="@quantity=7">
<xsl:attribute name="selected">selected</xsl:attribute>
</xsl:if>
<xsl:text>7</xsl:text>
</option>
<option value="8">
<xsl:if test="@quantity=8">
<xsl:attribute name="selected">selected</xsl:attribute>
</xsl:if>
<xsl:text>8</xsl:text>
</option>
<option value="9">
<xsl:if test="@quantity=9">
<xsl:attribute name="selected">selected</xsl:attribute>
</xsl:if>
<xsl:text>9</xsl:text>
</option>
<option value="10">10+</option>
</select>
<button type="submit" name="cartUpdate" value="Update Order" id="updateQty" class="btn btn-info btn-xs update hidden">
<i class="fa fa-refresh">
<xsl:text> </xsl:text>
</i><xsl:text> </xsl:text>Update
</button>
</xsl:when>
<xsl:otherwise>
<input type="text" size="2" name="itemId-{@id}" value="{@quantity}" class="">
<xsl:if test="../@readonly">
<xsl:attribute name="readonly">readonly</xsl:attribute>
</xsl:if>
</input>
<button type="submit" name="cartUpdate" value="Update Order" class="btn btn-info btn-xs update">
<i class="fa fa-refresh">
<xsl:text> </xsl:text>
</i><xsl:text> </xsl:text>Update
</button>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</div>
<div class="delete">
<xsl:choose>
<xsl:when test="$editQty!='true'"> </xsl:when>
<xsl:otherwise>
<a href="{$parentURL}?cartCmd=Remove&id={@id}" title="click here to remove this item from the list" class="text-danger delete-link">
<!--BJR - This either doesnt work or is wrong so i have changed it for the moment to work-->
<!--<img src="{$secureURL}/ewCommon/images/icons/trash.gif" alt="delete icon - click here to remove this item from the list"/>-->
<i class="fa fa-trash-o">
<xsl:text> </xsl:text>
</i>
<span> Delete</span>
</a>
</xsl:otherwise>
</xsl:choose>
</div>
</div>
<xsl:if test="not(/Page/Cart/@displayPrice='false')">
<div class="linePrice">
<xsl:if test="DiscountPrice/@OriginalUnitPrice > @price">
<strike>
<!-- Remmed by Rob
<xsl:value-of select="$currency"/>
<xsl:value-of select="format-number(DiscountPrice/@OriginalUnitPrice,'#0.00')"/>
-->
<xsl:apply-templates select="/Page" mode="formatPrice">
<xsl:with-param name="price" select="DiscountPrice/@OriginalUnitPrice"/>
<xsl:with-param name="currency" select="/Page/Cart/@currencySymbol"/>
</xsl:apply-templates>
</strike>
<br/>
</xsl:if>
<!-- Remmed by Rob
<xsl:value-of select="$currency"/>
<xsl:value-of select="format-number(@price,'#0.00')"/>
-->
<xsl:apply-templates select="/Page" mode="formatPrice">
<xsl:with-param name="price" select="@price"/>
<xsl:with-param name="currency" select="/Page/Cart/@currencySymbol"/>
</xsl:apply-templates>
<xsl:for-each select="Item[@price > 0]">
<br/>
<span class="optionList">
<!-- Remmed by Rob
<xsl:value-of select="$currency"/>
<xsl:value-of select="format-number(@price,'#0.00')"/>
-->
<xsl:apply-templates select="/Page" mode="formatPrice">
<xsl:with-param name="price" select="@price"/>
<xsl:with-param name="currency" select="/Page/Cart/@currencySymbol"/>
</xsl:apply-templates>
</span>
</xsl:for-each>
</div>
<!--<div class="lineTotal">
<xsl:if test="DiscountPrice/@OriginalUnitPrice!=DiscountPrice/@UnitPrice">
<xsl:if test="(DiscountPrice/@OriginalUnitPrice * DiscountPrice/@Units) > @itemTotal">
<strike>
-->
<!-- Remmed by Rob
<xsl:value-of select="$currency"/>
<xsl:value-of select="format-number(DiscountPrice/@OriginalUnitPrice * DiscountPrice/@Units,'#0.00')"/>
-->
<!--
<xsl:apply-templates select="/Page" mode="formatPrice">
<xsl:with-param name="price" select="DiscountPrice/@OriginalUnitPrice * DiscountPrice/@Units"/>
<xsl:with-param name="currency" select="/Page/Cart/@currencySymbol"/>
</xsl:apply-templates>
</strike>
<br/>
</xsl:if>
</xsl:if>
-->
<!-- Remmed by Rob
<xsl:value-of select="$currency"/>
-->
<!--
<xsl:choose>
<xsl:when test="@itemTotal">
-->
<!-- Remmed by Rob
<xsl:value-of select="format-number(@itemTotal,'#0.00')"/>
-->
<!--
<xsl:apply-templates select="/Page" mode="formatPrice">
<xsl:with-param name="price" select="@itemTotal"/>
<xsl:with-param name="currency" select="/Page/Cart/@currencySymbol"/>
</xsl:apply-templates>
</xsl:when>
<xsl:otherwise>
-->
<!-- Remmed by Rob
<xsl:value-of select="format-number((@price +(sum(*/@price)))* @quantity,'#0.00')"/>
-->
<!--
<xsl:apply-templates select="/Page" mode="formatPrice">
<xsl:with-param name="price" select="(@price +(sum(*/@price)))* @quantity"/>
<xsl:with-param name="currency" select="/Page/Cart/@currencySymbol"/>
</xsl:apply-templates>
</xsl:otherwise>
</xsl:choose>
</div>-->
</xsl:if>
</xsl:template>
<xsl:template match="Order" mode="principleButton">
<xsl:param name="buttonTitle"/>
<!-- Optional, defaults to Proceed -->
<xsl:param name="buttonCmd"/>
<!-- Optional, defaults to cartProceed -->
<xsl:param name="buttonClass"/>
<!-- Optional -->
<xsl:variable name="bTitle">
<xsl:choose>
<xsl:when test="$buttonTitle=''">
<!--Proceed-->
<xsl:call-template name="term3006" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$buttonTitle"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="bCmd">
<xsl:choose>
<xsl:when test="$buttonCmd=''">cartProceed</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$buttonCmd"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:if test="not(@errorMsg > 0 or error/msg)">
<!-- Only show button if no errors present -->
<button type="submit" name="{$bCmd}" value="{$bTitle}" class="btn btn-action pull-right {$buttonClass}">
<xsl:value-of select="$bTitle" />
 <i class="fa fa-chevron-right">
<xsl:text> </xsl:text>
</i>
</button>
</xsl:if>
</xsl:template>
<xsl:template match="Content" mode="showQuantity">
<xsl:variable name="id">
<xsl:choose>
<xsl:when test="@type='SKU'">
<xsl:value-of select="../@id"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="@id"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<div class="qty-product">
<label for="qty_{$id}" class="qty-label">
<xsl:choose>
<xsl:when test="Prices/Price[@currency=/Page/Cart/@currency]/@qtyLabel!=''">
<xsl:value-of select="Prices/Price[@currency=/Page/Cart/@currency]/@qtyLabel"/>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="term3055" />
<xsl:text>: </xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:text> </xsl:text>
</label>
<input type="text" name="qty_{@id}" id="qty_{$id}" value="1" size="3" class="qtybox form-control"/>
<button class="btn btn-action" type="button" value="-" onClick="incrementQuantity('qty_{$id}','-')">
<i class="fa fa-minus">
<xsl:text> </xsl:text>
</i>
</button>
<button class="btn btn-action" type="button" value="+" onClick="incrementQuantity('qty_{$id}','+')">
<i class="fa fa-plus">
<xsl:text> </xsl:text>
</i>
</button>
</div>
</xsl:template>
<!--#-->
<!--############################## Error Reports ################################-->
<!--#-->
<xsl:template match="Order" mode="orderErrorReports">
<xsl:if test="@errorMsg > 0">
<div class="alert alert-danger errorMessage">
<xsl:choose>
<!-- Error No. 1 - 99 : Standard errors from the Cart -->
<xsl:when test="@errorMsg='1'">
<!--<strong>The order has timed out and cannot continue</strong>, due to one of the following two reasons:<br/><br/>
1. The order had been left for over ten minutes without any updates. The details are automatically removed for security purposes.<br/><br/>
2. You may have disabled cookies or they are undetectable. The shopping cart requires cookies to be enabled in order to proceed.<br/><br/>
Please ensure cookies are enabled in your browser to continue shopping, or call for assistance. No transaction has been made.-->
<xsl:call-template name="term3030" />
</xsl:when>
<xsl:when test="@errorMsg='2'">
<!--The item(s) you are trying to add cannot be added to this shopping basket. <br/>
<br/> Please proceed to the checkout and pay for the items in the basket, and then continue with your shopping.-->
<xsl:call-template name="term3031" />
</xsl:when>
<xsl:when test="@errorMsg='3'">
<!--There is no valid delivery option for this order. This may be due to a combination of location, price, weight or quantity.<br/>
<br/> Please call for assistance.-->
<xsl:call-template name="term3032" />
</xsl:when>
<!-- Error No. 100+: Payment gateway errors-->
<!-- Worldpay errors-->
<xsl:when test="@errorMsg='1000'">
<!--The transaction was cancelled during the payment processing - this was either at your request or the request of our payment provider, Worldpay.<br/>
<br/> Please call for more information.-->
<xsl:call-template name="term3033" />
</xsl:when>
<xsl:when test="@errorMsg='1001'">
<!--The order reference could not be found, or the order did not have the correct status. This may occur if you have tried to pay for the same order twice, or if there has been a long duration between visiting our payment provider, Worldpay's site and entering payment details.<br/>
<br/> Please call for assistance.-->
<xsl:call-template name="term3034" />
</xsl:when>
<xsl:when test="@errorMsg='1002'">
<!--The payment provider, Worldpay, did not provide a valid response.<br/>
<br/> Please call for assistance.-->
<xsl:call-template name="term3035" />
</xsl:when>
<!-- Error No. 1000+ : Bespoke errors can be put here-->
</xsl:choose>
</div>
</xsl:if>
<xsl:if test="error/msg">
<div class="alert alert-warning errorMessage">
<i class="fa fa-exclamation-triangle pull-left fa-3x">
<xsl:text> </xsl:text>
</i>
<xsl:text> </xsl:text>
<xsl:for-each select="error/msg">
<xsl:sort select="@type" order="ascending" data-type="text"/>
<span class="err_sub_msg {@type}">
<xsl:apply-templates select="." mode="cleanXhtml"/>
</span>
</xsl:for-each>
<div class="terminus"> </div>
</div>
</xsl:if>
</xsl:template>
<!-- -->
<xsl:template match="group[contains(@ref,'address') and group[contains(@class,'addressGrp')]]" mode="xform">
<xsl:param name="class"/>
<fieldset>
<xsl:attribute name="class">
<xsl:value-of select="$class"/>
<xsl:if test="@class!=''">
<xsl:text> </xsl:text>
<xsl:value-of select="@class"/>
</xsl:if>
<xsl:if test="not(preceding-sibling::group)">
<xsl:text> firstAdd</xsl:text>
</xsl:if>
</xsl:attribute>
<xsl:apply-templates select="." mode="editXformMenu"/>
<xsl:if test="label">
<xsl:apply-templates select="label[position()=1]" mode="legend"/>
</xsl:if>
<div class="row">
<xsl:choose>
<xsl:when test="group[div/tblCartContact/cContactType/node()='Delivery Address']">
<div class="col-md-6">
<h3>Billing Address</h3>
<xsl:apply-templates select="group[div/tblCartContact/cContactType/node()='Billing Address']" mode="xform"/>
</div>
<div class="col-md-6">
<h3>Delivery Addresses</h3>
<xsl:apply-templates select="group[@class='collection-options']" mode="xform"/>
<xsl:apply-templates select="group[div/tblCartContact/cContactType/node()!='Billing Address']" mode="xform"/>
<div class="pull-right">
<xsl:apply-templates select="submit" mode="xform"/>
</div>
</div>
</xsl:when>
<xsl:otherwise>
<div class="col-md-12">
<xsl:apply-templates select="group[div/tblCartContact/cContactType/node()='Billing Address']" mode="xform"/>
<div class="pull-right">
<xsl:apply-templates select="submit" mode="xform"/>
</div>
</div>
</xsl:otherwise>
</xsl:choose>
</div>
</fieldset>
</xsl:template>
<xsl:template match="group[contains(@class,'addressGrp')]" mode="xform">
<xsl:param name="class"/>
<fieldset>
<xsl:if test="$class!='' or @class!='' ">
<xsl:attribute name="class">
<xsl:value-of select="$class"/>
<xsl:if test="@class!=''">
<xsl:text> </xsl:text>
<xsl:value-of select="@class"/>
</xsl:if>
<xsl:text> well</xsl:text>
</xsl:attribute>
</xsl:if>
<xsl:apply-templates select="." mode="editXformMenu"/>
<xsl:if test="label">
<xsl:apply-templates select="label[position()=1]" mode="legend"/>
</xsl:if>
<ol>
<xsl:for-each select="input | secret | select | select1 | range | textarea | upload | group | repeat | hint | help | alert | div | repeat | relatedContent | label[position()!=1] | trigger | script">
<xsl:choose>
<xsl:when test="name()='group'">
<li>
<xsl:if test="./@class">
<xsl:attribute name="class">
<xsl:text>li-</xsl:text>
<xsl:value-of select="./@class"/>
</xsl:attribute>
</xsl:if>
<xsl:apply-templates select="." mode="xform"/>
</li>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="." mode="xform"/>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
<xsl:if test="count(submit) > 0">
<li>
<xsl:if test="ancestor::group/descendant-or-self::*[contains(@class,'required')]">
<label class="required">
<span class="req">*</span>
<xsl:text> </xsl:text>
<xsl:call-template name="msg_required"/>
</label>
</xsl:if>
<!-- For xFormQuiz change how these buttons work -->
<xsl:apply-templates select="submit" mode="xform"/>
<!-- Terminus needed for CHROME ! -->
<!-- Terminus needed for BREAKS IE 7! -->
<xsl:if test="$browserVersion!='MSIE 7.0'">
<div class="terminus"> </div>
</xsl:if>
</li>
</xsl:if>
</ol>
</fieldset>
</xsl:template>
<xsl:template match="div[@class='pickAddress']" mode="xform">
<li class="pickAddress">
<div>
<xsl:if test="tblCartContact/cContactName/node()!=''">
<strong>
<xsl:value-of select="tblCartContact/cContactName/node()"/>
</strong>
<br/>
</xsl:if>
<xsl:if test="tblCartContact/cContactCompany/node()!=''">
<xsl:value-of select="tblCartContact/cContactCompany/node()"/>
,
</xsl:if>
<xsl:if test="tblCartContact/cContactAddress/node()!=''">
<xsl:value-of select="tblCartContact/cContactAddress/node()"/>
,
</xsl:if>
<xsl:if test="tblCartContact/cContactTown/node()!=''">
<xsl:value-of select="tblCartContact/cContactTown/node()"/>
,
</xsl:if>
<xsl:if test="tblCartContact/cContactCity/node()!=''">
<xsl:value-of select="tblCartContact/cContactCity/node()"/>
,
</xsl:if>
<xsl:value-of select="tblCartContact/cContactState/node()"/>, <xsl:value-of select="tblCartContact/cContactZip/node()"/>
,
<xsl:value-of select="tblCartContact/cContactCountry/node()"/>
</div>
<div class="pickAddress">
<xsl:if test="tblCartContact/cContactTel/node()!=''">
Tel: <xsl:value-of select="tblCartContact/cContactTel/node()"/>
<xsl:text>   </xsl:text>
</xsl:if>
<xsl:if test="tblCartContact/cContactFax/node()!=''">
Fax: <xsl:value-of select="tblCartContact/cContactFax/node()"/>
<xsl:text>   </xsl:text>
</xsl:if>
<xsl:if test="tblCartContact/cContactEmail/node()!=''">
Email: <xsl:value-of select="tblCartContact/cContactEmail/node()"/>
</xsl:if>
<br/>
<br/>
</div>
</li>
</xsl:template>
<!-- -->
<xsl:template match="/" mode="addtoCartButtons">
<xsl:if test="/Page/Contents/Content[@type='giftlist' and @name='cart']">
<button type="submit" name="glAdd" class="btn btn-action">
<xsl:attribute name="value">
<!--Add to Gift List-->
<xsl:call-template name="term3056" />
</xsl:attribute>
<xsl:call-template name="term3058" />
</button>
</xsl:if>
<xsl:if test="/Page/Cart[@type='quote']">
<button type="submit" name="quoteAdd" class="btn btn-action">
<xsl:attribute name="value">
<!--Add to Quote-->
<xsl:call-template name="term3057" />
</xsl:attribute>
<xsl:call-template name="term3058" />
</button>
</xsl:if>
<button type="submit" name="cartAdd" class="btn btn-action">
<xsl:attribute name="value">
<!--Add to Cart-->
<xsl:call-template name="term3058" />
</xsl:attribute>
<xsl:call-template name="term3058" />
 
<i class="fa fa-shopping-cart"> </i>
</button>
</xsl:template>
<xsl:template match="Order[@cmd='ShowInvoice' or @cmd='ShowCallbackInvoice']" mode="orderProcessTitle">
<h2>
<!--Your Invoice - Thank you for your order.-->
<xsl:call-template name="term3021" />
</h2>
</xsl:template>
<xsl:template match="Order[@cmd='ShowInvoice' or @cmd='ShowCallbackInvoice']" mode="orderProcess">
<xsl:variable name="parentURL">
<xsl:call-template name="getContentParURL"/>
</xsl:variable>
<xsl:variable name="secureURL">
<xsl:call-template name="getSecureURL"/>
</xsl:variable>
<xsl:variable name="siteURL">
<xsl:call-template name="getSiteURL"/>
</xsl:variable>
<xsl:apply-templates select="." mode="orderProcessTitle"/>
<xsl:apply-templates select="." mode="orderErrorReports"/>
<!--script>
// Break out of an iframe, if someone shoves your site
// into one of those silly top-bar URL shortener things.
(function(window) {
if (window.location !== window.top.location) {
window.top.location = window.location;
}
})(this);
</script-->
<!--SCRIPT LANGUAGE="javascript">if (top.location != location) top.location.href = location.href;</SCRIPT-->
<div id="cartInvoice">
<p class="optionButtons">
<a href="{$secureURL}?pgid={/Page/@id}&cartCmd=Quit" class="btn btn-default button principle" target="_parent" title="Click here to close this invoice and return to the site.">
<i class="fa fa-chevron-left">
<xsl:text> </xsl:text>
</i>
<xsl:text> </xsl:text>
<xsl:call-template name="term3078" />
</a>
</p>
<p>
<!--Invoice Date-->
<xsl:call-template name="term3022" />
<xsl:text>: </xsl:text>
<xsl:value-of select="@InvoiceDate"/>
</p>
<p>
<!--Invoice Reference-->
<xsl:call-template name="term3023" />
<xsl:text>: </xsl:text>
<xsl:value-of select="@InvoiceRef"/>
</p>
<xsl:if test="@payableType='deposit' and (@payableAmount > 0) ">
<p>
<!--Payment Received-->
<xsl:call-template name="term3024" />
<xsl:text>: </xsl:text>
<xsl:value-of select="$currency"/>
<xsl:value-of select="format-number(@paymentMade,'0.00')" />
</p>
<p>
<!--Final Payment Reference-->
<xsl:call-template name="term3025" />
<xsl:text>: </xsl:text>
<strong>
<xsl:value-of select="@settlementID" />
</strong>
</p>
<!--Thank you for your deposit. To pay the outstanding balance, please note your Final Payment Reference, above. Instructions on paying the outstanding balance have been e-mailed to you.
If you have any queries, please call for assistance.-->
<xsl:call-template name="term3026" />
</xsl:if>
<xsl:if test="@payableType='settlement' or @payableAmount = 0 ">
<p>
<!--Payment Made-->
<xsl:call-template name="term3027" />
<xsl:text>: </xsl:text>
<xsl:value-of select="$currency"/>
<xsl:value-of select="format-number(@paymentMade,'0.00')" />
</p>
<p>
<!--Total Payment Received-->
<xsl:call-template name="term3028" />
<xsl:text>: </xsl:text>
<xsl:value-of select="$currency"/>
<xsl:value-of select="format-number(@total, '0.00')"/>
<xsl:text> (</xsl:text>
<!--paid in full-->
<xsl:call-template name="term3029" />
<xsl:text>)</xsl:text>
</p>
</xsl:if>
</div>
<div class="panel panel-default">
<div class="panel-body">
<xsl:apply-templates select="." mode="orderAddresses"/>
<xsl:apply-templates select="." mode="displayNotes"/>
</div>
</div>
<div class="panel panel-default">
<div class="panel-body">
<form method="post" id="cart">
<xsl:apply-templates select="." mode="orderItems"/>
</form>
</div>
</div>
</xsl:template>
<xsl:template match="Order" mode="orderItems">
<xsl:param name="editQty"/>
<xsl:variable name="parentURL">
<xsl:call-template name="getContentParURL"/>
</xsl:variable>
<xsl:variable name="secureURL">
<xsl:call-template name="getSecureURL"/>
</xsl:variable>
<xsl:variable name="siteURL">
<xsl:call-template name="getSiteURL"/>
</xsl:variable>
<xsl:variable name="currency" select="@currencySymbol"/>
<xsl:if test="count(Item)!=0">
<div id="cartListing" class="responsive-cart">
<div class="cart-headings hidden-xs">
<div class="description">
<!--<xsl:call-template name="term3040" />-->
 
</div>
<!--<div class="ref">
<xsl:call-template name="term3041" />
</div>-->
<div class="quantity">
<!--Qty-->
<xsl:call-template name="term3039" />
</div>
<div class="linePrice">
<!--Price-->
<xsl:call-template name="term3042" />
</div>
<!--<div class="lineTotal">
<xsl:call-template name="term3043" />
</div>-->
</div>
<xsl:for-each select="Item">
<div class="clearfix cart-item">
<xsl:apply-templates select="." mode="orderItem">
<xsl:with-param name="editQty" select="$editQty"/>
</xsl:apply-templates>
</div>
</xsl:for-each>
<div class="totals-row">
<xsl:if test="@vatRate > 0">
<div class="vat-row">
<div>
<!--xsl:attribute name="rowspan">
<xsl:call-template name="calcRows">
<xsl:with-param name="r1"><xsl:choose><xsl:when test="@vatRate > 0">1</xsl:when><xsl:otherwise>0</xsl:otherwise></xsl:choose> </xsl:with-param>
<xsl:with-param name="r2"><xsl:choose><xsl:when test="@payableAmount > 0">1</xsl:when><xsl:otherwise>0</xsl:otherwise></xsl:choose> </xsl:with-param>
<xsl:with-param name="r3"><xsl:choose><xsl:when test="@paymentMade > 0">1</xsl:when><xsl:otherwise>0</xsl:otherwise></xsl:choose> </xsl:with-param>
<xsl:with-param name="r0">2</xsl:with-param>
</xsl:call-template>
</xsl:attribute-->
<xsl:text> </xsl:text>
</div>
<div class="subTotal">
<span>
<!--Sub Total-->
<xsl:call-template name="term3045" />
<xsl:text>: </xsl:text>
</span>
<span class=" amount">
<!-- Remmed by Rob<xsl:value-of select="/Page/Cart/@currencySymbol"/>
<xsl:value-of select="format-number(@totalNet, '0.00')"/>-->
<xsl:apply-templates select="/Page" mode="formatPrice">
<xsl:with-param name="price" select="@totalNet"/>
<xsl:with-param name="currency" select="/Page/Cart/@currencySymbol"/>
</xsl:apply-templates>
</span>
</div>
<div class="vat">
<span>
<xsl:choose>
<xsl:when test="//Cart/Contact/Address/Country='United Kingdom'">
<!--VAT at-->
<xsl:call-template name="term3046" />
<xsl:text> </xsl:text>
</xsl:when>
<xsl:otherwise>
<!--Tax at-->
<xsl:call-template name="term3047" />
<xsl:text> </xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="format-number(@vatRate, '#.00')"/>%:
</span>
<span class="amount">
<!-- Remmed by Rob
<span class="currency">
<xsl:value-of select="/Page/Cart/@currencySymbol"/>
</span>
<xsl:value-of select="format-number(@vatAmt, '0.00')"/>
-->
<xsl:apply-templates select="/Page" mode="formatPrice">
<xsl:with-param name="price" select="@vatAmt"/>
<xsl:with-param name="currency" select="/Page/Cart/@currencySymbol"/>
</xsl:apply-templates>
</span>
</div>
</div>
</xsl:if>
<div class="total">
<span>
<!--Total Value-->
<xsl:call-template name="term3048" />
<xsl:text>: </xsl:text>
</span>
<span class="total amount">
<!-- Remmed by Rob
<xsl:value-of select="/Page/Cart/@currencySymbol"/>
<xsl:value-of select="format-number(@total, '0.00')"/>
-->
<xsl:apply-templates select="/Page" mode="formatPrice">
<xsl:with-param name="price" select="@total"/>
<xsl:with-param name="currency" select="/Page/Cart/@currencySymbol"/>
</xsl:apply-templates>
</span>
</div>
<xsl:if test="@paymentMade > 0">
<div class="cart-row">
<div class="total">
<xsl:choose>
<xsl:when test="@transStatus">
<!--Transaction Made-->
<xsl:call-template name="term3049" />
</xsl:when>
<xsl:when test="@payableType='settlement' and not(@transStatus)">
<!--Payment Received-->
<xsl:call-template name="term3050" />
</xsl:when>
</xsl:choose>
</div>
<div class="total amount">
<xsl:value-of select="$currency"/>
<xsl:value-of select="format-number(@paymentMade, '0.00')"/>
</div>
</div>
</xsl:if>
<xsl:if test="@payableAmount > 0">
<div class="cart-row">
<div class="total">
<xsl:choose>
<xsl:when test="@payableType='deposit' and not(@transStatus)">
<!--Deposit Payable-->
<xsl:call-template name="term3051" />
</xsl:when>
<xsl:when test="@payableType='settlement' or (@payableType='deposit' and @transStatus)">
<!--Amount Outstanding-->
<xsl:call-template name="term3052" />
</xsl:when>
</xsl:choose>
</div>
<div class="total amount">
<xsl:value-of select="$currency"/>
<xsl:value-of select="format-number(@payableAmount, '0.00')"/>
</div>
</div>
</xsl:if>
</div>
<xsl:if test="@shippingType > 0">
<div class="shipping">
<strong>
<xsl:choose>
<xsl:when test="/Page/Contents/Content[@name='shippingCostLabel']!=''">
<xsl:value-of select="/Page/Contents/Content[@name='shippingCostLabel']"/>
</xsl:when>
<xsl:otherwise>
<!--Shipping Cost-->
<xsl:call-template name="term3044" />
<xsl:text>:</xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:text> </xsl:text>
</strong>
<xsl:choose>
<xsl:when test="/Page/Cart/Order/Shipping">
<xsl:value-of select="/Page/Cart/Order/Shipping/Name/node()"/>
<strong> - </strong>
<xsl:value-of select="/Page/Cart/Order/Shipping/Carrier/node()"/>
<strong> - </strong>
<xsl:value-of select="/Page/Cart/Order/Shipping/DeliveryTime/node()"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="/Page/Cart/Order/@shippingDesc"/>
</xsl:otherwise>
</xsl:choose>
<span class="amount">
<xsl:text> </xsl:text>
<!-- Remmed by Rob
<xsl:value-of select="/Page/Cart/@currencySymbol"/>
<xsl:value-of select="format-number(@shippingCost,'0.00')"/>-->
<xsl:apply-templates select="/Page" mode="formatPrice">
<xsl:with-param name="price" select="@shippingCost"/>
<xsl:with-param name="currency" select="/Page/Cart/@currencySymbol"/>
</xsl:apply-templates>
</span>
</div>
</xsl:if>
</div>
</xsl:if>
<!--<xsl:if test="/Page/Contents/Content[@name='cartMessage']">
<div class="cartMessage">
<xsl:copy-of select="/Page/Contents/Content[@name='cartMessage']/node()"/>
</div>
</xsl:if>-->
</xsl:template>
<!-- Duplicated Template brings in Content Node - generic for all purchasable content types
Should be used from now on
-->
<!-- -->
<xsl:template match="Content" mode="Options_List">
<xsl:choose>
<xsl:when test="Content[@type='SKU']">
<!--and @SkuOptions='skus'-->
<div class="selectOptions">
<select class="skuOptions">
<!--<xsl:if test="count(Content[@type='SKU']) > 1">
<option value="">Please select option</option>
</xsl:if>-->
<xsl:choose>
<xsl:when test="$page/ContentDetail">
<xsl:apply-templates select="Content[@type='SKU']" mode="skuOptions"/>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="Content[@type='SKU']" mode="skuOptions"/>
</xsl:otherwise>
</xsl:choose>
</select>
</div>
</xsl:when>
<xsl:otherwise>
<xsl:for-each select="Options/OptGroup">
<xsl:if test="@name!=''">
<div class="selectOptions">
<xsl:if test="@selectType!='hidden'">
<h4>
<xsl:value-of select="@name"/>
</h4>
</xsl:if>
<xsl:choose>
<xsl:when test="@selectType='Radio'">
<xsl:apply-templates select="option" mode="List_Options_Radio">
<xsl:with-param name="grpIdx" select="position()"/>
</xsl:apply-templates>
</xsl:when>
<xsl:when test="@selectType='CheckBoxes'">
<xsl:apply-templates select="option" mode="List_Options_CheckBoxes">
<xsl:with-param name="grpIdx" select="position()"/>
</xsl:apply-templates>
</xsl:when>
<xsl:when test="@selectType='ReadOnly'">
<xsl:apply-templates select="option" mode="List_Options_ReadOnly">
<xsl:with-param name="grpIdx" select="position()"/>
</xsl:apply-templates>
</xsl:when>
<xsl:when test="@selectType='TextInput'">
<xsl:apply-templates select="option" mode="List_Options_TextInput">
<xsl:with-param name="grpIdx" select="position()"/>
</xsl:apply-templates>
</xsl:when>
<!-- much like textInput but a hidden input -->
<xsl:when test="@selectType='hidden'">
<xsl:apply-templates select="option" mode="List_Options_Hidden">
<xsl:with-param name="grpIdx" select="position()"/>
</xsl:apply-templates>
</xsl:when>
<xsl:otherwise>
<select size="1" name="opt_{ancestor::Content/@id}_{position()}">
<xsl:apply-templates select="option" mode="List_Options_Dropdown">
<xsl:with-param name="grpIdx" select="position()"/>
</xsl:apply-templates>
</select>
</xsl:otherwise>
</xsl:choose>
</div>
</xsl:if>
</xsl:for-each>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- -->
<!-- -->
<xsl:template match="option" mode="List_Options_Radio">
<xsl:param name="grpIdx"/>
<xsl:if test="@name!=''">
<span class="radiocheckbox">
<xsl:choose>
<xsl:when test="position()=1">
<input type="radio" name="opt_{ancestor::Content/@id}_{$grpIdx}" value="{$grpIdx}_{position()}" id="opt_{ancestor::Content/@id}_{$grpIdx}_{position()}" checked="checked"/>
</xsl:when>
<xsl:otherwise>
<input type="radio" name="opt_{ancestor::Content/@id}_{$grpIdx}" value="{$grpIdx}_{position()}" id="opt_{ancestor::Content/@id}_{$grpIdx}_{position()}" />
</xsl:otherwise>
</xsl:choose>
<label for="opt_{ancestor::Content/@id}_{$grpIdx}_{position()}">
<xsl:value-of select="@name"/>
</label>
</span>
</xsl:if>
</xsl:template>
<!-- -->
<xsl:template match="option" mode="List_Options_CheckBoxes">
<xsl:param name="grpIdx"/>
<xsl:if test="@name!=''">
<span class="radiocheckbox">
<input type="checkbox" name="opt_{ancestor::Content/@id}_{$grpIdx}" value="{$grpIdx}_{position()}" id="opt_{ancestor::Content/@id}_{$grpIdx}_{position()}" />
<label for="opt_{ancestor::Content/@id}_{$grpIdx}_{position()}">
<xsl:value-of select="@name"/>
<xsl:if test="Prices/Price/node() and Prices/Price/node()>0">
<xsl:text> (+</xsl:text>
<xsl:apply-templates select="/Page" mode="formatPrice">
<xsl:with-param name="price" select="Prices/Price/node()"/>
<xsl:with-param name="currency" select="/Page/Cart/@currencySymbol"/>
</xsl:apply-templates>
<xsl:text> </xsl:text>
<xsl:value-of select="Prices/Price/@suffix" />
<xsl:text>)</xsl:text>
</xsl:if>
</label>
</span>
</xsl:if>
</xsl:template>
<!-- -->
<xsl:template match="option" mode="List_Options_Dropdown">
<xsl:param name="grpIdx"/>
<xsl:if test="@name!=''">
<option value="{$grpIdx}_{position()}">
<xsl:if test="position()=1">
<xsl:attribute name="selected">selected</xsl:attribute>
</xsl:if>
<xsl:value-of select="@name"/>
</option>
</xsl:if>
</xsl:template>
<!-- -->
<xsl:template match="option" mode="List_Options_ReadOnly">
<xsl:param name="grpIdx"/>
<input type="hidden" name="opt_{ancestor::Content/@id}_{$grpIdx}" value="{$grpIdx}_{position()}" id="opt_{ancestor::Content/@id}_{$grpIdx}_{position()}"/>
<label for="opt_{ancestor::Content/@id}_{$grpIdx}_{position()}">
<xsl:value-of select="@name"/>
</label>
</xsl:template>
<!-- -->
<xsl:template match="option" mode="List_Options_Hidden">
<xsl:param name="grpIdx"/>
<xsl:if test="@name!=''">
<input type="hidden" name="opt_{ancestor::Content/@id}_{$grpIdx}" value="{$grpIdx}_{position()}" id="opt_{ancestor::Content/@id}_{$grpIdx}_{position()}"/>
</xsl:if>
</xsl:template>
<!-- -->
<xsl:template match="option" mode="List_Options_TextInput">
<xsl:param name="grpIdx"/>
<input type="text" name="opt_{ancestor::Content[1]/@id}_{$grpIdx}" value="" id="opt_{ancestor::Content[1]/@id}_{$grpIdx}_{position()}"/>
</xsl:template>
<!-- -->
<xsl:template match="option" mode="List_Options_Hidden">
<xsl:param name="grpIdx"/>
<input type="hidden" name="opt_{ancestor::Content[1]/@id}_{$grpIdx}" value="" id="opt_{ancestor::Content[1]/@id}_{$grpIdx}_{position()}"/>
</xsl:template>
</xsl:stylesheet>
| 41.274451 | 295 | 0.527767 |
5b32fc521c081c1153327075340182775dde248b | 2,719 | xsl | XSLT | deployment/webuser/webapp/resources/demoskins/themes/bedeworkTheme/tasks.xsl | Bedework/bw-classic | fd0144657ba4f2f011f735b875e9718cea265f0d | [
"Apache-2.0"
] | 2 | 2015-06-28T19:46:23.000Z | 2020-03-04T20:25:27.000Z | deployment/webuser/webapp/resources/demoskins/themes/bedeworkTheme/tasks.xsl | Bedework/bw-classic | fd0144657ba4f2f011f735b875e9718cea265f0d | [
"Apache-2.0"
] | null | null | null | deployment/webuser/webapp/resources/demoskins/themes/bedeworkTheme/tasks.xsl | Bedework/bw-classic | fd0144657ba4f2f011f735b875e9718cea265f0d | [
"Apache-2.0"
] | null | null | null | <!--
Licensed to Jasig under one or more contributor license
agreements. See the NOTICE file distributed with this work
for additional information regarding copyright ownership.
Jasig licenses this file to you under the Apache License,
Version 2.0 (the "License"); you may not use this file
except in compliance with the License. You may obtain a
copy of the License at:
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/1999/xhtml">
<!--== TASKS ==-->
<xsl:template name="tasks">
<xsl:if test="/bedework/eventscalendar//event[entityType=2]">
<div id="tasks">
<h3>
<xsl:copy-of select="$bwStr-Task-Tasks"/> & <xsl:copy-of select="$bwStr-Task-Reminders"/>
</h3>
<ul class="tasks">
<xsl:apply-templates select="/bedework/eventscalendar//event[entityType=2 and generate-id() = generate-id(key('eventUid',guid)[1])]" mode="tasks"/>
</ul>
</div>
</xsl:if>
</xsl:template>
<xsl:template match="event" mode="tasks">
<xsl:variable name="calPath" select="calendar/encodedPath"/>
<xsl:variable name="guid"><xsl:call-template name="url-encode"><xsl:with-param name="str" select="guid"/></xsl:call-template></xsl:variable>
<xsl:variable name="recurrenceId" select="recurrenceId"/>
<li>
<a href="{$eventView}&calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}">
<xsl:choose>
<xsl:when test="summary = ''">
<em><xsl:copy-of select="$bwStr-TskE-NoTitle"/></em><xsl:text> </xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="summary"/>
<xsl:if test="not(start/noStart='true')">
<span class="taskDate"> - <xsl:copy-of select="$bwStr-TskE-Start"/><xsl:text> </xsl:text><xsl:value-of select="start/shortdate"/></span>
</xsl:if>
<xsl:if test="not(end/type='N')">
<span class="taskDate">- <xsl:copy-of select="$bwStr-TskE-Due"/><xsl:text> </xsl:text><xsl:value-of select="end/shortdate"/></span>
</xsl:if>
</xsl:otherwise>
</xsl:choose>
</a>
</li>
</xsl:template>
</xsl:stylesheet> | 42.484375 | 158 | 0.610886 |
2e4e9a7220bfc8569e053d1e6f83b36264b2062e | 379 | xsl | XSLT | Vault7/Lost-in-Translation/windows/Resources/Ep/Commands/Display/checkkeyboard_Display.xsl | dendisuhubdy/grokmachine | 120a21a25c2730ed356739231ec8b99fc0575c8b | [
"BSD-3-Clause"
] | 46 | 2017-05-15T11:15:08.000Z | 2018-07-02T03:32:52.000Z | Vault7/Lost-in-Translation/windows/Resources/Ep/Commands/Display/checkkeyboard_Display.xsl | dendisuhubdy/grokmachine | 120a21a25c2730ed356739231ec8b99fc0575c8b | [
"BSD-3-Clause"
] | null | null | null | Vault7/Lost-in-Translation/windows/Resources/Ep/Commands/Display/checkkeyboard_Display.xsl | dendisuhubdy/grokmachine | 120a21a25c2730ed356739231ec8b99fc0575c8b | [
"BSD-3-Clause"
] | 24 | 2017-05-17T03:26:17.000Z | 2018-07-09T07:00:50.000Z | <?xml version='1.0' ?>
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:import href="StandardTransforms.xsl"/>
<xsl:output method="text"/>
<xsl:template match="KeyboardUsed">
<xsl:text>Warning!
</xsl:text>
<xsl:text>Someone is typing at the remote keyboard!
</xsl:text>
</xsl:template>
</xsl:transform> | 34.454545 | 79 | 0.670185 |
401700a07da2405460f2eb99208f8787e6cbd5e0 | 295 | xsl | XSLT | tests/general/bug-134.xsl | anivaros/libxslt | 559b0d84b7da1f23b3c8684b1a2c5128c3bc3cd6 | [
"MIT"
] | 46 | 2015-07-14T16:59:35.000Z | 2022-01-16T23:43:08.000Z | tests/general/bug-134.xsl | anivaros/libxslt | 559b0d84b7da1f23b3c8684b1a2c5128c3bc3cd6 | [
"MIT"
] | 60 | 2015-05-11T21:36:08.000Z | 2022-03-29T16:22:42.000Z | tests/general/bug-134.xsl | anivaros/libxslt | 559b0d84b7da1f23b3c8684b1a2c5128c3bc3cd6 | [
"MIT"
] | 43 | 2015-03-09T17:51:20.000Z | 2022-02-03T20:44:59.000Z | <xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:key name="test" match="node()[self::sect][h1|h2]" use="'test'" />
<xsl:template match="/">
<result>
<xsl:value-of select="count(key('test','test'))" />
</result>
</xsl:template>
</xsl:stylesheet>
| 22.692308 | 70 | 0.623729 |
1e3f55539c3a20b34bc4df72eef1009d4d4748ee | 8,721 | xsl | XSLT | date/functions/seconds/date.seconds.template.xsl | pmani-papajohns/exslt.github.io | c195ba4d2143a1fa89eb148cfb3fd385a5dae32a | [
"MIT"
] | null | null | null | date/functions/seconds/date.seconds.template.xsl | pmani-papajohns/exslt.github.io | c195ba4d2143a1fa89eb148cfb3fd385a5dae32a | [
"MIT"
] | null | null | null | date/functions/seconds/date.seconds.template.xsl | pmani-papajohns/exslt.github.io | c195ba4d2143a1fa89eb148cfb3fd385a5dae32a | [
"MIT"
] | null | null | null | <?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:date="http://exslt.org/dates-and-times"
extension-element-prefixes="date">
<date:month-lengths>
<date:month>31</date:month>
<date:month>28</date:month>
<date:month>31</date:month>
<date:month>30</date:month>
<date:month>31</date:month>
<date:month>30</date:month>
<date:month>31</date:month>
<date:month>31</date:month>
<date:month>30</date:month>
<date:month>31</date:month>
<date:month>30</date:month>
<date:month>31</date:month>
</date:month-lengths>
<xsl:variable name="date:date-time" select="'1970-01-01T00:00:00Z'" />
<xsl:template name="date:seconds">
<xsl:param name="date-time">
<xsl:choose>
<xsl:when test="function-available('date:date-time')">
<xsl:value-of select="date:date-time()" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$date:date-time" />
</xsl:otherwise>
</xsl:choose>
</xsl:param>
<xsl:choose>
<xsl:when test="starts-with($date-time, 'P') or starts-with($date-time, '-P')">
<xsl:variable name="sign" select="(starts-with($date-time, '-') * -2) + 1" />
<xsl:variable name="period">
<xsl:choose>
<xsl:when test="starts-with($date-time, '-')"><xsl:value-of select="substring($date-time, 3)" /></xsl:when>
<xsl:otherwise><xsl:value-of select="substring($date-time, 2)" /></xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="seconds">
<xsl:message terminate="yes">Not yet implemented seconds from period</xsl:message>
</xsl:variable>
<xsl:value-of select="$seconds" />
</xsl:when>
<xsl:otherwise>
<xsl:variable name="neg" select="starts-with($date-time, '-')" />
<xsl:variable name="no-neg">
<xsl:choose>
<xsl:when test="$neg or starts-with($date-time, '+')">
<xsl:value-of select="substring($date-time, 2)" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$date-time" />
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="no-neg-length" select="string-length($no-neg)" />
<xsl:variable name="timezone">
<xsl:choose>
<xsl:when test="substring($no-neg, $no-neg-length) = 'Z'">Z</xsl:when>
<xsl:otherwise>
<xsl:variable name="tz" select="substring($no-neg, $no-neg-length - 5)" />
<xsl:if test="(substring($tz, 1, 1) = '-' or
substring($tz, 1, 1) = '+') and
substring($tz, 4, 1) = ':'">
<xsl:value-of select="$tz" />
</xsl:if>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="seconds">
<xsl:if test="not(string($timezone)) or
$timezone = 'Z' or
(substring($timezone, 2, 2) <= 23 and
substring($timezone, 5, 2) <= 59)">
<xsl:variable name="dt" select="substring($no-neg, 1, $no-neg-length - string-length($timezone))" />
<xsl:variable name="dt-length" select="string-length($dt)" />
<xsl:variable name="year" select="substring($dt, 1, 4) * (($neg * -2) + 1)" />
<xsl:variable name="y-1" select="$year - 1" />
<xsl:variable name="leaps"
select="floor($y-1 div 4) -
floor($y-1 div 100) +
floor($y-1 div 400)" />
<xsl:variable name="leap" select="(not($year mod 4) and $year mod 100) or not($year mod 400)" />
<xsl:variable name="year-days" select="($year * 365) + $leaps" />
<xsl:choose>
<xsl:when test="not(number($year))" />
<xsl:when test="$dt-length = 4">
<xsl:value-of select="$year-days * 24 * 60 * 60" />
</xsl:when>
<xsl:when test="substring($dt, 5, 1) = '-'">
<xsl:variable name="month" select="substring($dt, 6, 2)" />
<xsl:variable name="month-lengths" select="document('')/*/date:month-lengths/date:month" />
<xsl:variable name="month-days"
select="sum($month-lengths[position() < $month])" />
<xsl:choose>
<xsl:when test="not($month <= 12)" />
<xsl:when test="$dt-length = 7">
<xsl:value-of select="($year-days + $month-days) * 24 * 60 * 60" />
</xsl:when>
<xsl:when test="substring($dt, 8, 1)">
<xsl:variable name="day" select="substring($dt, 9, 2)" />
<xsl:if test="$day <= 31">
<xsl:variable name="days">
<xsl:variable name="days"
select="$year-days + $month-days + $day" />
<xsl:choose>
<xsl:when test="$leap and $month > 2">
<xsl:value-of select="$days + 1" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$days" />
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:choose>
<xsl:when test="$dt-length = 10">
<xsl:value-of select="$days * 24 * 60 * 60" />
</xsl:when>
<xsl:when test="substring($dt, 11, 1) = 'T' and
substring($dt, 14, 1) = ':' and
substring($dt, 17, 1) = ':'">
<xsl:variable name="hour" select="substring($dt, 12, 2)" />
<xsl:variable name="min" select="substring($dt, 15, 2)" />
<xsl:variable name="sec" select="substring($dt, 18)" />
<xsl:if test="$hour <= 23and
$min <= 59 and
$sec <= 60">
<xsl:variable name="min-s" select="60" />
<xsl:variable name="hour-s" select="60 * 60" />
<xsl:variable name="day-s" select="60 * 60 * 24" />
<xsl:variable name="tz-adj">
<xsl:variable name="tz"
select="(substring($timezone, 2, 2) * $hour-s) +
(substring($timezone, 5, 2) * $min-s)" />
<xsl:choose>
<xsl:when test="starts-with($timezone, '-')">
<xsl:value-of select="$tz" />
</xsl:when>
<xsl:when test="starts-with($timezone, '+')">
<xsl:value-of select="$tz * -1" />
</xsl:when>
<xsl:otherwise>0</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:value-of select="$sec + ($min * $min-s) + ($hour * $hour-s) + ($days * $day-s) + $tz-adj" />
</xsl:if>
</xsl:when>
</xsl:choose>
</xsl:if>
</xsl:when>
</xsl:choose>
</xsl:when>
</xsl:choose>
</xsl:if>
</xsl:variable>
<xsl:value-of select="$seconds - 62167219200" />
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet> | 52.221557 | 135 | 0.401903 |
cacf61512ad1e8a482c3b600c289f51a37723507 | 769 | xsl | XSLT | test/end-to-end/processor/base/_deserializer.xsl | cmarchand/xspec | f930a6608547e9fee8d2cdccfc7418c20d9fc10b | [
"MIT"
] | null | null | null | test/end-to-end/processor/base/_deserializer.xsl | cmarchand/xspec | f930a6608547e9fee8d2cdccfc7418c20d9fc10b | [
"MIT"
] | null | null | null | test/end-to-end/processor/base/_deserializer.xsl | cmarchand/xspec | f930a6608547e9fee8d2cdccfc7418c20d9fc10b | [
"MIT"
] | null | null | null | <?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet exclude-result-prefixes="#all" version="2.0"
xmlns:deserializer="x-urn:xspec:test:end-to-end:processor:deserializer"
xmlns:x="http://www.jenitennison.com/xslt/xspec" xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!--
This stylesheet module helps deserialize the document.
-->
<!--
mode=unindent
Removes side effect of loading indented XML
-->
<!-- Identity template, in lowest priority -->
<xsl:template as="node()" match="document-node() | attribute() | node()"
mode="deserializer:unindent" priority="-1">
<xsl:call-template name="x:identity" />
</xsl:template>
<!-- The other processing depends on each processor... -->
</xsl:stylesheet>
| 32.041667 | 93 | 0.694408 |
33c812b2c78b52f2cd78800a866ac7a3fc5d2d1f | 6,656 | xsl | XSLT | main/plugins/org.talend.designer.dbmap/resources/mapperComponent.xsl | vbogatyrov/tdi-studio-se | 4c9128050d7ae23172aa17ea9da405dce9378cba | [
"Apache-2.0"
] | 114 | 2015-03-05T15:34:59.000Z | 2022-02-22T03:48:44.000Z | main/plugins/org.talend.designer.dbmap/resources/mapperComponent.xsl | vbogatyrov/tdi-studio-se | 4c9128050d7ae23172aa17ea9da405dce9378cba | [
"Apache-2.0"
] | 1,137 | 2015-03-04T01:35:42.000Z | 2022-03-29T06:03:17.000Z | main/plugins/org.talend.designer.dbmap/resources/mapperComponent.xsl | vbogatyrov/tdi-studio-se | 4c9128050d7ae23172aa17ea9da405dce9378cba | [
"Apache-2.0"
] | 219 | 2015-01-21T10:42:18.000Z | 2022-02-17T07:57:20.000Z | <?xml version="1.0" encoding="utf-8"?>
<!-- edited with XMLSpy v2007 sp1 (http://www.altova.com) by () -->
<xsl:stylesheet version="1.1"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:variable name="rootTable"
select="externalNode/mapperTable" />
<xsl:variable name="subRootTable"
select="externalNode/mapperTable/rootTable/table" />
<br />
<xsl:variable name="componentPreviewPic"
select="$rootTable/@preview">
</xsl:variable>
<xsl:if test="string-length($componentPreviewPic)!=0">
<div class="FONTSTYLE" align="left">
<img src="{$componentPreviewPic}" usemap="#jobmap"
alt="No image available" class="bordercolor" />
</div>
</xsl:if>
<xsl:for-each select="$rootTable">
<b class="FONTSTYLE">
<xsl:value-of select="/externalNode/@i18n.mapper.table.for" />
<xsl:value-of select="/externalNode/@name" />
(
<xsl:value-of select="@type" />
):
</b>
<br />
<br />
<xsl:for-each select="table">
<table border="0" width="96%" cellpadding="0"
cellspacing="0" summary="">
<tr>
<td width="15"></td>
<td>
<b class="FONTSTYLE">
<xsl:value-of select="/externalNode/@i18n.mapper.table.properties" />
(
<xsl:value-of select="@name" />
):
</b>
<table class="cols" border="1" width="90%"
cellpadding="0" cellspacing="0"
style="border-collapse: collapse; padding-left:10mm;" bordercolor="#111111"
frame="box" summary="">
<tr>
<th align="left" width="30%"
class="TABLECOLUMNSTYLE">
<xsl:value-of select="/externalNode/@i18n.job.properties" />
</th>
<th align="left"
class="TABLECOLUMNSTYLE">
<xsl:value-of select="/externalNode/@i18n.job.values" />
</th>
</tr>
<tr>
<td class="FONTSTYLE"
align="left">
<xsl:value-of select="/externalNode/@i18n.job.name" />
</td>
<td class="FONTSTYLE"
align="left">
<xsl:value-of select="@name" />
</td>
</tr>
<tr>
<td class="FONTSTYLE"
align="left">
<xsl:value-of select="/externalNode/@i18n.mapper.table.name" />
</td>
<td class="FONTSTYLE"
align="left">
<xsl:value-of
select="@tableName" />
</td>
</tr>
<tr>
<td class="FONTSTYLE"
align="left">
<xsl:value-of select="/externalNode/@i18n.mapper.table.alias" />
</td>
<td class="FONTSTYLE"
align="left">
<xsl:value-of select="@alias" />
</td>
</tr>
<tr>
<td class="FONTSTYLE"
align="left">
<xsl:value-of select="/externalNode/@i18n.mapper.table.join.type" />
</td>
<td class="FONTSTYLE"
align="left">
<xsl:value-of
select="@joinType" />
</td>
</tr>
<tr>
<td class="FONTSTYLE"
align="left">
<xsl:value-of select="/externalNode/@i18n.mapper.table.isminimized" />
</td>
<td class="FONTSTYLE"
align="left">
<xsl:value-of
select="@isMinimized" />
</td>
</tr>
</table>
<br />
<br />
<b class="FONTSTYLE">
<xsl:value-of select="/externalNode/@i18n.mapper.table.metadata.entries" />(
<xsl:value-of select="@name" />
):
</b>
<br />
<table class="cols" width="90%"
cellpadding="0" border="1" cellspacing="0"
style="border-collapse: collapse" bordercolor="#111111"
frame="box" summary="">
<tr class="profont">
<th class="TABLECOLUMNSTYLE"
width="25%">
<xsl:value-of select="/externalNode/@i18n.job.name" />
</th>
<th class="TABLECOLUMNSTYLE"
width="25%">
<xsl:value-of select="/externalNode/@i18n.mapper.table.expression" />
</th>
<th class="TABLECOLUMNSTYLE"
width="25%">
<xsl:value-of select="/externalNode/@i18n.mapper.table.operator" />
</th>
<th class="TABLECOLUMNSTYLE"
width="25%">
<xsl:value-of select="/externalNode/@i18n.mapper.table.isJoin" />
</th>
</tr>
<xsl:for-each
select="metadataTableEntries/entry">
<tr class="FONTSTYLE">
<td align="left">
<xsl:value-of
select="@name" />
</td>
<td align="left">
<xsl:value-of
select="@expression" />
</td>
<td align="left">
<xsl:value-of
select="@operator" />
</td>
<td align="left">
<xsl:value-of
select="@isJoin" />
</td>
</tr>
</xsl:for-each>
</table>
<br />
<b class="FONTSTYLE">
<xsl:value-of select="/externalNode/@i18n.mapper.table.condition.entries" />(
<xsl:value-of select="@name" />
):
</b>
<table class="cols" width="90%"
cellpadding="0" border="1" cellspacing="0"
style="border-collapse: collapse" bordercolor="#111111"
frame="box" summary="">
<tr class="profont">
<th class="TABLECOLUMNSTYLE"
width="25%">
<xsl:value-of select="/externalNode/@i18n.job.name" />
</th>
<th class="TABLECOLUMNSTYLE"
width="25%">
<xsl:value-of select="/externalNode/@i18n.mapper.table.expression" />
</th>
<th class="TABLECOLUMNSTYLE"
width="25%">
<xsl:value-of select="/externalNode/@i18n.mapper.table.operator" />
</th>
<th class="TABLECOLUMNSTYLE"
width="25%">
<xsl:value-of select="/externalNode/@i18n.mapper.table.isJoin" />
</th>
</tr>
<xsl:for-each
select="customConditionsEntries/entry">
<tr class="FONTSTYLE">
<td align="left">
<xsl:value-of
select="@name" />
</td>
<td align="left">
<xsl:value-of
select="@expression" />
</td>
<td align="left">
<xsl:value-of
select="@operator" />
</td>
<td align="left">
<xsl:value-of
select="@isJoin" />
</td>
</tr>
</xsl:for-each>
</table>
</td>
</tr>
</table>
<br />
</xsl:for-each>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
| 30.117647 | 85 | 0.499399 |
962b746056adf8bdd186346497afa5efe00aede8 | 353 | xsl | XSLT | core/src/test/resources/XmlSwitch/selection.xsl | Laurens-makel/iaf | 0235465d112d08a5a9eeb98b5d2153c3574f7787 | [
"Apache-2.0"
] | 37 | 2015-12-01T16:21:57.000Z | 2022-03-31T20:57:48.000Z | core/src/test/resources/XmlSwitch/selection.xsl | Laurens-makel/iaf | 0235465d112d08a5a9eeb98b5d2153c3574f7787 | [
"Apache-2.0"
] | 1,267 | 2015-03-21T09:05:48.000Z | 2022-03-31T16:31:05.000Z | core/src/test/resources/XmlSwitch/selection.xsl | Laurens-makel/iaf | 0235465d112d08a5a9eeb98b5d2153c3574f7787 | [
"Apache-2.0"
] | 96 | 2015-12-01T16:22:36.000Z | 2021-12-10T15:09:33.000Z | <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" version="1.0" encoding="UTF-8" indent="yes" omit-xml-declaration="yes"/>
<xsl:template match="/">
<xsl:value-of select="name(/*[local-name()='Envelope']/*[local-name()='Body']/*[name()!='MessageHeader'])"/>
</xsl:template>
</xsl:stylesheet> | 44.125 | 110 | 0.665722 |
0fcca08255174a79c17e7ecf54321b90b5d4603e | 1,133 | xsl | XSLT | Leak #5 - Lost In Translation/windows/Resources/Dsz/Commands/Storage/strings_storage.xsl | bidhata/EquationGroupLeaks | 1ff4bc115cb2bd5bf2ed6bf769af44392926830c | [
"Unlicense"
] | 9 | 2019-11-22T04:58:40.000Z | 2022-02-26T16:47:28.000Z | Python.Fuzzbunch/Resources/Dsz/Commands/Storage/strings_storage.xsl | 010001111/Vx-Suites | 6b4b90a60512cce48aa7b87aec5e5ac1c4bb9a79 | [
"MIT"
] | null | null | null | Python.Fuzzbunch/Resources/Dsz/Commands/Storage/strings_storage.xsl | 010001111/Vx-Suites | 6b4b90a60512cce48aa7b87aec5e5ac1c4bb9a79 | [
"MIT"
] | 8 | 2017-09-14T02:24:29.000Z | 2021-11-04T01:32:44.000Z | <?xml version='1.0' ?>
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:import href="include/StorageFunctions.xsl"/>
<xsl:output method="xml" omit-xml-declaration="yes"/>
<xsl:template match="/">
<xsl:element name="StorageObjects">
<xsl:apply-templates select="Strings"/>
<xsl:call-template name="TaskingInfo">
<xsl:with-param name="info" select="TaskingInfo"/>
</xsl:call-template>
</xsl:element>
</xsl:template>
<xsl:template match="Strings">
<xsl:element name="ObjectValue">
<xsl:attribute name="name">Strings</xsl:attribute>
<xsl:apply-templates select="String"/>
</xsl:element>
</xsl:template>
<xsl:template match="String">
<xsl:element name="ObjectValue">
<xsl:attribute name="name">String</xsl:attribute>
<xsl:element name="StringValue">
<xsl:attribute name="name">string</xsl:attribute>
<xsl:value-of select="."/>
</xsl:element>
<xsl:element name="IntValue">
<xsl:attribute name="name">offset</xsl:attribute>
<xsl:value-of select="@offset"/>
</xsl:element>
</xsl:element>
</xsl:template>
</xsl:transform> | 29.051282 | 78 | 0.670786 |
be501358c214fc8656a4f564bd49dae36cc4fc4c | 129 | xsl | XSLT | bin/hadoop-3.3.0/share/doc/hadoop/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/configuration.xsl | ptrick/hdfs-hive-sql-playground | 83f2aaa79f022a3c320939eace1fd2d06583187f | [
"Apache-2.0"
] | null | null | null | bin/hadoop-3.3.0/share/doc/hadoop/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/configuration.xsl | ptrick/hdfs-hive-sql-playground | 83f2aaa79f022a3c320939eace1fd2d06583187f | [
"Apache-2.0"
] | null | null | null | bin/hadoop-3.3.0/share/doc/hadoop/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/configuration.xsl | ptrick/hdfs-hive-sql-playground | 83f2aaa79f022a3c320939eace1fd2d06583187f | [
"Apache-2.0"
] | null | null | null | version https://git-lfs.github.com/spec/v1
oid sha256:b2e39860d25a91af19f57e9d455401a8e216e78bcc7be7bb611fa97641c0977b
size 1335
| 32.25 | 75 | 0.883721 |
3e582c4c7b6c26e8e3af8ed7e2fd43df4737b17d | 2,293 | xsl | XSLT | assets/xml/oasis/extract-strict.xsl | brnnnfx/openoffice-org | 8b1023c59fd9c7a58d108bb0b01dd1f8884c9163 | [
"Apache-2.0"
] | 5 | 2019-10-14T23:00:48.000Z | 2021-11-06T22:21:06.000Z | assets/xml/oasis/extract-strict.xsl | brnnnfx/openoffice-org | 8b1023c59fd9c7a58d108bb0b01dd1f8884c9163 | [
"Apache-2.0"
] | 31 | 2020-11-14T09:27:16.000Z | 2022-03-08T17:09:15.000Z | assets/xml/oasis/extract-strict.xsl | brnnnfx/openoffice-org | 8b1023c59fd9c7a58d108bb0b01dd1f8884c9163 | [
"Apache-2.0"
] | 15 | 2020-11-10T17:04:25.000Z | 2022-01-31T12:12:48.000Z | <?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:text="http://openoffice.org/2000/text"
xmlns:office="http://openoffice.org/2000/office"
xmlns:style="http://openoffice.org/2000/style">
<xsl:output method="text"/>
<!-- which paragraph styles do we wish to extract? Default: Code -->
<xsl:param name="style" select="'RelaxNG Strict'"/>
<!-- default: don't output anything -->
<xsl:template match="text()"/>
<!-- paragraph with the proper style found? Then generate output! -->
<xsl:template match="text:p">
<!-- determine all parent styles of this paragraph; use key 'parents' -->
<xsl:variable name="parents"
select="@text:style-name |
key('parents',@text:style-name) |
key('parents',key('parents',@text:style-name)) |
key('parents',key('parents',key('parents',@text:style-name)))"/>
<!-- if proper parent style is found, generate output! -->
<xsl:if test="$parents = $style">
<xsl:apply-templates mode="output"/>
<xsl:text>
</xsl:text>
</xsl:if>
</xsl:template>
<xsl:key name="parents"
match="style:style/@style:parent-style-name"
use="../@style:name" />
<!-- generate output: just copy all text we find -->
<xsl:template mode="output">
<xsl:copy>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>
<xsl:template mode="output" match="text()">
<xsl:copy/>
</xsl:template>
<!-- white space handling: <text:s>, <text:tab> elements -->
<xsl:template mode="output" match="text:tab-stop">
<xsl:text> </xsl:text>
</xsl:template>
<xsl:template mode="output" match="text:s">
<xsl:call-template name="repeat">
<xsl:with-param name="count" select="@text:c"/>
<xsl:with-param name="string" select="' '"/>
</xsl:call-template>
</xsl:template>
<xsl:template name="repeat">
<xsl:param name="count"/>
<xsl:param name="string"/>
<xsl:if test="$count > 0">
<xsl:value-of select="$string"/>
<xsl:call-template name="repeat">
<xsl:with-param name="count" select="$count -1"/>
<xsl:with-param name="string" select="$string"/>
</xsl:call-template>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
| 30.986486 | 78 | 0.610554 |
12d133a43b296baa4e266cc9ac115e4393efde30 | 56,655 | xsl | XSLT | src/meme_4.6.0/etc/spamo-to-html.xsl | kipkurui/gimmemotifs | 51bd0c6700877f79179f08e5bab7de70fc2eab94 | [
"MIT"
] | 1 | 2019-07-14T08:28:25.000Z | 2019-07-14T08:28:25.000Z | src/meme_4.6.0/etc/spamo-to-html.xsl | kipkurui/gimmemotifs | 51bd0c6700877f79179f08e5bab7de70fc2eab94 | [
"MIT"
] | null | null | null | src/meme_4.6.0/etc/spamo-to-html.xsl | kipkurui/gimmemotifs | 51bd0c6700877f79179f08e5bab7de70fc2eab94 | [
"MIT"
] | null | null | null | <?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE xsl:stylesheet [
<!ENTITY nbsp " ">
<!ENTITY space " ">
<!ENTITY newline " ">
<!ENTITY tab "	">
<!ENTITY more "↧">
]><!-- define nbsp as it is not defined in xml, only lt, gt and amp are defined by default -->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" indent="yes"
doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"
doctype-system="http://www.w3.org/TR/html4/loose.dtd"
/>
<!-- contains variable site_url -->
<xsl:include href="constants.xsl"/>
<!-- css includes -->
<xsl:include href="meme.css.xsl"/>
<xsl:include href="spamo-to-html.css.xsl"/>
<!-- js includes -->
<xsl:include href="delay_draw.js.xsl"/>
<xsl:include href="motif_logo.js.xsl"/>
<xsl:include href="spamo_graph.js.xsl"/>
<xsl:include href="spamo-to-html.js.xsl"/>
<!-- Stylesheet processing starts here -->
<xsl:template match="/">
<!-- Possible way to output a html 5 doctype -->
<!--
<xsl:text disable-output-escaping='yes'><!DOCTYPE HTML>&newline;</xsl:text>
-->
<html>
<xsl:call-template name="html-head"/>
<xsl:call-template name="html-body"/>
</html>
</xsl:template>
<xsl:template name="html-head">
<head>
<title>SpaMo - Spaced Motif Analysis</title>
<xsl:call-template name="html-css"/>
<xsl:call-template name="html-script"/>
</head>
</xsl:template>
<xsl:template name="html-css">
<style type="text/css">
<xsl:call-template name="meme.css"/>
<xsl:call-template name="spamo-to-html.css"/>
</style>
</xsl:template>
<xsl:template name="html-script">
<script type="text/javascript">
<xsl:call-template name="delay_draw.js"/>
<xsl:call-template name="motif_logo.js"/>
<xsl:call-template name="spamo_graph.js"/>
<xsl:call-template name="spamo-to-html.js"/>
<xsl:for-each select="/spamo/primary_motif">
<xsl:call-template name="store-motif">
<xsl:with-param name="id" select="position()"/>
<xsl:with-param name="tabbing" select="' '"/>
</xsl:call-template>
</xsl:for-each>
</script>
</xsl:template>
<xsl:template name="html-body">
<body onscroll="delayed_process_draw_tasks()" onresize="delayed_process_draw_tasks()">
<!--<xsl:call-template name="help-popups"/>-->
<xsl:call-template name="top"/>
<xsl:call-template name="primary-summary"/>
<xsl:call-template name="sequence-summary"/>
<xsl:call-template name="secondary-summary"/>
<xsl:call-template name="primary-motifs"/>
<xsl:call-template name="program"/>
<!--<xsl:call-template name="documentation"/>-->
<xsl:call-template name="footer"/>
</body>
</xsl:template>
<xsl:template name="top">
<a name="top"/>
<div class="pad1"><!-- FIXME url currently local for testing -->
<h1><img src="{$site_url}/doc/images/spamo_logo.png" alt="Spaced Motif analysis tool (SpaMo)" /></h1>
<p class="spaced">
For further information on how to interpret these results or to get a
copy of the MEME software please access
<a href="http://meme.nbcr.net/">http://meme.nbcr.net</a>.
</p>
</div>
<!-- navigation -->
<div class="pad2">
<a class="jump" href="#primary_summary">Primary Motif</a>
<xsl:text> | </xsl:text>
<a class="jump" href="#sequence_summary">Sequence Database</a>
<xsl:text> | </xsl:text>
<a class="jump" href="#secondary_summary">Secondary Databases</a>
<xsl:text> | </xsl:text>
<a class="jump" href="#spacing_analysis">Spacing Analysis</a>
<xsl:text> | </xsl:text>
<a class="jump" href="#program">Program information</a><!--
<xsl:text> | </xsl:text>
<a class="jump" href="#doc">Explanation</a>-->
</div>
</xsl:template>
<xsl:template name="sequence-summary">
<xsl:call-template name="header">
<xsl:with-param name="title" select="'Sequence Database'"/>
<xsl:with-param name="self" select="'sequence_summary'"/>
<xsl:with-param name="next" select="'secondary_summary'"/>
<xsl:with-param name="prev" select="'primary_summary'"/>
</xsl:call-template>
<xsl:variable name="seq" select="/spamo/files/sequence_db"/>
<div class="box" >
<table class="preview">
<tr>
<th>Name</th>
<th>Last Modified</th>
<th>Loaded</th>
<th>Too Short</th>
<th>No Primary</th>
<th>Too Similar</th>
<th>Used</th>
</tr>
<tr>
<td><xsl:value-of select="$seq/@name"/></td>
<td><xsl:value-of select="$seq/@last_modified"/></td>
<td><xsl:value-of select="$seq/@loaded"/></td>
<td><xsl:value-of select="$seq/@excluded_too_short"/></td>
<td><xsl:value-of select="$seq/@excluded_no_match"/></td>
<td><xsl:value-of select="$seq/@excluded_similar"/></td>
<td><xsl:value-of select="$seq/@loaded - $seq/@excluded_too_short - $seq/@excluded_no_match - $seq/@excluded_similar"/></td>
</tr>
</table>
</div>
</xsl:template>
<xsl:template name="primary-summary">
<xsl:variable name="top-list" select="20"/>
<xsl:call-template name="header">
<xsl:with-param name="title" select="'Primary Motif'"/>
<xsl:with-param name="self" select="'primary_summary'"/>
<xsl:with-param name="next" select="'sequence_summary'"/>
</xsl:call-template>
<div class="box" >
<table class="preview">
<tr>
<th>Name<!-- <div class="help" onclick="help_popup(this, 'pop_primary_motif_name')"/>--></th>
<th>Preview<!-- <div class="help" onclick="help_popup(this, 'pop_primary_motif_preview')"/>--></th>
<th>Significant Secondaries<!-- <div class="help" onclick="help_popup(this, 'pop_primary_motif_sig_motifs')"/>--></th>
<th>List</th>
</tr>
<xsl:for-each select="spamo/primary_motif">
<xsl:variable name="primary_pos" select="position()"/>
<tr>
<td><xsl:call-template name="motif-name"/></td>
<td>
<xsl:call-template name="motif-logo">
<xsl:with-param name="motif_id" select="position()"/>
<xsl:with-param name="replace_id" select="concat('preview_primary_', position())"/>
<xsl:with-param name="title_text" select="concat('Primary: ', motif/@name)"/>
<xsl:with-param name="already_stored" select="'true'"/>
</xsl:call-template>
</td>
<td><xsl:value-of select="count(secondary_motif)"/></td>
<td>
<xsl:for-each select="secondary_motif[position() <= $top-list]">
<xsl:variable name="link" select="concat('s_', $primary_pos, '_', position())"/>
<a href="#{$link}">
<xsl:call-template name="motif-name"/>
</a>
<xsl:if test="position() != last() and position() < $top-list">
<xsl:text>, </xsl:text>
</xsl:if>
</xsl:for-each>
</td>
</tr>
</xsl:for-each>
</table>
</div>
</xsl:template>
<xsl:template name="secondary-summary">
<xsl:call-template name="header">
<xsl:with-param name="title" select="'Secondary Databases'"/>
<xsl:with-param name="self" select="'secondary_summary'"/>
<xsl:with-param name="prev" select="'sequence_summary'"/>
<xsl:with-param name="next" select="'spacing_analysis'"/>
</xsl:call-template>
<div class="box">
<table class="preview">
<tr>
<th>Name<!-- <div class="help" onclick="help_popup(this, 'pop_secondary_databases_name')"/>--></th>
<th>Last Modified<!-- <div class="help" onclick="help_popup(this, 'pop_secondary_databases_last_modified')"/>--></th>
<th>Number of Motifs<!-- <div class="help" onclick="help_popup(this, 'pop_secondary_databases_num_motifs')"/>--></th>
<th>Motifs Significant<!-- <div class="help" onclick="help_popup(this, 'pop_secondary_databases_sig_motifs')"/>--></th>
<th>Motifs Redundant<!-- <div class="help" onclick="help_popup(this, 'pop_secondary_databases_redundant_motifs')"/>--></th>
</tr>
<xsl:for-each select="/spamo/files/motif_db[@id != 'primary_file']">
<xsl:variable name="db_id" select="@id"/>
<tr>
<td><xsl:value-of select="@name"/></td>
<td><xsl:value-of select="@last_modified"/></td>
<td><xsl:value-of select="@loaded - @excluded"/></td>
<td><xsl:value-of select="count(/spamo/primary_motif/secondary_motif/motif[@db = $db_id])"/></td>
<td><xsl:value-of select="count(/spamo/primary_motif/secondary_motif/redundant/secondary_motif/motif[@db = $db_id])"/></td>
</tr>
</xsl:for-each>
</table>
</div>
</xsl:template>
<xsl:template name="primary-motifs">
<a name="spacing_analysis"/>
<xsl:for-each select="/spamo/primary_motif">
<xsl:variable name="primary_pos" select="position()"/>
<xsl:variable name="primary_last" select="position() = last()"/>
<xsl:for-each select="secondary_motif">
<xsl:choose>
<xsl:when test="$primary_last and position() = last()">
<a name="last_spacing_analysis"/>
</xsl:when>
<xsl:when test="position() = last()">
<a name="l_{$primary_pos}"/>
</xsl:when>
</xsl:choose>
<xsl:call-template name="secondary-motif">
<xsl:with-param name="primary_index" select="$primary_pos"/>
<xsl:with-param name="id" select="concat('s_', $primary_pos, '_', position())"/>
<xsl:with-param name="prev">
<xsl:choose>
<xsl:when test="$primary_pos = 1 and position() = 1">secondary_summary</xsl:when>
<xsl:when test="position() = 1">
<xsl:value-of select="concat('l_', $primary_pos - 1)"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat('s_', $primary_pos, '_', position() - 1)"/>
</xsl:otherwise>
</xsl:choose>
</xsl:with-param>
<xsl:with-param name="next">
<xsl:choose>
<xsl:when test="$primary_last and position() = last()">
<xsl:text>program</xsl:text>
</xsl:when>
<xsl:when test="position() = last()">
<xsl:value-of select="concat('s_', $primary_pos + 1, '_1')"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat('s_', $primary_pos, '_', position() + 1)"/>
</xsl:otherwise>
</xsl:choose>
</xsl:with-param>
</xsl:call-template>
</xsl:for-each>
</xsl:for-each>
</xsl:template>
<xsl:template name="secondary-motif">
<xsl:param name="primary_index"/>
<xsl:param name="id"/>
<xsl:param name="prev"/>
<xsl:param name="next"/>
<xsl:variable name="title">
<xsl:text>Spacings of "</xsl:text>
<xsl:call-template name="motif-name"/>
<xsl:text>" relative to "</xsl:text>
<xsl:call-template name="motif-name"><xsl:with-param name="motif" select="../motif"/></xsl:call-template>
<xsl:text>"</xsl:text>
</xsl:variable>
<xsl:call-template name="header">
<xsl:with-param name="title" select="$title"/>
<xsl:with-param name="self" select="$id"/>
<xsl:with-param name="prev" select="$prev"/>
<xsl:with-param name="next" select="$next"/>
</xsl:call-template>
<div class="box" >
<!-- table showing primary and secondary motifs -->
<table>
<tr>
<th>Primary: <xsl:call-template name="linked-motif-name">
<xsl:with-param name="motif" select="../motif"/>
</xsl:call-template><!-- <div class="help" onclick="help_popup(this, 'pop_primary')"/>-->
</th>
<th>Secondary: <xsl:call-template name="linked-motif-name"/><!-- <div class="help" onclick="help_popup(this, 'pop_secondary')"/>--></th>
</tr>
<tr>
<td>
<xsl:call-template name="motif-logo">
<xsl:with-param name="motif_id" select="$primary_index"/>
<xsl:with-param name="replace_id" select="concat($id, '_pm')"/>
<xsl:with-param name="motif" select="../motif"/>
<xsl:with-param name="title_text" select="concat('Primary: ', ../motif/@name)"/>
<xsl:with-param name="already_stored" select="'true'"/>
</xsl:call-template>
</td>
<td>
<xsl:call-template name="motif-logo">
<xsl:with-param name="motif_id" select="$id"/>
<xsl:with-param name="replace_id" select="concat($id, '_sm')"/>
<xsl:with-param name="title_text" select="concat('Secondary: ', motif/@name)"/>
</xsl:call-template>
</td>
</tr>
</table>
<table>
<tr>
<th colspan="2">Motif Spacing Histogram<!-- <div class="help" onclick="help_popup(this, 'pop_histogram')"/>--></th>
<th> </th><th colspan="2">Significant Motif Spacings<!-- <div class="help" onclick="help_popup(this, 'pop_spacings')"/>--></th><th> </th>
</tr>
<tr>
<th style="width:175px">Upstream</th><th style="width:175px">Downstream</th>
<th> </th>
<th style="width:130px">Upstream</th><th style="width:130px">Downstream</th>
<th>Other Details</th>
</tr>
<tr>
<td colspan="2">
<xsl:call-template name="secondary-motif-histogram">
<xsl:with-param name="graph_id" select="concat($id, '_hist')"/>
</xsl:call-template>
</td>
<th>
<xsl:call-template name="strand-titles"/>
</th>
<td colspan="2">
<xsl:call-template name="secondary-motif-spacings"/>
</td>
<td class="details" style="vertical-align:top">
<h4>Total sequences with primary and secondary motif<!-- <div class="help" onclick="help_popup(this, 'pop_seqtotal')"/>--></h4>
<xsl:value-of select="histogram/@total"/><br/>
<h4>Motif Database<!-- <div class="help" onclick="help_popup(this, 'pop_motifdb')"/>--></h4><!-- TODO add popup -->
<xsl:value-of select="id(motif/@db)/@name"/><br/>
<xsl:if test="redundant">
<fieldset class="sm_group">
<h4>Secondary motifs with similar spacings<!-- <div class="help" onclick="help_popup(this, 'pop_redundant')"/>--></h4>
<xsl:variable name="ck_scroll">
<xsl:choose>
<xsl:when test="count(redundant/secondary_motif) > 6">ck_scroll</xsl:when>
<xsl:otherwise>ck_fixed</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<div class="{$ck_scroll}">
<xsl:for-each select="redundant/secondary_motif">
<label><input type="checkbox" autocomplete="off" onclick="toggle_group("{concat($id, '_', position())}")"/>
<xsl:call-template name="motif-name"/>
</label>
</xsl:for-each>
</div>
</fieldset>
</xsl:if>
</td>
</tr>
</table>
<xsl:for-each select="redundant/secondary_motif">
<xsl:variable name="sid" select="concat($id, '_', position())"/>
<div id="{$sid}">
<table>
<tr>
<th colspan="6"><xsl:text>Similar Secondary: </xsl:text><xsl:call-template name="linked-motif-name"/></th>
</tr>
<tr>
<td colspan="2" style="width:350px;">
<xsl:call-template name="secondary-motif-histogram">
<xsl:with-param name="graph_id" select="concat($sid, '_hist')"/>
<xsl:with-param name="img" select="concat('hist_', ../../../motif/@name, '_', motif/@db, '_', motif/@name, '.png')"/>
<xsl:with-param name="group_id" select="$sid"/>
</xsl:call-template>
</td>
<th>
<xsl:call-template name="strand-titles"/>
</th>
<td colspan="2">
<xsl:call-template name="secondary-motif-spacings"/>
</td>
<td class="details" style="vertical-align:top">
<h4>Total sequences with primary and secondary motif<!-- <div class="help" onclick="help_popup(this, 'pop_seqtotal')"/>--></h4>
<xsl:value-of select="histogram/@total"/>
<xsl:choose>
<xsl:when test="/spamo/model/bin_size = 1">
<h4>Alignment by most significant spacings<!-- <div class="help" onclick="help_popup(this, 'pop_alignment')"/>--></h4>
<xsl:call-template name="secondary-motif-alignment">
<xsl:with-param name="s1_id" select="$id"/>
<xsl:with-param name="s2_id" select="$sid"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<h4>Secondary Motif<!-- <div class="help" onclick="help_popup(this, 'pop_secondary')"/>--></h4>
<xsl:call-template name="motif-logo">
<xsl:with-param name="motif_id" select="$sid"/>
<xsl:with-param name="replace_id" select="concat($sid, '_ssm')"/>
<xsl:with-param name="group_id" select="$sid"/>
<xsl:with-param name="title_text" select="concat('Similar Secondary: ', motif/@name)"/>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</td>
</tr>
</table>
</div>
<script>
document.getElementById("<xsl:value-of select="$sid"/>").style.display = "none";
</script>
</xsl:for-each>
</div>
</xsl:template>
<xsl:template name="motif-name">
<xsl:param name="motif" select="motif"/>
<xsl:value-of select="translate($motif/@name, '_', ' ')"/>
<xsl:if test="$motif/@alt">
<xsl:value-of select="concat(' (', translate($motif/@alt, '_', ' '), ')')"/>
</xsl:if>
</xsl:template>
<xsl:template name="linked-motif-name">
<xsl:param name="motif" select="motif"/>
<xsl:choose>
<xsl:when test="$motif/@url">
<a href="{$motif/@url}"><xsl:call-template name="motif-name"><xsl:with-param name="motif" select="$motif"/></xsl:call-template></a>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="motif-name"><xsl:with-param name="motif" select="$motif"/></xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="strand-titles">
<div class="st_box" >
<div class="st_same deg90rotate">Same Strand</div>
<div class="st_oppo deg90rotate">Opposite Strand</div>
</div>
</xsl:template>
<!--
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Creates a span containing the consensus sequence of the secondary logo which
is replaced by a canvas based logo when possible.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-->
<xsl:template name="motif-logo">
<xsl:param name="motif_id"/>
<xsl:param name="replace_id" select="$motif_id"/>
<xsl:param name="motif" select="motif"/>
<xsl:param name="group_id" select="''"/>
<xsl:param name="title_text" select="''"/>
<xsl:param name="already_stored" select="'false'"/>
<xsl:call-template name="motif-consensus">
<xsl:with-param name="motif" select="$motif"/>
<xsl:with-param name="id" select="$replace_id"/>
</xsl:call-template>
<script>
<xsl:if test="$already_stored = 'false'">
<xsl:call-template name="store-motif">
<xsl:with-param name="id" select="$motif_id"/>
</xsl:call-template>
</xsl:if>
<xsl:call-template name="ready-motif">
<xsl:with-param name="replace_id" select="$replace_id"/>
<xsl:with-param name="motif_id" select="$motif_id"/>
<xsl:with-param name="title_text" select="$title_text"/>
<xsl:with-param name="group_id" select="$group_id"/>
</xsl:call-template>
</script>
</xsl:template>
<!--
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Creates a table with the main secondary motif and similar secondary motif
aligned. If canvas or javascript is not avaliable then it uses an aligned
consensus.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-->
<xsl:template name="secondary-motif-alignment">
<xsl:param name="s1_id"/>
<xsl:param name="s2_id"/>
<!-- calculate indents -->
<xsl:variable name="sp1" select="../../spacing[1]"/>
<xsl:variable name="mot1" select="../../motif"/>
<xsl:variable name="sp2" select="spacing[1]"/>
<xsl:variable name="mot2" select="motif"/>
<!--
-->
<xsl:variable name="s1_strand">
<xsl:choose>
<xsl:when test="$sp2/@strand = $sp1/@strand">
<xsl:text>false</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>true</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<!--
calculate the indent given that the motifs are oriented as per the best peak's orientation
then later we can use this to orient them so the bottom motif is always displayed normal orientation
note this assumes a bin size of 1
-->
<xsl:variable name="natural_indent">
<!-- calculate the trimmed length -->
<xsl:variable name="mot1_tlen" select="$mot1/@length - $mot1/@ltrim - $mot1/@rtrim"/>
<xsl:variable name="mot2_tlen" select="$mot2/@length - $mot2/@ltrim - $mot2/@rtrim"/>
<xsl:variable name="mot1_trim">
<xsl:choose>
<xsl:when test="$sp1/@strand = 'same'">
<xsl:value-of select="$mot1/@ltrim"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$mot1/@rtrim"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="mot2_trim">
<xsl:choose>
<xsl:when test="$sp2/@strand = 'same'">
<xsl:value-of select="$mot2/@ltrim"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$mot2/@rtrim"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:choose>
<xsl:when test="$sp1/@side = 'left'"><!-- both are upstream -->
<xsl:variable name="sp1_offset" select="$sp1/@bin + $mot1_tlen + $mot1_trim"/>
<xsl:variable name="sp2_offset" select="$sp2/@bin + $mot2_tlen + $mot2_trim"/>
<xsl:value-of select="$sp1_offset - $sp2_offset"/>
</xsl:when>
<xsl:otherwise><!-- both are downstream -->
<xsl:variable name="sp1_offset" select="$sp1/@bin - $mot1_trim"/>
<xsl:variable name="sp2_offset" select="$sp2/@bin - $mot2_trim"/>
<xsl:value-of select="$sp2_offset - $sp1_offset"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<!--
calculate the indent required when keeping the redundant motif at the correct orientation
-->
<xsl:variable name="corrected_indent">
<xsl:choose>
<xsl:when test="$sp2/@strand = 'same'"><!-- alignment can be left as natural -->
<xsl:value-of select="$natural_indent"/>
</xsl:when>
<xsl:otherwise><!-- alignment must be flipped -->
<xsl:value-of select="$mot1/@length - $mot2/@length - $natural_indent"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="s1_indent">
<xsl:choose>
<xsl:when test="$corrected_indent < 0"><xsl:value-of select="0 - $corrected_indent"/></xsl:when>
<xsl:otherwise>0</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="s2_indent">
<xsl:choose>
<xsl:when test="$corrected_indent > 0"><xsl:value-of select="$corrected_indent"/></xsl:when>
<xsl:otherwise>0</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<table>
<tr>
<td>Best Similar<br/>Secondary</td>
<td>
<xsl:call-template name="motif-consensus">
<xsl:with-param name="motif" select="../../motif"/>
<xsl:with-param name="id" select="concat($s2_id, '_sm')"/>
<xsl:with-param name="col" select="$s1_indent"/>
<xsl:with-param name="rc" select="$s1_strand"/>
<xsl:with-param name="box" select="'false'"/>
</xsl:call-template>
</td>
</tr>
<tr>
<td>This Similar<br/>Secondary</td>
<td>
<xsl:call-template name="motif-consensus">
<xsl:with-param name="motif" select="motif"/>
<xsl:with-param name="id" select="concat($s2_id, '_ssm')"/>
<xsl:with-param name="col" select="$s2_indent"/>
<xsl:with-param name="box" select="'false'"/>
</xsl:call-template>
</td>
</tr>
</table>
<script>
<xsl:call-template name="store-motif">
<xsl:with-param name="id" select="$s2_id"/>
</xsl:call-template>
<xsl:call-template name="ready-motif">
<xsl:with-param name="replace_id" select="concat($s2_id, '_sm')"/>
<xsl:with-param name="motif_id" select="$s1_id"/>
<xsl:with-param name="title_text" select="concat('Secondary: ', $mot1/@name)"/>
<xsl:with-param name="group_id" select="$s2_id"/>
<xsl:with-param name="rc" select="$s1_strand"/>
<xsl:with-param name="indent" select="$s1_indent"/>
</xsl:call-template>
<xsl:call-template name="ready-motif">
<xsl:with-param name="replace_id" select="concat($s2_id, '_ssm')"/>
<xsl:with-param name="motif_id" select="$s2_id"/>
<xsl:with-param name="title_text" select="concat('Similar Secondary: ', $mot2/@name)"/>
<xsl:with-param name="group_id" select="$s2_id"/>
<xsl:with-param name="indent" select="$s2_indent"/>
</xsl:call-template>
</script>
</xsl:template>
<xsl:template name="secondary-motif-histogram">
<xsl:param name="graph_id"/>
<xsl:param name="replace_id" select="$graph_id"/>
<xsl:param name="img" select="concat('hist_', ../motif/@name, '_', motif/@db, '_', motif/@name, '.png')"/>
<xsl:param name="group_id" select="''"/>
<noscript><img src="{$img}"/></noscript>
<span id="{$replace_id}"></span>
<script type="text/javascript">
store_graph(
"<xsl:value-of select="$graph_id"/>",
<xsl:call-template name="spamo-graph">
<xsl:with-param name="smotif" select="."/>
<xsl:with-param name="indent" select="' '"/>
</xsl:call-template>
);
ready_graph(
"<xsl:value-of select="$replace_id"/>",
"<xsl:value-of select="$graph_id"/>",
false,
"<xsl:value-of select="$img"/>",
""
<xsl:if test="$group_id != ''">
,"<xsl:value-of select="$group_id"/>"
</xsl:if>
);
</script>
</xsl:template>
<xsl:template name="secondary-motif-spacings">
<div class="sp_box">
<div class="sp_same_up">
<xsl:call-template name="secondary-motif-quad-spacings">
<xsl:with-param name="strand" select="'same'"/>
<xsl:with-param name="side" select="'left'"/>
</xsl:call-template>
</div>
<div class="sp_same_down">
<xsl:call-template name="secondary-motif-quad-spacings">
<xsl:with-param name="strand" select="'same'"/>
<xsl:with-param name="side" select="'right'"/>
</xsl:call-template>
</div>
<div class="sp_oppo_up">
<xsl:call-template name="secondary-motif-quad-spacings">
<xsl:with-param name="strand" select="'opposite'"/>
<xsl:with-param name="side" select="'left'"/>
</xsl:call-template>
</div>
<div class="sp_oppo_down">
<xsl:call-template name="secondary-motif-quad-spacings">
<xsl:with-param name="strand" select="'opposite'"/>
<xsl:with-param name="side" select="'right'"/>
</xsl:call-template>
</div>
</div>
</xsl:template>
<xsl:template name="secondary-motif-quad-spacings">
<xsl:param name="strand"/>
<xsl:param name="side"/>
<xsl:variable name="spacing_set" select="spacing[@strand = $strand and @side = $side]"/>
<xsl:variable name="spacing_count" select="count($spacing_set)"/>
<xsl:variable name="sp_scroll">
<xsl:choose>
<xsl:when test="$spacing_count > 5">sp_scroll</xsl:when>
<xsl:otherwise>sp_fixed</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:if test="$spacing_count > 0">
<div class="{$sp_scroll}">
<table >
<thead>
<tr>
<th>P-value</th>
<th>Gap</th>
<th>#</th>
<th style="width:15px;"> </th>
</tr>
</thead>
<tbody>
<xsl:for-each select="$spacing_set">
<xsl:call-template name="secondary-motif-spacing"/>
</xsl:for-each>
</tbody>
</table>
</div>
</xsl:if>
</xsl:template>
<xsl:template name="secondary-motif-spacing">
<tr>
<td class="sp_pvalue" ><xsl:value-of select="@pvalue"/></td>
<td class="sp_gap">
<xsl:choose>
<xsl:when test="/spamo/model/bin_size = 1">
<xsl:value-of select="@bin - 1"/>
</xsl:when>
<xsl:otherwise>
<xsl:variable name="high" select="@bin * /spamo/model/bin_size - 1"/>
<xsl:variable name="low" select="$high - /spamo/model/bin_size + 1"/>
<xsl:value-of select="$low"/>
<xsl:text>:</xsl:text>
<xsl:value-of select="$high"/>
</xsl:otherwise>
</xsl:choose>
</td>
<td class="sp_count"><xsl:value-of select="@num"/></td>
<td> </td>
</tr>
</xsl:template>
<xsl:template name="program">
<a name="program"/>
<div class="bar">
<div style="text-align:right;"><a href="#last_spacing_analysis">Previous</a><!--<xsl:text> </xsl:text>-->
<!--<a href="#doc">Next</a>--><xsl:text> </xsl:text><a href="#top">Top</a></div>
<div class="subsection">
<a name="version"/>
<h5>SpaMo version</h5>
<xsl:value-of select="/spamo/@version"/> (Release date: <xsl:value-of select="/spamo/@release"/>)
</div>
<div class="subsection">
<a name="reference"/>
<h5>Reference</h5>
"Inferring transcription factor complexes from ChIP-seq data", Tom Whitington, Martin C. Frith, James Johnson, and Timothy L. Bailey,
submitted for publication.
</div>
<div class="subsection">
<a name="command" />
<h5>Command line summary</h5>
<textarea rows="1" style="width:100%;" readonly="readonly">
<xsl:value-of select="/spamo/model/command_line"/>
</textarea>
<br />
<xsl:text>Result calculation took </xsl:text>
<xsl:variable name="total_seconds" select="/spamo/run_time/@real"/>
<xsl:variable name="total_minutes" select="floor($total_seconds div 60)"/>
<xsl:variable name="hours" select="floor($total_minutes div 60)"/>
<xsl:variable name="minutes" select="$total_minutes - 60 * $hours"/>
<!-- don't use mod here as seconds value has fractions of a second too -->
<xsl:variable name="seconds" select="$total_seconds - 60 * $total_minutes"/>
<xsl:if test="$hours > 0">
<xsl:value-of select="$hours"/> hour<xsl:if test="$hours != 1">s</xsl:if>
<xsl:text> </xsl:text>
</xsl:if>
<xsl:if test="$hours > 0 or $minutes > 0">
<xsl:value-of select="$minutes"/> minute<xsl:if test="$minutes != 1">s</xsl:if>
<xsl:text> </xsl:text>
</xsl:if>
<xsl:value-of select="$seconds"/> second<xsl:if test="$seconds != 1">s</xsl:if>
<br />
<xsl:text>Note that the random number generator was initilized with a seed of </xsl:text>
<xsl:value-of select="/spamo/model/seed"/> so you need
"-numgen <xsl:value-of select="/spamo/model/seed"/>" in the list of arguments
to replicate the experiment.
</div>
<a href="javascript:show_hidden('model')" id="model_activator">show model parameters...</a>
<div class="subsection" id="model_data" style="display:none;">
<h5>Model parameters</h5>
<xsl:text>&newline;</xsl:text>
<textarea style="width:100%;" rows="{count(/spamo/model/*) - 1}" readonly="readonly">
<xsl:variable name="spaces" select="' '"/>
<xsl:text>&newline;</xsl:text>
<xsl:for-each select="/spamo/model/*[name(.) != 'command_line']">
<xsl:variable name="pad" select="substring($spaces,string-length(name(.)))"/>
<xsl:value-of select="name(.)"/>
<xsl:value-of select="$pad"/>
<xsl:text> = </xsl:text>
<xsl:choose>
<xsl:when test="count(@*) > 0">
<xsl:for-each select="@*">
<xsl:value-of select="name(.)"/>
<xsl:text>: "</xsl:text>
<xsl:value-of select="."/>
<xsl:text>"</xsl:text>
<xsl:if test="position() != last()">
<xsl:text>, </xsl:text>
</xsl:if>
</xsl:for-each>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="normalize-space(.)"/>
</xsl:otherwise>
</xsl:choose>
<xsl:text>&newline;</xsl:text>
</xsl:for-each>
</textarea>
</div>
<a href="javascript:hide_shown('model')" style="display:none;" id="model_deactivator">hide model parameters...</a>
</div>
</xsl:template>
<xsl:template name="help-popups">
<div class="pop_content" id="pop_primary_motif_name">
<p>The name of the primary motif.</p>
<div style="float:right; bottom:0px;">[ <a href="#">more</a> | <a href="javascript:help_popup()">close</a> ]</div>
</div>
<div class="pop_content" id="pop_primary_motif_preview">
<p>The logo of the primary motif.</p>
<p>Sections of the motif with a gray background have been trimmed and were not used for scanning.</p>
<div style="float:right; bottom:0px;">[ <a href="#">more</a> | <a href="javascript:help_popup()">close</a> ]</div>
</div>
<div class="pop_content" id="pop_primary_motif_sig_motifs">
<p>The number of secondary motifs found that had significant spacings in the tested region.</p>
<div style="float:right; bottom:0px;">[ <a href="#">more</a> | <a href="javascript:help_popup()">close</a> ]</div>
</div>
<div class="pop_content" id="pop_secondary_databases_name">
<p>The name of the motif database derived from the file name.</p>
<div style="float:right; bottom:0px;">[ <a href="#">more</a> | <a href="javascript:help_popup()">close</a> ]</div>
</div>
<div class="pop_content" id="pop_secondary_databases_last_modified">
<p>The date that the motif database was last modified.</p>
<div style="float:right; bottom:0px;">[ <a href="#">more</a> | <a href="javascript:help_popup()">close</a> ]</div>
</div>
<div class="pop_content" id="pop_secondary_databases_num_motifs">
<p>The number of motifs loaded from the motif database. Some motifs may have been excluded.</p>
<div style="float:right; bottom:0px;">[ <a href="#">more</a> | <a href="javascript:help_popup()">close</a> ]</div>
</div>
<div class="pop_content" id="pop_secondary_databases_sig_motifs">
<p>The number of motifs with significant spacings that were not considered too similar to another motif.</p>
<div style="float:right; bottom:0px;">[ <a href="#">more</a> | <a href="javascript:help_popup()">close</a> ]</div>
</div>
<div class="pop_content" id="pop_secondary_databases_redundant_motifs">
<p>The count of motifs that while having significant spacings were less signficant than another motif that matched
most of the same sites.</p>
<div style="float:right; bottom:0px;">[ <a href="#">more</a> | <a href="javascript:help_popup()">close</a> ]</div>
</div>
<div class="pop_content" id="pop_primary">
<p>The primary motif is used as the reference point for all spacing calculation.</p>
<p>Sections of the motif with a gray background have been trimmed and were not used for scanning.</p>
<div style="float:right; bottom:0px;">[ <a href="#doc_primary">more</a> | <a href="javascript:help_popup()">close</a> ]</div>
</div>
<div class="pop_content" id="pop_secondary">
<p>The secondary motif occurs at the spacings relative to the primary shown in the histogram below.</p>
<p>Sections of the motif with a gray background have been trimmed and were not used for scanning.</p>
<div style="float:right; bottom:0px;">[ <a href="#doc_secondary">more</a> | <a href="javascript:help_popup()">close</a> ]</div>
</div>
<div class="pop_content" id="pop_histogram">
<p>The histogram below shows the frequency of spacings from the primary motif to the secondary motif. Red bars
indicate that a spacing has occured a statistically significant number of times.</p>
<dl>
<dt><b>Upstream</b></dt>
<dd>These are sequences where the secondary motif occurs before the primary motif.</dd>
<dt><b>Downstream</b></dt>
<dd>These are sequences where the secondary motif occurs after the primary motif.</dd>
<dt><b>Same Strand</b></dt>
<dd>These are sequences where the secondary motif is on the same strand as the primary motif.</dd>
<dt><b>Opposite Strand</b></dt>
<dd>These are sequences where the secondary motif is on the opposite strand to the primary motif.</dd>
</dl>
<div style="float:right; bottom:0px;">[ <a href="#doc_histogram">more</a> | <a href="javascript:help_popup()">close</a> ]</div>
</div>
<div class="pop_content" id="pop_spacings">
<p>The details of the significant spacings are shown in the four quadrants as they relate to the quadrants of the graph.</p>
<dl>
<dt><b>P-value</b></dt>
<dd>is the probability that the spacing happened by chance.</dd>
<dt><b>Gap</b></dt>
<dd>is the space between the primary and secondary motifs where a value of zero means there is no space between them.</dd>
<dt><b>#</b></dt>
<dd>is the count of sequences where that spacing was observed.</dd>
</dl>
<div style="float:right; bottom:0px;">[ <a href="#doc_spacings">more</a> | <a href="javascript:help_popup()">close</a> ]</div>
</div>
<div class="pop_content" id="pop_seqtotal">
<p>The total count of sequences that have a match for both the primary motif and this secondary motif.</p>
<div style="float:right; bottom:0px;">[ <a href="#doc_seqtotal">more</a> | <a href="javascript:help_popup()">close</a> ]</div>
</div>
<div class="pop_content" id="pop_redundant">
<p>The list of secondary motifs which have been identified as possibly similar to this motif because their most significant spacings
overlaped with the most significant spacing of this motif. Check the boxes to show the possibly similar secondary motifs.</p>
<div style="float:right; bottom:0px;">[ <a href="#doc_redundant">more</a> | <a href="javascript:help_popup()">close</a> ]</div>
</div>
<div class="pop_content" id="pop_alignment">
<p>This shows the first secondary motif aligned with the current secondary motif by the most significant spacing.</p>
<p>Sections of the motif with a gray background have been trimmed and were not used for scanning.</p>
<div style="float:right; bottom:0px;">[ <a href="#doc_alignment">more</a> | <a href="javascript:help_popup()">close</a> ]</div>
</div>
</xsl:template>
<xsl:template name="documentation">
<span class="explain">
<xsl:call-template name="header">
<xsl:with-param name="title" select="'Explanation of SpaMo Results'"/>
<xsl:with-param name="self" select="'doc'"/>
<xsl:with-param name="prev" select="'program'"/>
</xsl:call-template>
<div class="box">
<h4>The SpaMo results consist of</h4>
<ul>
<li>The <a href="#doc_spacing_analysis">motif spacing analysis</a>. [<a href="#spacing_analysis">View</a>]</li>
<li>The <b>program</b> details including:
<ol>
<li>The <b>version</b> of SpaMo and the date it was released. [<a href="#version">View</a>]</li>
<li>The <b>reference</b> to cite if you use SpaMo in your research. [<a href="#reference">View</a>]</li>
<li>The <b>command line summary</b> detailing the parameters with which you ran SpaMo. [<a href="#command">View</a>]</li>
</ol>
</li>
<li>This <b>explanation</b> of how to interpret SpaMo results.</li>
</ul>
<a name="doc_spacing_analysis"/>
<h4>Spacing Analysis</h4>
<p>All secondary motifs which were found to have a significant spacing relative to the primary motif are listed in order of increasing p-value.</p>
<a name="doc_primary"/>
<h5>Primary Motif</h5>
<div class="doc">
<p>The primary motif is the motif for which possible interacting motifs are discovered.
All spacings use as their reference point the best match to the primary motif in the
sequence which leaves a margin on either side which the interacting motifs are discovered.</p>
</div>
<a name="doc_secondary"/>
<h5>Secondary Motif</h5>
<div class="doc">
<p>The secondary motif is a candidate for interaction with the primary motif as to be
listed it must have a significant spacing relative to the primary motif.</p>
</div>
<a name="doc_histogram"/>
<h5>Motif Spacing Histogram</h5>
<div class="doc">
<p>The histogram shows the frequency of spacings of the primary to the secondary motif.
Any spacing with a statistically significant count is highlighted in red.</p>
<p>The histogram is divided into four quadrants which give the position and orientation
of the secondary motif relative to the primary motif.</p>
</div>
<a name="doc_spacings"/>
<h5>Significant Motif Spacings</h5>
<div class="doc">
<p>The significant spacings in the histogram are shown divided up by the quadrant of the graph. Within each quadrant the spacings are sorted
in order of significance.</p>
<dl>
<dt>P-value</dt>
<dd>The probability that this peak occurred due to chance.</dd>
<dt>Gap</dt>
<dd>The number of bases separating the primary and secondary motif. A gap of zero means the two motifs are up against each other.</dd>
<dt>#</dt>
<dd>The number of sequences that had the best primary motif match separated from the best
secondary motif match in the margin by exactly Gap bases.</dd>
</dl>
</div>
<a name="doc_seqtotal"/>
<h5>Total sequences with primary and secondary motif</h5>
<div class="doc">
<p>The number of sequences shown on the graph. The graph shows only the sequences which had
binding sites for both the primary and secondary motifs.</p>
</div>
<h4>Secondary motifs with similar spacings</h4>
<p>These are motifs which have overlapping best primary peaks.</p>
<!--
<a name="anchor_goes_here"/>
<h5>Subtitle</h5>
<div class="doc">
<p>Description goes here</p>
<dl>
<a name="item_anchor"/>
<dt>Item Name</dt>
<dd>The item description.</dd>
</dl>
</div>
-->
<!--
<h4>Title</h4>
<p>Description goes here.</p>
<a name="anchor_goes_here"/>
<h5>Subtitle</h5>
<div class="doc">
<p>Description goes here</p>
<dl>
<a name="item_anchor"/>
<dt>Item Name</dt>
<dd>The item description.</dd>
</dl>
</div>
-->
</div>
</span>
</xsl:template>
<xsl:template name="footer">
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
<br/>
</xsl:template>
<xsl:template name="store-motif">
<xsl:param name="id"/>
<xsl:param name="motif" select="motif"/>
<xsl:param name="tabbing" select="''"/>
<xsl:variable name="dtabbing" select="concat($tabbing, ' ')"/>
<xsl:text>&newline;</xsl:text><xsl:value-of select="$tabbing"/>
<xsl:text>store_motif(&newline;</xsl:text>
<xsl:value-of select="$dtabbing"/>
<xsl:text>"</xsl:text><xsl:value-of select="$id"/><xsl:text>",&newline;</xsl:text>
<xsl:value-of select="$dtabbing"/>
<xsl:text>"</xsl:text><xsl:value-of select="motif/@name"/><xsl:text>",&newline;</xsl:text>
<xsl:value-of select="$dtabbing"/>
<xsl:value-of select="motif/@ltrim"/><xsl:text>,&newline;</xsl:text>
<xsl:value-of select="$dtabbing"/>
<xsl:value-of select="motif/@rtrim"/><xsl:text>,&newline;</xsl:text>
<xsl:value-of select="$dtabbing"/>
<xsl:call-template name="motif-pspm">
<xsl:with-param name="motif" select="motif"/>
<xsl:with-param name="indent" select="$dtabbing"/>
</xsl:call-template>
<xsl:text>&newline;</xsl:text>
<xsl:value-of select="$tabbing"/>
<xsl:text>);&newline;</xsl:text>
</xsl:template>
<xsl:template name="ready-motif">
<xsl:param name="replace_id"/>
<xsl:param name="motif_id"/>
<xsl:param name="cache" select="'false'"/>
<xsl:param name="indent" select="0"/>
<xsl:param name="rc" select="'false'"/>
<xsl:param name="title_text" select="''"/>
<xsl:param name="group_id" select="''"/>
<xsl:param name="tabbing" select="''"/>
<xsl:variable name="dtabbing" select="concat($tabbing, ' ')"/>
<xsl:text>&newline;</xsl:text><xsl:value-of select="$tabbing"/>
<xsl:text>ready_motif(&newline;</xsl:text>
<xsl:value-of select="$dtabbing"/>
<xsl:text>"</xsl:text><xsl:value-of select="$replace_id"/><xsl:text>",&newline;</xsl:text>
<xsl:value-of select="$dtabbing"/>
<xsl:text>"</xsl:text><xsl:value-of select="$motif_id"/><xsl:text>",&newline;</xsl:text>
<xsl:value-of select="$dtabbing"/>
<xsl:value-of select="$cache"/><xsl:text>,&newline;</xsl:text>
<xsl:value-of select="$dtabbing"/>
<xsl:value-of select="$indent"/><xsl:text>,&newline;</xsl:text>
<xsl:value-of select="$dtabbing"/>
<xsl:value-of select="$rc"/><xsl:text>,&newline;</xsl:text>
<xsl:value-of select="$dtabbing"/>
<xsl:text>"</xsl:text><xsl:value-of select="$title_text"/><xsl:text>"</xsl:text>
<xsl:if test="$group_id != ''">
<xsl:text>,&newline;</xsl:text>
<xsl:value-of select="$dtabbing"/>
<xsl:text>"</xsl:text>
<xsl:value-of select="$group_id"/>
<xsl:text>"&newline;</xsl:text>
</xsl:if>
<xsl:text>&newline;</xsl:text>
<xsl:value-of select="$tabbing"/>
<xsl:text>);&newline;</xsl:text>
</xsl:template>
<xsl:template name="motif-pspm">
<xsl:param name="motif"/>
<xsl:param name="indent" select="''"/>
<xsl:text>"letter-probability matrix: alength= 4 w= </xsl:text><xsl:value-of select="$motif/@length"/>
<xsl:text> nsites= </xsl:text><xsl:value-of select="$motif/@nsites"/><xsl:text> E= </xsl:text>
<xsl:value-of select="$motif/@evalue"/><xsl:text>\n"</xsl:text>
<xsl:for-each select="$motif/pos">
<xsl:variable name="psum" select="@A + @C + @G + @T"/>
<xsl:variable name="delta" select="0.01"/>
<xsl:if test="($psum > 1 and $psum - 1 > $delta) or ($psum < 1 and 1 - $psum > $delta)">
<xsl:message>
Warning: Motif <xsl:value-of select="@id"/> probabilities at pos <xsl:value-of select="@i"/> don't sum to 1
(delta <xsl:value-of select="$delta"/>).
</xsl:message>
</xsl:if>
<xsl:text> + &newline;</xsl:text>
<xsl:value-of select="$indent"/><xsl:text>"</xsl:text>
<xsl:value-of select="@A"/><xsl:text> </xsl:text><xsl:value-of select="@C"/><xsl:text> </xsl:text>
<xsl:value-of select="@G"/><xsl:text> </xsl:text><xsl:value-of select="@T"/>
<xsl:text>\n"</xsl:text>
</xsl:for-each>
</xsl:template>
<xsl:template name="spamo-graph-bins">
<xsl:param name="bins" />
<xsl:param name="indent" select="''"/>
<xsl:value-of select="$indent"/><xsl:text>"</xsl:text>
<xsl:for-each select="$bins">
<xsl:choose>
<xsl:when test="@p">
<xsl:value-of select="concat(@n, ' ', @p)"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat(@n, ' 1')"/>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="position() = last()">
<xsl:text>\n\n"</xsl:text>
</xsl:when>
<xsl:when test="position() mod 40 = 0">
<xsl:text>\n" + &newline;</xsl:text>
<xsl:value-of select="$indent"/>
<xsl:text>"</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text> </xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</xsl:template>
<xsl:template name="spamo-graph">
<xsl:param name="smotif"/>
<xsl:param name="indent" select="''"/>
<xsl:text>"% Input Data\n" + &newline;</xsl:text>
<xsl:value-of select="$indent"/>
<xsl:text>"</xsl:text>
<xsl:value-of select="/spamo/model/margin"/><xsl:text> margin </xsl:text>
<xsl:value-of select="$smotif/motif/@length - $smotif/motif/@ltrim - $smotif/motif/@rtrim"/><xsl:text> motif-length </xsl:text>
<xsl:value-of select="/spamo/model/bin_size"/><xsl:text> bin-size </xsl:text>
<xsl:value-of select="/spamo/model/bin_max" /><xsl:text> bin-max </xsl:text>
<xsl:value-of select="histogram/@total" /><xsl:text> sequences </xsl:text>
<xsl:value-of select="/spamo/model/bin_pvalue_cutoff" /><xsl:text> threshold\n\n" + &newline;</xsl:text>
<xsl:value-of select="$indent"/>
<xsl:text>"% Same Left\n" + &newline;</xsl:text>
<xsl:call-template name="spamo-graph-bins">
<xsl:with-param name="bins" select="histogram/same_strand/left_side/bin"/>
<xsl:with-param name="indent" select="$indent"/>
</xsl:call-template>
<xsl:text> + &newline;</xsl:text>
<xsl:value-of select="$indent"/>
<xsl:text>"% Same Right\n" + &newline;</xsl:text>
<xsl:call-template name="spamo-graph-bins">
<xsl:with-param name="bins" select="histogram/same_strand/right_side/bin"/>
<xsl:with-param name="indent" select="$indent"/>
</xsl:call-template>
<xsl:text> + &newline;</xsl:text>
<xsl:value-of select="$indent"/>
<xsl:text>"% Opposite Left\n" + &newline;</xsl:text>
<xsl:call-template name="spamo-graph-bins">
<xsl:with-param name="bins" select="histogram/opposite_strand/left_side/bin"/>
<xsl:with-param name="indent" select="$indent"/>
</xsl:call-template>
<xsl:text> + &newline;</xsl:text>
<xsl:value-of select="$indent"/>
<xsl:text>"% Opposite Right\n" + &newline;</xsl:text>
<xsl:call-template name="spamo-graph-bins">
<xsl:with-param name="bins" select="histogram/opposite_strand/right_side/bin"/>
<xsl:with-param name="indent" select="$indent"/>
</xsl:call-template>
</xsl:template>
<xsl:template name="motif-consensus">
<xsl:param name="motif"/>
<xsl:param name="id" select="''"/>
<xsl:param name="col" select="0"/>
<xsl:param name="rc" select="'false'"/>
<xsl:param name="box" select="'true'"/>
<xsl:variable name="seqclass">
<xsl:text>seq</xsl:text>
<xsl:if test="$box = 'true'">
<xsl:text> seqbox</xsl:text>
</xsl:if>
</xsl:variable>
<div class="{$seqclass}" id="{$id}">
<xsl:call-template name="motif-consensus-pad"><xsl:with-param name="pad" select="$col"/></xsl:call-template>
<xsl:choose>
<xsl:when test="$rc = 'true'">
<xsl:for-each select="$motif/pos">
<xsl:sort select="@i" data-type="number" order="descending"/>
<xsl:call-template name="pos-consensus-complement"/>
</xsl:for-each>
</xsl:when>
<xsl:otherwise>
<xsl:for-each select="$motif/pos"><xsl:call-template name="pos-consensus"/></xsl:for-each>
</xsl:otherwise>
</xsl:choose>
</div>
</xsl:template>
<xsl:template name="motif-consensus-pad">
<xsl:param name="pad" select="0"/>
<xsl:if test="$pad > 0">
<xsl:text> </xsl:text>
<xsl:call-template name="motif-consensus-pad"><xsl:with-param name="pad" select="$pad - 1"/></xsl:call-template>
</xsl:if>
</xsl:template>
<xsl:template name="pos-consensus">
<xsl:variable name="trim">
<xsl:if test="../@ltrim >= @i or @i > ../@length - ../@rtrim ">
<xsl:text>trim</xsl:text>
</xsl:if>
</xsl:variable>
<xsl:choose>
<xsl:when test="@A >= @C and @A >= @G and @A >= @T">
<span class="A {$trim}">A</span>
</xsl:when>
<xsl:when test="@C >= @A and @C >= @G and @C >= @T">
<span class="C {$trim}">C</span>
</xsl:when>
<xsl:when test="@G >= @A and @G >= @C and @G >= @T">
<span class="G {$trim}">G</span>
</xsl:when>
<xsl:otherwise>
<span class="T {$trim}">T</span>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="pos-consensus-complement">
<xsl:variable name="trim">
<xsl:if test="../@ltrim >= @i or @i > ../@length - ../@rtrim ">
<xsl:text>trim</xsl:text>
</xsl:if>
</xsl:variable>
<xsl:choose>
<xsl:when test="@A >= @C and @A >= @G and @A >= @T">
<span class="T {$trim}">T</span>
</xsl:when>
<xsl:when test="@C >= @A and @C >= @G and @C >= @T">
<span class="G {$trim}">G</span>
</xsl:when>
<xsl:when test="@G >= @A and @G >= @C and @G >= @T">
<span class="C {$trim}">C</span>
</xsl:when>
<xsl:otherwise>
<span class="A {$trim}">A</span>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="header">
<xsl:param name="title" />
<xsl:param name="self" select="$title" />
<xsl:param name="prev" select="''" />
<xsl:param name="next" select="''" />
<a name="{$self}"/>
<table width="100%" border="0" cellspacing="1" cellpadding="4" bgcolor="#FFFFFF">
<tr>
<td>
<h2 class="mainh"><xsl:value-of select="$title"/></h2>
</td>
<td align="right" valign="bottom">
<xsl:if test="$prev != ''"><a href="#{$prev}">Previous</a> </xsl:if>
<xsl:if test="$next != ''"><a href="#{$next}">Next</a> </xsl:if>
<a href="#top">Top</a>
</td>
</tr>
</table>
</xsl:template>
</xsl:stylesheet>
| 42.661898 | 162 | 0.569147 |
0ed1c164a60a780c3731bb92cd9ee2643d43d9b7 | 8,932 | xsl | XSLT | _/8280_10/All-05192010/AccessServices-Moonlight/com/junglesea/transforms/SupplierPartnerOrderMSG_2_PurchaseOrderType.xsl | paullewallencom/ibm-websphere-978-1-8471-9828-0 | 0b68bee44f28105ca8d5573afe94b8474dee273e | [
"Apache-2.0"
] | null | null | null | _/8280_10/All-05192010/AccessServices-Moonlight/com/junglesea/transforms/SupplierPartnerOrderMSG_2_PurchaseOrderType.xsl | paullewallencom/ibm-websphere-978-1-8471-9828-0 | 0b68bee44f28105ca8d5573afe94b8474dee273e | [
"Apache-2.0"
] | null | null | null | _/8280_10/All-05192010/AccessServices-Moonlight/com/junglesea/transforms/SupplierPartnerOrderMSG_2_PurchaseOrderType.xsl | paullewallencom/ibm-websphere-978-1-8471-9828-0 | 0b68bee44f28105ca8d5573afe94b8474dee273e | [
"Apache-2.0"
] | null | null | null | <?xml version="1.0" encoding="UTF-8"?>
<!-- @generated mapFile="com/junglesea/transforms/SupplierPartnerOrderMSG_2_PurchaseOrderType.map" md5sum="b7b3a2b9f7bf54126fa36cde01bbf2bf" version="7.0.101" -->
<!--
*****************************************************************************
* This file has been generated by the IBM XML Mapping Editor V7.0.101
*
* Mapping file: SupplierPartnerOrderMSG_2_PurchaseOrderType.map
* Map declaration(s): SupplierPartnerOrderMSG_2_PurchaseOrderType
* Input file(s): smo://smo/name%3Dwsdl-primary/message%3D%257Bhttp%253A%252F%252FSupplierPartnerDomain-v1_0%252Fcom%252Fjunglesea%252Fbusinessservices%252Finterfaces%252FProcessSPOrders%257DsubmitSupplierOrderRequestMsg/xpath%3D%252Fbody/smo.xsd
* Output file(s): smo://smo/name%3Dwsdl-primary/message%3D%257Bhttp%253A%252F%252FMoonlightLibrary%252Fcom%252Fjunglesea%252Fapps%252Fmoonlight%252FProcessPurchaseOrder%257DprocessOrderRequestMsg/xpath%3D%252Fbody/smo.xsd
*
* Note: Do not modify the contents of this file as it is overwritten
* each time the mapping model is updated.
*****************************************************************************
-->
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xalan="http://xml.apache.org/xslt"
xmlns:in="http://CustomerDomain-v1_0/com/junglesea/bo"
xmlns:in2="http://SupplierPartnerDomain-v1_0/com/junglesea/bo/msg"
xmlns:in3="http://ProductDomain-v1_0/com/junglesea/bo"
xmlns:in4="http://CommonDomain-v1_0/com/junglesea/bo"
xmlns:in5="wsdl.http://SupplierPartnerDomain-v1_0/com/junglesea/businessservices/interfaces/ProcessSPOrders"
xmlns:in6="http://BillingDomain-v1_0/com/junglesea/bo"
xmlns:in7="http://SupplierPartnerDomain-v1_0/com/junglesea/businessservices/interfaces/ProcessSPOrders"
xmlns:in8="http://CustomerDomain-Msg/com/junglesea/bo"
xmlns:io="http://www.w3.org/2003/05/soap-envelope"
xmlns:out="http://MoonlightLibrary/com/junglesea/apps/moonlight/ProcessPurchaseOrder"
xmlns:io3="http://www.ibm.com/xmlns/prod/websphere/mq/sca/6.0.0"
xmlns:io2="http://www.ibm.com/websphere/sibx/smo/v6.0.1"
xmlns:io4="http://schemas.xmlsoap.org/ws/2004/08/addressing"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:io5="http://www.ibm.com/xmlns/prod/websphere/http/sca/6.1.0"
xmlns:out2="wsdl.http://MoonlightLibrary/com/junglesea/apps/moonlight/ProcessPurchaseOrder"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:io6="http://www.w3.org/2005/08/addressing"
xmlns:map="http://AccessServices-Moonlight2/com/junglesea/transforms/SupplierPartnerOrderMSG_2_PurchaseOrderType"
exclude-result-prefixes="in in2 in3 in4 in5 in6 in7 in8 map xalan"
version="1.0">
<xsl:output method="xml" encoding="UTF-8" indent="no"/>
<!-- root template -->
<xsl:template match="/">
<xsl:apply-templates select="body" mode="map:SupplierPartnerOrderMSG_2_PurchaseOrderType"/>
</xsl:template>
<!-- This rule represents an element mapping: "body" to "body". -->
<xsl:template match="body" mode="map:SupplierPartnerOrderMSG_2_PurchaseOrderType">
<body>
<out:processOrder>
<purchaseOrder>
<!-- a simple data mapping: "in7:submitSupplierOrder/inputParams/SupplierPartnerOrder/OrderItems/DeliveryDate"(date) to "orderDate"(date) -->
<xsl:if test="in7:submitSupplierOrder/inputParams/SupplierPartnerOrder/OrderItems/DeliveryDate">
<xsl:attribute name="orderDate">
<xsl:value-of select="in7:submitSupplierOrder/inputParams/SupplierPartnerOrder/OrderItems/DeliveryDate"/>
</xsl:attribute>
</xsl:if>
<shipTo>
<!-- a simple data mapping: "in7:submitSupplierOrder/inputParams/SupplierPartnerOrder/OrderItems/ShippingAddress/County"(string) to "country"(NMTOKEN) -->
<xsl:if test="in7:submitSupplierOrder/inputParams/SupplierPartnerOrder/OrderItems/ShippingAddress/County">
<xsl:attribute name="country">
<xsl:value-of select="in7:submitSupplierOrder/inputParams/SupplierPartnerOrder/OrderItems/ShippingAddress/County"/>
</xsl:attribute>
</xsl:if>
<!-- a simple data mapping: "in7:submitSupplierOrder/inputParams/SupplierPartnerOrder/OrderItems/ShippingAddress/LineOne"(string) to "street"(string) -->
<street>
<xsl:value-of select="concat(in7:submitSupplierOrder/inputParams/SupplierPartnerOrder/OrderItems/ShippingAddress/LineOne, in7:submitSupplierOrder/inputParams/SupplierPartnerOrder/OrderItems/ShippingAddress/LineTwo, in7:submitSupplierOrder/inputParams/SupplierPartnerOrder/OrderItems/ShippingAddress/LineThree, in7:submitSupplierOrder/inputParams/SupplierPartnerOrder/OrderItems/ShippingAddress/Unit)"/>
</street>
<!-- a simple data mapping: "in7:submitSupplierOrder/inputParams/SupplierPartnerOrder/OrderItems/ShippingAddress/City"(string) to "city"(string) -->
<city>
<xsl:value-of select="in7:submitSupplierOrder/inputParams/SupplierPartnerOrder/OrderItems/ShippingAddress/City"/>
</city>
<!-- a simple data mapping: "in7:submitSupplierOrder/inputParams/SupplierPartnerOrder/OrderItems/ShippingAddress/StateOrProvince"(string) to "state"(string) -->
<state>
<xsl:value-of select="in7:submitSupplierOrder/inputParams/SupplierPartnerOrder/OrderItems/ShippingAddress/StateOrProvince"/>
</state>
<!-- a simple data mapping: "in7:submitSupplierOrder/inputParams/SupplierPartnerOrder/OrderItems/ShippingAddress/PostalCode"(string) to "zip"(decimal) -->
<zip>
<xsl:value-of select="in7:submitSupplierOrder/inputParams/SupplierPartnerOrder/OrderItems/ShippingAddress/PostalCode"/>
</zip>
</shipTo>
<!-- a simple data mapping: "in7:submitSupplierOrder/inputParams/SupplierPartnerOrder/OrderItems/Notes"(string) to "comment"(string) -->
<xsl:if test="in7:submitSupplierOrder/inputParams/SupplierPartnerOrder/OrderItems/Notes">
<comment>
<xsl:value-of select="in7:submitSupplierOrder/inputParams/SupplierPartnerOrder/OrderItems/Notes"/>
</comment>
</xsl:if>
<items>
<item>
<!-- a simple data mapping: "in7:submitSupplierOrder/inputParams/SupplierPartnerOrder/OrderItems/PurchasedItem/SKU"(string) to "partNum"(SKU) -->
<xsl:attribute name="partNum">
<xsl:value-of select="in7:submitSupplierOrder/inputParams/SupplierPartnerOrder/OrderItems/PurchasedItem/SKU"/>
</xsl:attribute>
<!-- a simple data mapping: "in7:submitSupplierOrder/inputParams/SupplierPartnerOrder/OrderItems/PurchasedItem/ProductDetails/ItemName"(string) to "productName"(string) -->
<productName>
<xsl:value-of select="in7:submitSupplierOrder/inputParams/SupplierPartnerOrder/OrderItems/PurchasedItem/ProductDetails/ItemName"/>
</productName>
<!-- a simple data mapping: "in7:submitSupplierOrder/inputParams/SupplierPartnerOrder/OrderItems/PurchasedItem/ProductDetails/ItemQuantity"(int) to "quantity"(<positiveInteger>) -->
<quantity>
<xsl:value-of select="in7:submitSupplierOrder/inputParams/SupplierPartnerOrder/OrderItems/PurchasedItem/ProductDetails/ItemQuantity"/>
</quantity>
<!-- a simple data mapping: "in7:submitSupplierOrder/inputParams/SupplierPartnerOrder/OrderItems/PurchasedItem/ProductDetails/ItemUnitPrice"(double) to "USPrice"(decimal) -->
<USPrice>
<xsl:value-of select="in7:submitSupplierOrder/inputParams/SupplierPartnerOrder/OrderItems/PurchasedItem/ProductDetails/ItemUnitPrice"/>
</USPrice>
<!-- a simple data mapping: "in7:submitSupplierOrder/inputParams/SupplierPartnerOrder/OrderItems/ShippingDate"(date) to "shipDate"(date) -->
<xsl:if test="in7:submitSupplierOrder/inputParams/SupplierPartnerOrder/OrderItems/ShippingDate">
<shipDate>
<xsl:value-of select="in7:submitSupplierOrder/inputParams/SupplierPartnerOrder/OrderItems/ShippingDate"/>
</shipDate>
</xsl:if>
</item>
</items>
</purchaseOrder>
</out:processOrder>
</body>
</xsl:template>
<!-- ***************** Utility Templates ****************** -->
<!-- copy the namespace declarations from the source to the target -->
<xsl:template name="copyNamespaceDeclarations">
<xsl:param name="root"/>
<xsl:for-each select="$root/namespace::*">
<xsl:copy/>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
| 69.78125 | 417 | 0.685401 |
0c4fb504cfb58e3e19573284a73fdd52fcd6d4d9 | 5,199 | xsl | XSLT | lib/dblatex-0.3.2/xsl/equation.xsl | jonathanmorley/HR-XSL | 799b1075cbec4cda3d686d588eea92a62d59963f | [
"Apache-2.0"
] | 1 | 2017-12-29T23:23:14.000Z | 2017-12-29T23:23:14.000Z | lib/dblatex-0.3.2/xsl/equation.xsl | jonathanmorley/HR-XSL | 799b1075cbec4cda3d686d588eea92a62d59963f | [
"Apache-2.0"
] | null | null | null | lib/dblatex-0.3.2/xsl/equation.xsl | jonathanmorley/HR-XSL | 799b1075cbec4cda3d686d588eea92a62d59963f | [
"Apache-2.0"
] | null | null | null | <?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'>
<!--############################################################################
XSLT Stylesheet DocBook -> LaTeX
############################################################################ -->
<xsl:param name="tex.math.in.alt" select="'latex'"/>
<xsl:param name="alt.use" select="0"/>
<xsl:param name="equation.default.position">[H]</xsl:param>
<xsl:template match="inlineequation|informalequation" name="equation">
<xsl:choose>
<xsl:when test="alt and $tex.math.in.alt='latex'">
<xsl:apply-templates select="alt" mode="latex"/>
</xsl:when>
<xsl:when test="alt and (count(child::*)=1 or $alt.use='1')">
<!-- alt is simply some text -->
<xsl:apply-templates select="alt"/>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="*[not(self::alt)]"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="equation">
<xsl:variable name="delim">
<xsl:if test="descendant::alt/processing-instruction('texmath')">
<xsl:call-template name="pi-attribute">
<xsl:with-param name="pis"
select="descendant::alt/processing-instruction('texmath')"/>
<xsl:with-param name="attribute" select="'delimiters'"/>
</xsl:call-template>
</xsl:if>
</xsl:variable>
<xsl:choose>
<xsl:when test="title">
<xsl:text> \begin{dbequation}</xsl:text>
<!-- float placement preference -->
<xsl:choose>
<xsl:when test="@floatstyle != ''">
<xsl:value-of select="@floatstyle"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$equation.default.position"/>
</xsl:otherwise>
</xsl:choose>
<xsl:text> </xsl:text>
<xsl:call-template name="equation"/>
<xsl:text> \caption{</xsl:text>
<xsl:call-template name="normalize-scape">
<xsl:with-param name="string" select="title"/>
</xsl:call-template>
<xsl:text>} </xsl:text>
<xsl:call-template name="label.id"/>
<xsl:text> \end{dbequation} </xsl:text>
</xsl:when>
<xsl:when test="$delim='user'">
<!-- The user provide its own environment -->
<xsl:call-template name="equation"/>
</xsl:when>
<xsl:otherwise>
<!-- This is an actual LaTeX equation -->
<xsl:text> \begin{equation} </xsl:text>
<xsl:call-template name="label.id"/>
<xsl:call-template name="equation"/>
<xsl:text> \end{equation} </xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="alt|mathphrase">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="equation/title"/>
<!-- Direct copy of the content -->
<xsl:template match="alt" mode="latex">
<xsl:variable name="delim">
<xsl:if test="processing-instruction('texmath')">
<xsl:call-template name="pi-attribute">
<xsl:with-param name="pis"
select="processing-instruction('texmath')"/>
<xsl:with-param name="attribute" select="'delimiters'"/>
</xsl:call-template>
</xsl:if>
</xsl:variable>
<xsl:variable name="tex">
<xsl:variable name="text" select="normalize-space(.)"/>
<xsl:variable name="len" select="string-length($text)"/>
<xsl:choose>
<xsl:when test="$delim='user'">
<xsl:copy-of select="."/>
</xsl:when>
<xsl:when test="ancestor::equation[not(child::title)]">
<!-- Remove any math mode in an equation environment -->
<xsl:choose>
<xsl:when test="starts-with($text,'$') and
substring($text,$len,$len)='$'">
<xsl:copy-of select="substring($text, 2, $len - 2)"/>
</xsl:when>
<xsl:when test="(starts-with($text,'\[') and
substring($text,$len - 1,$len)='\]') or
(starts-with($text,'\(') and
substring($text,$len - 1,$len)='\)')">
<xsl:copy-of select="substring($text, 3, $len - 4)"/>
</xsl:when>
<xsl:otherwise>
<xsl:copy-of select="."/>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<!-- Test to be DB5 compatible, where <alt> can be in other elements -->
<xsl:when test="ancestor::equation or
ancestor::informalequation or
ancestor::inlineequation">
<!-- Keep the specified math mode... -->
<xsl:choose>
<xsl:when test="(starts-with($text,'\[') and
substring($text,$len - 1,$len)='\]') or
(starts-with($text,'\(') and
substring($text,$len - 1,$len)='\)') or
(starts-with($text,'$') and
substring($text,$len,$len)='$')">
<xsl:copy-of select="$text"/>
</xsl:when>
<!-- ...Or wrap in default math mode -->
<xsl:otherwise>
<xsl:copy-of select="concat('$', $text, '$')"/>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise/>
</xsl:choose>
</xsl:variable>
<!-- Encode it properly -->
<xsl:call-template name="scape-encode">
<xsl:with-param name="string" select="$tex"/>
</xsl:call-template>
</xsl:template>
</xsl:stylesheet>
| 34.892617 | 84 | 0.554337 |
c254a97296c4488baa44aec8e8d3992e6548f9f1 | 4,430 | xslt | XSLT | windows/src/engine/tsysinfo/si_overview.xslt | srl295/keyman | 4dfd0f71f3f4ccf81d1badbd824900deee1bb6d1 | [
"MIT"
] | 219 | 2017-06-21T03:37:03.000Z | 2022-03-27T12:09:28.000Z | windows/src/engine/tsysinfo/si_overview.xslt | srl295/keyman | 4dfd0f71f3f4ccf81d1badbd824900deee1bb6d1 | [
"MIT"
] | 4,451 | 2017-05-29T02:52:06.000Z | 2022-03-31T23:53:23.000Z | windows/src/engine/tsysinfo/si_overview.xslt | srl295/keyman | 4dfd0f71f3f4ccf81d1badbd824900deee1bb6d1 | [
"MIT"
] | 72 | 2017-05-26T04:08:37.000Z | 2022-03-03T10:26:20.000Z | <?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:import href="base.xslt" />
<xsl:output method="html" encoding="utf-16" />
<xsl:template match="/">
<html>
<xsl:call-template name="head" />
<body>
<xsl:apply-templates select="/KeymanDiagnosticRecord/Overview/WindowsVersion" />
<xsl:apply-templates select="/KeymanDiagnosticRecord/Overview/DiskSpace"/>
<xsl:apply-templates select="/KeymanDiagnosticRecord/Overview/Memory"/>
</body>
</html>
</xsl:template>
<xsl:template match="DiskSpace">
<h1>Disk Information</h1>
<table>
<thead>
<tr>
<th>Drive</th>
<th>Total Size</th>
<th>Free Space</th>
</tr>
</thead>
<tbody>
<xsl:apply-templates select="HardDrive" />
</tbody>
</table>
</xsl:template>
<xsl:template match="HardDrive">
<tr>
<td><xsl:value-of select="@Drive"/></td>
<td><xsl:value-of select="@TotalSpace"/></td>
<td><xsl:value-of select="@TotalFreeSpace"/></td>
</tr>
</xsl:template>
<xsl:template match="Memory">
<h1>Memory Information</h1>
<table>
<thead>
<tr>
<th rowspan="2">Memory Load</th>
<th colspan="2">Physical</th>
<th colspan="2">Page File</th>
<th colspan="2">Virtual</th>
</tr>
<tr>
<th>Total</th>
<th>Free</th>
<th>Total</th>
<th>Free</th>
<th>Total</th>
<th>Free</th>
</tr>
</thead>
<tbody>
<tr>
<td><xsl:value-of select="MemoryLoad"/></td>
<td><xsl:value-of select="TotalPhysical"/></td>
<td><xsl:value-of select="FreePhysical"/></td>
<td><xsl:value-of select="TotalPageFile"/></td>
<td><xsl:value-of select="FreePageFile"/></td>
<td><xsl:value-of select="TotalVirtual"/></td>
<td><xsl:value-of select="FreeVirtual"/></td>
</tr>
</tbody>
</table>
</xsl:template>
<xsl:template match="/KeymanDiagnosticRecord/Overview/WindowsVersion">
<h1>Windows Version</h1>
<table>
<tbody>
<tr>
<th>OS Name</th>
<td>
<xsl:choose>
<xsl:when test="contains(., 'Server')">
<xsl:choose>
<xsl:when test="@MajorVersion = '5' and @MinorVersion = '0'">Windows 2000 Server</xsl:when>
<xsl:when test="@MajorVersion = '5' and @MinorVersion = '2'">Windows Server 2003</xsl:when>
<xsl:when test="@MajorVersion = '6' and @MinorVersion = '0'">Windows Server 2008</xsl:when>
<xsl:when test="@MajorVersion = '6' and @MinorVersion = '1'">Windows Server 2008 R2</xsl:when>
<xsl:otherwise>
Unknown Server (<xsl:value-of select="."/>)
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="@MajorVersion = '5' and @MinorVersion = '0'">Windows 2000</xsl:when>
<xsl:when test="@MajorVersion = '5' and @MinorVersion = '1'">Windows XP</xsl:when>
<xsl:when test="@MajorVersion = '5' and @MinorVersion = '2'">Windows XP x64</xsl:when>
<xsl:when test="@MajorVersion = '6' and @MinorVersion = '0'">Windows Vista</xsl:when>
<xsl:when test="@MajorVersion = '6' and @MinorVersion = '1'">Windows 7</xsl:when>
<xsl:otherwise>
Unknown Client (<xsl:value-of select="."/>)
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</td>
</tr>
<tr>
<th>Service Pack</th>
<td>
<xsl:value-of select="@CSDVersion"/>
</td>
</tr>
<tr>
<th>Version Number</th>
<td>
<xsl:value-of select="@MajorVersion"/>.<xsl:value-of select="@MinorVersion"/>.<xsl:value-of select="@BuildNumber"/>
</td>
</tr>
<tr>
<th>x64 Edition?</th>
<td>
<xsl:value-of select="@x64"/>
</td>
</tr>
</tbody>
</table>
</xsl:template>
</xsl:stylesheet>
| 32.573529 | 127 | 0.502032 |
50684d2a8255f7a9ec577db3b93d5179905a1a62 | 3,312 | xsl | XSLT | java/tools/org/apache/derby/impl/tools/planexporter/resources/vanilla_html.xsl | sunsiyue/ACMEDB_MAIN | 3af9ba5d2a33660b147db865ce34a88fe15d7e0d | [
"Apache-2.0"
] | 282 | 2015-01-06T02:30:11.000Z | 2022-03-23T06:40:17.000Z | java/org.apache.derby.tools/org/apache/derby/impl/tools/planexporter/resources/vanilla_html.xsl | 7k8m/derby | 4253dcf4aa37dc64cf7235d494cd2f00f72e678a | [
"Apache-2.0"
] | 261 | 2016-01-07T09:14:26.000Z | 2019-12-05T10:15:56.000Z | java/org.apache.derby.tools/org/apache/derby/impl/tools/planexporter/resources/vanilla_html.xsl | 7k8m/derby | 4253dcf4aa37dc64cf7235d494cd2f00f72e678a | [
"Apache-2.0"
] | 163 | 2015-01-07T00:07:53.000Z | 2022-03-07T08:35:03.000Z | <!--
Derby - Class vanilla_html
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="html" indent="yes"
doctype-public="-//W3C//DTD HTML 4.01//EN"
doctype-system="http://www.w3.org/TR/html4/strict.dtd"/>
<xsl:output method="html" indent="yes"/>
<xsl:template match="/">
<html>
<head>
<title>Derby Graphical Query Explainer</title>
</head>
<body>
<IMG SRC="derby-logo.png" ALIGN="left"/>
<center><H1>Apache Derby</H1></center>
<center><H1>Graphical Query Explainer</H1></center>
<center><H2>Executed Date & Time: <font color="#4E9258"> <xsl:value-of select="//time"/> </font></H2></center>
<center><H2>Query: <font color="#4E9258"> <xsl:value-of select="//statement"/> </font></H2></center>
<center><H2>STMT_ID: <font color="#4E9258"> <xsl:value-of select="//stmt_id"/> </font></H2></center>
<xsl:apply-templates select="plan/details/node"/>
</body>
</html>
</xsl:template>
<xsl:template match="node">
<ul>
<br/>
<h3><font face="verdana" color="#E56717"><xsl:value-of select="@name"/></font></h3>
<table frame="border" rules="all">
<xsl:if test="count(@input_rows)!=0">
<tr>
<xsl:apply-templates select="@input_rows"/>
</tr>
</xsl:if>
<tr>
<xsl:apply-templates select="@returned_rows"/>
</tr>
<tr>
<xsl:apply-templates select="@no_opens"/>
</tr>
<tr>
<xsl:apply-templates select="@visited_pages"/>
</tr>
<tr>
<xsl:apply-templates select="@scan_qualifiers"/>
</tr>
<tr>
<xsl:apply-templates select="@next_qualifiers"/>
</tr>
<tr>
<xsl:apply-templates select="@scanned_object"/>
</tr>
<tr>
<xsl:apply-templates select="@scan_type"/>
</tr>
<tr>
<xsl:apply-templates select="@sort_type"/>
</tr>
<tr>
<xsl:apply-templates select="@sorter_output"/>
</tr>
</table>
<xsl:apply-templates select="node"/>
</ul>
</xsl:template>
<xsl:template match="node/@*">
<th align="left">
<xsl:value-of select="name()"/>
</th>
<td>
<xsl:value-of select="."/>
</td>
</xsl:template>
</xsl:stylesheet>
| 33.12 | 122 | 0.57337 |
7891f116bf6050c7350307ae9cf050db4a6a0e27 | 6,372 | xsl | XSLT | src/xslt/spl_xslt/measurement.xsl | lottie-c/spl_tests_new | 7a63fdf080094210e2f09c3b94b49408637845de | [
"BSD-3-Clause"
] | 1 | 2020-02-08T19:18:50.000Z | 2020-02-08T19:18:50.000Z | src/xslt/spl_xslt/measurement.xsl | lottie-c/spl_tests_new | 7a63fdf080094210e2f09c3b94b49408637845de | [
"BSD-3-Clause"
] | null | null | null | src/xslt/spl_xslt/measurement.xsl | lottie-c/spl_tests_new | 7a63fdf080094210e2f09c3b94b49408637845de | [
"BSD-3-Clause"
] | null | null | null | <?xml version="1.0"?>
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:spl="http://sourceforge.net/projects/spl-tools/">
<xsl:template match="measurement-result-descriptor">
<xsl:variable name="shortName">
<xsl:call-template name="PRINTER.measurement.short">
<xsl:with-param name="MEASUREMENT"
select="/*/info/measurements/measurement[@msid = /*/measurement-sample/@msref]" />
<xsl:with-param name="VERY_SHORT" select="true()" />
</xsl:call-template>
</xsl:variable>
<xsl:call-template name="SPL.page.template">
<xsl:with-param name="TITLE"
select="concat($shortName, ' | Measurement detail | SPL Results Overview')" />
<xsl:with-param name="HEADING" select="'Measurement detail'" />
<xsl:with-param name="BODY_CLASS" select="'measurement-page'" />
<xsl:with-param name="BODY">
<xsl:call-template name="SPL.page.measurement.detail" />
</xsl:with-param>
</xsl:call-template>
</xsl:template>
<xsl:template name="SPL.page.measurement.detail">
<xsl:variable name="measurementSample" select="measurement-sample" />
<xsl:variable name="measurement"
select="/*/info/measurements/measurement[@msid = $measurementSample/@msref]" />
<xsl:variable name="validationFlags" select="validation-flags" />
<xsl:call-template name="PRINTER.measurementsample.info">
<xsl:with-param name="MEASUREMENTSAMPLE" select="$measurementSample" />
<xsl:with-param name="FULL" select="true()" />
</xsl:call-template>
<xsl:if test="$measurement/measurement-state/@ok != 'true'">
<h2 class="error">Problem with measurement occured</h2>
<table class="measurement-error">
<xsl:call-template name="PRINTER.tableRow">
<xsl:with-param name="KEY" select="'Last processed phase'" />
<xsl:with-param name="VALUE"
select="$measurement/measurement-state/@last-phase" />
</xsl:call-template>
<xsl:call-template name="PRINTER.tableRow">
<xsl:with-param name="KEY" select="'Message'" />
<xsl:with-param name="VALUE"
select="$measurement/measurement-state/message" />
</xsl:call-template>
</table>
<p>
<xsl:call-template name="LINKER.seeLog" />
</p>
</xsl:if>
<xsl:if
test="$measurement/measurement-state/@ok = 'true' or $measurement/measurement-state/@last-phase = 'EVALUATE'">
<h2>Statistical data</h2>
<table class="measurement-statistical-data statistical-data">
<xsl:call-template name="PRINTER.tableRow">
<xsl:with-param name="KEY" select="'Sample count'" />
<xsl:with-param name="VALUE"
select="$measurementSample/sampleStatistics/@sampleCount" />
<xsl:with-param name="VALID"
select="$validationFlags/@sample-count-ok" />
</xsl:call-template>
<xsl:call-template name="PRINTER.tableRow">
<xsl:with-param name="KEY" select="'Warmup count'" />
<xsl:with-param name="VALUE"
select="$measurementSample/sampleStatistics/@warmupCount" />
</xsl:call-template>
<xsl:call-template name="PRINTER.tableRow">
<xsl:with-param name="KEY" select="'Mean'" />
<xsl:with-param name="VALUE">
<xsl:call-template name="PRINTER.format.ns">
<xsl:with-param name="VALUE"
select="$measurementSample/sampleStatistics/@mean" />
</xsl:call-template>
</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="PRINTER.tableRow">
<xsl:with-param name="KEY" select="'Standard deviation'" />
<xsl:with-param name="VALUE">
<xsl:call-template name="PRINTER.format.ns">
<xsl:with-param name="VALUE"
select="$measurementSample/sampleStatistics/@standardDeviation" />
</xsl:call-template>
</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="PRINTER.tableRow">
<xsl:with-param name="KEY" select="'Standard deviation / mean'" />
<xsl:with-param name="VALUE">
<xsl:call-template name="PRINTER.format.percent">
<xsl:with-param name="VALUE"
select="$validationFlags/@std-vs-mean" />
</xsl:call-template>
</xsl:with-param>
<xsl:with-param name="VALID"
select="$validationFlags/@std-vs-mean-ok" />
</xsl:call-template>
<xsl:call-template name="PRINTER.tableRow">
<xsl:with-param name="KEY" select="'Median'" />
<xsl:with-param name="VALUE">
<xsl:call-template name="PRINTER.format.ns">
<xsl:with-param name="VALUE"
select="$measurementSample/sampleStatistics/@median" />
</xsl:call-template>
</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="PRINTER.tableRow">
<xsl:with-param name="KEY" select="'Median / mean'" />
<xsl:with-param name="VALUE">
<xsl:call-template name="PRINTER.format.percent">
<xsl:with-param name="VALUE"
select="$validationFlags/@median-vs-mean" />
</xsl:call-template>
</xsl:with-param>
<xsl:with-param name="VALID"
select="$validationFlags/@median-vs-mean-ok" />
</xsl:call-template>
<xsl:call-template name="PRINTER.tableRow">
<xsl:with-param name="KEY" select="'Minimum'" />
<xsl:with-param name="VALUE">
<xsl:call-template name="PRINTER.format.ns">
<xsl:with-param name="VALUE"
select="$measurementSample/sampleStatistics/@minimum" />
</xsl:call-template>
</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="PRINTER.tableRow">
<xsl:with-param name="KEY" select="'Maximum'" />
<xsl:with-param name="VALUE">
<xsl:call-template name="PRINTER.format.ns">
<xsl:with-param name="VALUE"
select="$measurementSample/sampleStatistics/@maximum" />
</xsl:call-template>
</xsl:with-param>
</xsl:call-template>
</table>
</xsl:if>
<xsl:call-template name="PRINTER.graphs">
<xsl:with-param name="GRAPHS" select="graphs/graph" />
</xsl:call-template>
<h2>Links to comparisons with this measurement</h2>
<xsl:variable name="comparisons"
select="/*/info/annotation-locations/annotation-location/formula-declaration//comparison[*/@msref = $measurement/@msid]" />
<ul>
<xsl:for-each select="$comparisons">
<xsl:call-template name="PRINTER.comparison.list">
<xsl:with-param name="COMPARISON" select="." />
</xsl:call-template>
</xsl:for-each>
</ul>
</xsl:template>
</xsl:stylesheet> | 38.618182 | 126 | 0.658977 |
e6d876eb887d60b65fbd7f75c3422db1be38e72d | 12,251 | xsl | XSLT | mef/Stylesheets/2013/IRS8932.xsl | Nonprofit-Open-Data-Collective/irs-efile-viewer | 1c7da8db0a86ca61048325182b79bf6b41cd9785 | [
"MIT"
] | 45 | 2017-06-23T17:21:45.000Z | 2022-02-07T04:25:17.000Z | mef/Stylesheets/2013/IRS8932.xsl | jamesdunham/irs-efile-viewer | 0d4533b83fd4ae353dede4e41bdb12935b914088 | [
"MIT"
] | 2 | 2018-03-03T00:29:57.000Z | 2019-08-19T07:36:11.000Z | mef/Stylesheets/2013/IRS8932.xsl | jamesdunham/irs-efile-viewer | 0d4533b83fd4ae353dede4e41bdb12935b914088 | [
"MIT"
] | 13 | 2017-06-23T17:21:58.000Z | 2021-08-13T01:51:49.000Z | <?xml version="1.0"?>
<!DOCTYPE xsl:stylesheet [
<!ENTITY nbsp " ">
]>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:include href="PopulateTemplate.xsl"/>
<xsl:include href="CommonPathRef.xsl"/>
<xsl:include href="AddHeader.xsl"/>
<xsl:include href="AddOnTable.xsl"/>
<xsl:include href="IRS8932Style.xsl"/>
<xsl:output method="html" indent="yes" encoding="iso-8859-1"/>
<xsl:strip-space elements="*"/>
<xsl:param name="FormData" select="$RtnDoc/IRS8932"/>
<xsl:template match="/">
<!-- 6/14/2011 RLW-->
<xsl:text disable-output-escaping="yes"><!DOCTYPE html></xsl:text>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<title>
<xsl:call-template name="FormTitle">
<xsl:with-param name="RootElement" select="local-name($FormData)"/>
</xsl:call-template>
</title>
<!-- No Browser Caching -->
<meta http-equiv="Pragma" content="no-cache"/>
<meta http-equiv="Cache-Control" content="no-cache"/>
<meta http-equiv="Expires" content="0"/>
<!-- No Proxy Caching -->
<meta http-equiv="Cache-Control" content="private"/>
<meta name="Description" content="Form IRS 8932"/>
<meta name="GENERATOR" content="IBM WebSphere Studio"/>
<xsl:call-template name="GlobalStylesForm"/>
<script language="JavaScript" src="{$ScriptPath}/FormDisplay.js" type="text/javascript"/>
<xsl:call-template name="InitJS"/>
<style type="text/css">
<!-- Updated 10/03/2014 WT: Per Final PDF Package 3 Review for R9.5_D4 -->
<xsl:if test="not($Print) or $Print=''">
<xsl:call-template name="IRS8932Style"/>
<xsl:call-template name="AddOnStyle"/>
</xsl:if>
</style>
</head>
<body class="styBodyClass">
<form name="Form8932">
<xsl:call-template name="DocumentHeader"/>
<!--Title of Form -->
<div class="styBB" style="width:187mm;height: 22mm">
<div class="styFNBox" style="padding-top: 1mm;width:31mm;font-size: 7pt;height: 22.1mm">
Form <span class="styFormNumber">8932</span>
<br/>
<!--General Dependency Push Pin -->
<xsl:call-template name="SetFormLinkInline">
<xsl:with-param name="TargetNode" select="$FormData"/>
</xsl:call-template>
<div class="styAgency" style="padding-top: 1mm">(Rev. December 2012)</div>
<div class="styAgency" style="padding-top: 1mm">Department of the Treasury<br/>Internal Revenue Service</div>
</div>
<div class="styFTBox" style="padding-top: 4mm; width:125mm">
<div class="styMainTitle">Credit for Employer Differential Wage Payments</div>
<div class="styFST" style="height:5mm;font-size:7pt;margin-left:3mm;font-weight:bold">
<br/>
<img src="{$ImagePath}/8932_Bullet.gif" alt="MediumBullet"/> Attach to your tax return.
<br />
<img src="{$ImagePath}/8932_Bullet.gif" alt="MediumBullet"/> Information about Form 8932 and its instructions is available at
<a style="text-decoration:none;color:black;" href="http://www.irs.gov/form8932" title="Link to IRS.gov">
<i>www.irs.gov/form8932</i>.
</a>
</div>
</div>
<div class="styTYBox" style="width:30mm;height:22.2mm; border-left-width: 1px">
<div class="styOMB" style="height:8mm;padding-top:2mm">OMB No. 1545-2126</div>
<div class="stySequence" style="padding-top:7mm">Attachment<br/>Sequence No. <b>161</b>
</div>
</div>
</div>
<!-- End title of Form -->
<!-- Begin Populate Name and Employer identification number -->
<div class="styBB" style="width:187mm">
<div class="styNameBox" style="width:147.3mm;font-weight:normal;font-size:7pt;;">
Name(s) shown on return
<br/>
<div style="font-family:verdana;font-size:7pt;">
<xsl:choose>
<xsl:when test="$RtnHdrData/ReturnTypeCd='1040'">
<br/>
<xsl:call-template name="PopulateReturnHeaderFiler">
<xsl:with-param name="TargetNode">Name</xsl:with-param>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="PopulateReturnHeaderFiler">
<xsl:with-param name="TargetNode">BusinessNameLine1Txt</xsl:with-param>
</xsl:call-template>
<br/>
<xsl:call-template name="PopulateReturnHeaderFiler">
<xsl:with-param name="TargetNode">BusinessNameLine2Txt</xsl:with-param>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</div>
</div>
<div class="styEINBox" style="width:39.7mm;padding-left:2mm;font-size:7pt;">
<span class="BoldText">Identifying number</span>
<div class="styNormalText" style="text-align:left; padding-top:3mm;">
<xsl:choose>
<xsl:when test="$RtnHdrData/ReturnTypeCd='1040'">
<xsl:call-template name="PopulateReturnHeaderFiler">
<xsl:with-param name="TargetNode">PrimarySSN</xsl:with-param>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="PopulateReturnHeaderFiler">
<xsl:with-param name="TargetNode">EIN</xsl:with-param>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</div>
</div>
</div>
<!-- End Populate Name and Employer indentification number -->
<!-- L1 -->
<div style="width: 187mm">
<div style="float:left;clear:none;">
<div class="styLNLeftNumBoxSD">1</div>
<div class="styLNDesc" style="width:139mm;">
<span style="float:left;">Eligible differential wage payments paid during the tax year (see instructions)</span>
<!--Dotted Line-->
<div class="styDotLn" style="float:right;padding-right:1mm;">.........</div>
</div>
</div>
<div style="float:right;clear:none;">
<div class="styLNRightNumBox">1</div>
<div class="styLNAmountBox">
<xsl:call-template name="PopulateAmount">
<xsl:with-param name="TargetNode" select="$FormData/DifferentialWagePaymentEligAmt"/>
</xsl:call-template>
</div>
</div>
</div>
<!-- L1 -->
<!-- L2 -->
<div style="width: 187mm">
<div style="float:left;clear:none;">
<div class="styLNLeftNumBoxSD">2</div>
<div class="styLNDesc" style="width:139mm">
<span style="float:left;">Multiply line 1 by 20% (.20) (see instructions for the adjustment you must make)
<!-- Form to Form Link (Push Pin)-->
<xsl:call-template name="SetFormLinkInline">
<xsl:with-param name="TargetNode" select="$FormData/CurrentYearCredit"/>
</xsl:call-template>
</span>
<!--Dotted Line-->
<div class="styDotLn" style="float:right;padding-right:1mm;">........</div>
</div>
</div>
<div style="float:right;clear:none;">
<div class="styLNRightNumBox">2</div>
<div class="styLNAmountBox">
<xsl:call-template name="PopulateAmount">
<xsl:with-param name="TargetNode" select="$FormData/DifferentialWagePaymentAdjAmt"/>
</xsl:call-template>
</div>
</div>
</div>
<!-- L2 -->
<!-- L3 -->
<div style="width: 187mm">
<div style="float:left;clear:none;">
<div class="styLNLeftNumBoxSD">3</div>
<div class="styLNDesc" style="width:139mm;">
Credit for employer differential wage payments from partnerships, S corporations, cooperatives, estates,
<span style="float:left;">and trusts (see instructions)</span>
<!--Dotted Line-->
<div class="styDotLn" style="float:right;padding-right:1mm;">.........................</div>
</div>
</div>
<div style="float:right;clear:none;">
<div class="styLNRightNumBox" style="height:8mm;padding-top:4mm">3</div>
<div class="styLNAmountBox" style="height:8mm;padding-top:4mm">
<xsl:call-template name="PopulateAmount">
<xsl:with-param name="TargetNode" select="$FormData/DifferentialWagePaymentCrAmt"/>
</xsl:call-template>
</div>
</div>
</div>
<!-- L3 -->
<!-- L4 -->
<div style="width: 187mm">
<div style="float:left;clear:none;">
<div class="styLNLeftNumBoxSD" style="height:8mm;">4</div>
<div class="styLNDesc" style="width:139mm;height:8mm; ">
Add lines 2 and 3. Cooperatives, estates, and trusts go to line 5; partnerships and S corporations, report
<span style="float:left;">this amount on Schedule K; all others, report this amount on Form 3800, line 1w</span>
<!--Dotted Line-->
<div class="styDotLn" style="float:right;padding-right:1mm;">........</div>
</div>
</div>
<div style="float:right;clear;none;">
<div class="styLNRightNumBox" style="height:8mm; padding-top:4mm; border-bottom-width:1px">4</div>
<div class="styLNAmountBox" style="height:8mm; padding-top:4mm; border-bottom-width:1px">
<xsl:call-template name="PopulateAmount">
<xsl:with-param name="TargetNode" select="$FormData/DifferentialWagePaymentNetAmt"/>
</xsl:call-template>
</div>
</div>
</div>
<!-- L4 -->
<!-- L5 -->
<div style="width: 187mm">
<div style="float:left;clear:none;">
<div class="styLNLeftNumBoxSD">5</div>
<div class="styLNDesc" style="width:139mm">
<span style="float:left;">Amount allocated to patrons of the cooperative or beneficiaries of the estate or trust (see instructions) </span>
</div>
</div>
<div style="float:right;clear;none;">
<div class="styLNRightNumBox">5</div>
<div class="styLNAmountBox">
<xsl:call-template name="PopulateAmount">
<xsl:with-param name="TargetNode" select="$FormData/DifferentialWagePymtAllocnAmt"/>
</xsl:call-template>
</div>
</div>
</div>
<!-- L5 -->
<!-- L6 -->
<div class="styBB" style="width: 187mm">
<div style="float:left;clear:none;">
<div class="styLNLeftNumBoxSD">6</div>
<div class="styLNDesc" style="width:139mm; ">
<b>Cooperative, estates, and trusts.</b> Subtract line 5 from line 4. Report this amount on Form 3800, line 1w
</div>
</div>
<div style="float:right;clear;none;">
<div class="styLNRightNumBox" style="border-bottom-width:0px">6</div>
<div class="styLNAmountBox" style="border-bottom-width:0px">
<xsl:call-template name="PopulateAmount">
<xsl:with-param name="TargetNode" select="$FormData/DifferentialWgPymtCoopEstsAmt"/>
</xsl:call-template>
</div>
</div>
</div>
<!-- L6 -->
<div style="width:187mm;">
<span class="styBoldText">For Paperwork Reduction Act Notice, see instructions. </span>
<span style="width:90px;"/>
Cat. No. 37747W
<span style="width:105px;"/>
Form <span class="styBoldText">8932</span> (Rev. 12-2012)
</div>
<br/>
<p class="pageEnd"/>
<!-- BEGIN Left Over Table -->
<!-- Additonal Data Title Bar and Button -->
<div class="styLeftOverTitleLine" id="LeftoverData">
<div class="styLeftOverTitle">
Additional Data
</div>
<div class="styLeftOverButtonContainer">
<input class="styLeftoverTableBtn" TabIndex="1" type="button" value="Return to Form" onclick="javascript:returnToWriteInImage();"/>
</div>
</div>
<!-- Additional Data Table -->
<table class="styLeftOverTbl">
<xsl:call-template name="PopulateCommonLeftover">
<xsl:with-param name="TargetNode" select="$FormData"/>
<xsl:with-param name="DescWidth" select="100"/>
</xsl:call-template>
</table>
<!-- END Left Over Table -->
</form>
</body>
</html>
</xsl:template>
</xsl:stylesheet> | 44.387681 | 148 | 0.590482 |
bee0f0c0fa617b5eed16f0561dfc562e0cc99313 | 4,248 | xslt | XSLT | src/AutoCake.Build/Transforms/HtmlTransform-v2.xslt | moerwald/AutoCake | 528d457708aa278161f1af56870317821fc0d674 | [
"MIT"
] | 3 | 2017-04-05T19:58:29.000Z | 2019-08-04T17:05:49.000Z | src/AutoCake.Build/Transforms/HtmlTransform-v2.xslt | moerwald/AutoCake | 528d457708aa278161f1af56870317821fc0d674 | [
"MIT"
] | null | null | null | src/AutoCake.Build/Transforms/HtmlTransform-v2.xslt | moerwald/AutoCake | 528d457708aa278161f1af56870317821fc0d674 | [
"MIT"
] | 2 | 2019-07-17T18:20:15.000Z | 2019-09-07T17:42:04.000Z | <?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output omit-xml-declaration="yes" indent="yes" />
<xsl:template match="/">
<html>
<head>
<style type="text/css">
th {
background-color: #A0A0A0;
border-bottom: 1pt solid black;
padding: 0 4pt;
}
td {
border-bottom: 1pt solid black;
padding: 0 4pt;
}
</style>
</head>
<body>
<xsl:apply-templates />
</body>
</html>
</xsl:template>
<xsl:template match="test-results">
<h1>
<xsl:value-of select="@name" />
</h1>
<div>
NUnit Version: <xsl:value-of select="environment/@nunit-version" /> <br />
Date: <xsl:value-of select="@date" /> <br />
Time: <xsl:value-of select="@time" /> <br />
Runtime Environment: <xsl:value-of select="environment/@os-version" /> <br />
CLR Version: <xsl:value-of select="environment/@clr-version" /> <br />
</div>
<div>
<p>
Tests run: <xsl:value-of select="@total" />,
<xsl:choose>
<xsl:when test="substring(environment/@nunit-version,1,3)>='2.5'">
Errors: <xsl:value-of select="@errors" />,
Failures: <xsl:value-of select="@failures" />
<xsl:if test="@inconclusive">
<!-- Introduced in 2.5.1 -->
, Inconclusive: <xsl:value-of select="@inconclusive" />
</xsl:if>
</xsl:when>
<xsl:otherwise>
Failures: <xsl:value-of select="@failures" />,
Not run: <xsl:value-of select="@not-run" />
</xsl:otherwise>
</xsl:choose>
,
Time: <xsl:value-of select="test-suite/@time" /> seconds.
<xsl:if test="substring(environment/@nunit-version,1,3)>='2.5'">
(Not run: <xsl:value-of select="@not-run" />,
Invalid: <xsl:value-of select="@invalid" />,
Ignored: <xsl:value-of select="@ignored" />,
Skipped: <xsl:value-of select="@skipped" /> )
</xsl:if>
</p>
</div>
<xsl:if test="//test-case[failure]">
<h4>Failures:</h4>
<table>
<thead>
<th>Name</th>
<th>Result</th>
<th>Time</th>
<th>Asserts</th>
<th>Category</th>
<th>Properties</th>
</thead>
<tbody>
<xsl:apply-templates select="//test-case[failure]" />
</tbody>
</table>
<hr />
</xsl:if>
<xsl:if test="//test-case[@executed='False']">
<h4>Tests not run:</h4>
<table class="results">
<thead>
<th>Name</th>
<th>Result</th>
<th>Time</th>
<th>Asserts</th>
<th>Category</th>
<th>Properties</th>
</thead>
<tbody>
<xsl:apply-templates select="//test-case[@executed='False']" />
</tbody>
</table>
<hr />
</xsl:if>
<table>
<thead>
<th>Name</th>
<th>Result</th>
<th>Time</th>
<th>Asserts</th>
<th>Category</th>
<th>Properties</th>
</thead>
<tbody>
<xsl:apply-templates select="//test-case" />
</tbody>
</table>
</xsl:template>
<xsl:template match="test-case">
<tr>
<td>
<xsl:value-of select="@name" />
</td>
<td>
<xsl:value-of select="@result" />
</td>
<td>
<xsl:value-of select="@time" />
</td>
<td>
<xsl:value-of select="@asserts" />
</td>
<td>
<xsl:apply-templates select="categories/category" />
</td>
<td>
<xsl:apply-templates select="properties/property" />
</td>
</tr>
</xsl:template>
<xsl:template match="test-case//category">
<xsl:value-of select="@name" />
<xsl:if test="position() != last()">
<xsl:text>, </xsl:text>
</xsl:if>
</xsl:template>
<xsl:template match="test-case//property">
<xsl:value-of select="@name" />=<xsl:value-of select="@value" />
<xsl:if test="position() != last()">
<xsl:text>, </xsl:text>
</xsl:if>
</xsl:template>
</xsl:stylesheet> | 27.230769 | 83 | 0.493409 |
5eddc87c7ddc77e18c0eed0c6a6f0e6e4538b262 | 2,748 | xsl | XSLT | xslt/bpc/allMetsBPC.xsl | cdlib/dsc-mets-support | 5886c6c6e7b2b05ae0d76fcce891131a580d4fad | [
"BSD-3-Clause"
] | null | null | null | xslt/bpc/allMetsBPC.xsl | cdlib/dsc-mets-support | 5886c6c6e7b2b05ae0d76fcce891131a580d4fad | [
"BSD-3-Clause"
] | null | null | null | xslt/bpc/allMetsBPC.xsl | cdlib/dsc-mets-support | 5886c6c6e7b2b05ae0d76fcce891131a580d4fad | [
"BSD-3-Clause"
] | null | null | null | <?xml version="1.0" encoding="utf-8" standalone="yes"?>
<axsl:stylesheet xmlns:axsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sch="http://www.ascc.net/xml/schematron"
xmlns:mets="http://www.loc.gov/METS/" xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:mods="http://www.loc.gov/mods/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:xlink="http://www.w3.org/TR/xlink" xmlns:cdl="http://www.cdlib.org/schemas/xmldata" xmlns:dcterms="http://purl.org/dc/terms/" version="1.0" mets:dummy-for-xmlns=""
dc:dummy-for-xmlns="" rdf:dummy-for-xmlns="" xlink:dummy-for-xmlns="" exclude-result-prefixes="rdf sch xlink mets mods xsl cdl dc dcterms">
<axsl:output method="xml"/>
<xsl:template match="/">
<xsl:call-template name="errors"/>
</xsl:template>
<axsl:template name="errors">
<MetsBestPracticeErrors xsl:exclude-result-prefixes="mets xsl axsl sch mods dc rdf xlink">
<axsl:apply-templates select="/" mode="M5"/>
<axsl:apply-templates select="/" mode="M6"/>
</MetsBestPracticeErrors>
</axsl:template>
<axsl:template match="mets:mets" priority="4000" mode="M5">
<axsl:choose>
<axsl:when test="@OBJID or mets:metsHdr/mets:altRecordID"/>
<axsl:otherwise>
<xsl:element name="mets-001"/>
</axsl:otherwise>
</axsl:choose>
<axsl:choose>
<axsl:when test="@PROFILE"/>
<axsl:otherwise>
<xsl:element name="mets-030"/>
</axsl:otherwise>
</axsl:choose>
<axsl:apply-templates mode="M5"/>
</axsl:template>
<axsl:template match="text()" priority="-1" mode="M5"/>
<axsl:template match="mets:file" priority="4000" mode="M6">
<axsl:choose>
<axsl:when test="@ID"/>
<axsl:otherwise>
<xsl:element name="file-010"/>
</axsl:otherwise>
</axsl:choose>
<axsl:if test="@ID=''">
<xsl:element name="file-011"/>
</axsl:if>
<axsl:apply-templates mode="M6"/>
</axsl:template>
<axsl:template match="text()" priority="-1" mode="M6"/>
<axsl:template match="text()" priority="-1"/>
<axsl:template match="*|@*" mode="schematron-get-full-path">
<axsl:apply-templates select="parent::*" mode="schematron-get-full-path"/>
<axsl:text>/</axsl:text>
<axsl:if test="count(. | ../@*) = count(../@*)">@</axsl:if>
<axsl:value-of select="name()"/>
<axsl:text>[</axsl:text>
<axsl:value-of select="1+count(preceding-sibling::*[name()=name(current())])"/>
<axsl:text>]</axsl:text>
</axsl:template>
</axsl:stylesheet>
| 47.37931 | 173 | 0.588428 |
7c1699651d57e2fd1413da16f098c4e8ee60a80a | 2,077 | xsl | XSLT | src/main/resources/xslt/util/xsl/incorporation.xsl | BulotF/Eno | d994b7736ee61304391bb51dda41f9021bdf0915 | [
"MIT"
] | 17 | 2017-03-14T18:31:10.000Z | 2021-06-07T02:14:57.000Z | src/main/resources/xslt/util/xsl/incorporation.xsl | BulotF/Eno | d994b7736ee61304391bb51dda41f9021bdf0915 | [
"MIT"
] | 173 | 2016-08-10T09:22:24.000Z | 2022-03-29T02:04:23.000Z | src/main/resources/xslt/util/xsl/incorporation.xsl | MichaelC67/Eno | a672e710ca0d2de5547f89de12f495f802f32ce9 | [
"MIT"
] | 33 | 2016-08-19T09:49:06.000Z | 2021-12-06T13:51:01.000Z | <?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xd="http://www.oxygenxml.com/ns/doc/xsl">
<xd:doc scope="stylesheet">
<xd:desc>
<xd:p>This xsl stylesheet is used to copy a generated xsl stylesheet into an existing one.</xd:p>
</xd:desc>
</xd:doc>
<!-- The output file generated will be xml type -->
<xsl:output method="xml" indent="yes" encoding="UTF-8"/>
<xsl:strip-space elements="*"/>
<xd:doc>
<xd:desc>
<xd:p>The generated xsl stylesheet to be copied.</xd:p>
</xd:desc>
</xd:doc>
<xsl:param name="generated-file"/>
<xd:doc>
<xd:desc>
<xd:p>The generated xsl stylesheet is charged as a document.</xd:p>
</xd:desc>
</xd:doc>
<xsl:variable name="templates">
<xsl:copy-of select="document($generated-file)"/>
</xsl:variable>
<xd:doc>
<xd:desc>
<xd:p>Root template. The xsl is applied on the existing xsl stylesheet.</xd:p>
</xd:desc>
</xd:doc>
<xsl:template match="/">
<xsl:apply-templates select="xsl:stylesheet"/>
</xsl:template>
<xd:doc>
<xd:desc>
<xd:p>Default template for every element and every attribute, simply copying to the output file.</xd:p>
</xd:desc>
</xd:doc>
<xsl:template match="node() | @*">
<xsl:copy>
<xsl:apply-templates select="node() | @*"/>
</xsl:copy>
</xsl:template>
<xd:doc>
<xd:desc>
<xd:p>The two xsl stylesheets are merged.</xd:p>
</xd:desc>
</xd:doc>
<xsl:template match="xsl:stylesheet">
<xsl:copy>
<xsl:apply-templates select="@*"/>
<xsl:apply-templates select="node()"/>
<!-- The content of the generated xsl stylesheet is copied within the existing one. -->
<xsl:apply-templates select="$templates/xsl:stylesheet/node()"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet> | 31.953846 | 126 | 0.559461 |
7c6858a62895bb5285981c62b4fdd914d855937f | 4,338 | xsl | XSLT | trunk/converters/code/ToSchematron/xhtml2sch.xsl | clarin-eric/schematron | 1d5af9942e9ae64bba153b53424d0f132086e546 | [
"MIT"
] | 89 | 2015-10-16T11:11:03.000Z | 2021-05-21T02:11:33.000Z | trunk/converters/code/ToSchematron/xhtml2sch.xsl | clarin-eric/schematron | 1d5af9942e9ae64bba153b53424d0f132086e546 | [
"MIT"
] | 79 | 2016-01-03T20:41:04.000Z | 2020-11-01T21:42:36.000Z | trunk/converters/code/ToSchematron/xhtml2sch.xsl | clarin-eric/schematron | 1d5af9942e9ae64bba153b53424d0f132086e546 | [
"MIT"
] | 51 | 2015-11-25T21:00:40.000Z | 2021-11-05T13:19:27.000Z | <?xml version="1.0"?>
<!--
Programmers: Rick Jelliffe, Cheney Xin, Rahul Grewel
-->
<!--
The code was written under sponsorship of JSTOR The Scholarly Journal Archive
This code is also available under the GPL (v3. http://www.gnu.org/copyleft/gpl.html)
-->
<!--
Open Source Initiative OSI - The MIT License:Licensing
[OSI Approved License]
The MIT License
This code copyright 2007-2009 jointly and severally
Allette Systems Pty. Ltd. (www.allette.com.au),
Topologi Pty. Ltd. (www.topologi.com),
JSTOR (http://www.jstor.org/)
and Rick Jelliffe.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-->
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:sch="http://purl.oclc.org/dsdl/schematron"
xmlns:xhtml="http://www.w3.org/1999/xhtml">
<xsl:output method="xml" encoding="UTF-8" indent="yes" omit-xml-declaration="no"/>
<xsl:template match="xhtml:h1 | xhtml:H1" >
<sch:p class="h1">
<xsl:apply-templates />
</sch:p>
</xsl:template>
<xsl:template match="xhtml:h2 | xhtml:H2" >
<sch:p class="h2">
<xsl:apply-templates />
</sch:p>
</xsl:template>
<xsl:template match="xhtml:h3 | xhtml:H3" >
<sch:p class="h3">
<xsl:apply-templates />
</sch:p>
</xsl:template>
<xsl:template match="xhtml:h4 | xhtml:H4" >
<sch:p class="h4">
<xsl:apply-templates />
</sch:p>
</xsl:template>
<xsl:template match="xhtml:h5 | xhtml:H5" >
<sch:p class="h5">
<xsl:apply-templates />
</sch:p>
</xsl:template>
<xsl:template match="xhtml:h6 | xhtml:H6" >
<sch:p class="h6">
<xsl:apply-templates />
</sch:p>
</xsl:template>
<xsl:template match="xhtml:li | xhtml:LI" >
<sch:p class="li">
<xsl:apply-templates />
</sch:p>
</xsl:template>
<!-- both IE and firefox must cover , this is for firefox -->
<xsl:template match="xhtml:span | xhtml:SPAN" >
<!-- for firefox -->
<xsl:choose>
<xsl:when test="contains(@style, 'font-weight: bold;')">
<sch:emph>
<xsl:value-of select="text()"/>
</sch:emph>
</xsl:when>
<xsl:when test="contains(@style, 'font-style: italic;')">
<sch:span class="italic">
<xsl:value-of select="text()"/>
</sch:span>
</xsl:when>
<xsl:when test="contains(@style, 'text-decoration: underline;')">
<sch:span class="underline">
<xsl:value-of select="text()"/>
</sch:span>
</xsl:when>
<xsl:when test="@class = 'valueof'">
<value-of xmlns="http://purl.oclc.org/dsdl/schematron">
<xsl:attribute name="select">
<xsl:value-of select="." />
</xsl:attribute>
</value-of>
</xsl:when>
<xsl:when test="@class = 'name'">
<name xmlns="http://purl.oclc.org/dsdl/schematron">
<xsl:attribute name="path">
<xsl:value-of select="." />
</xsl:attribute>
</name>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="text()"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- for IE -->
<xsl:template match="xhtml:strong | xhtml:STRONG" >
<sch:emph>
<xsl:value-of select="text()"/>
</sch:emph>
</xsl:template>
<xsl:template match="xhtml:em | xhtml:EM" >
<sch:span class="italic">
<xsl:value-of select="text()"/>
</sch:span>
</xsl:template>
<xsl:template match="xhtml:u | xhtml:U" >
<sch:span class="underline">
<xsl:value-of select="text()"/>
</sch:span>
</xsl:template>
</xsl:stylesheet>
| 28.168831 | 86 | 0.669894 |
b933ed7c19215a114006c7b1d50394bb3e211efd | 3,014 | xsl | XSLT | testphp/film/util/cinema.xsl | FoxySeta/unibo-88566-tecnologie-web | 4ccfc51c4020a3f047c31f4132db7c95250166a5 | [
"MIT"
] | null | null | null | testphp/film/util/cinema.xsl | FoxySeta/unibo-88566-tecnologie-web | 4ccfc51c4020a3f047c31f4132db7c95250166a5 | [
"MIT"
] | null | null | null | testphp/film/util/cinema.xsl | FoxySeta/unibo-88566-tecnologie-web | 4ccfc51c4020a3f047c31f4132db7c95250166a5 | [
"MIT"
] | null | null | null | <?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" encoding="iso-8859-1" indent="yes"/>
<xsl:template match="/">
<html>
<head>
<title><xsl:call-template name="title"/></title>
<link rel="stylesheet" type="text/css" href="css/base.css" />
</head>
<body>
<xsl:apply-templates/>
</body>
</html>
</xsl:template>
<xsl:template match="film">
<table width="800" border="1" cellpadding="10" cellspacing="0">
<tr>
<td colspan="2">
<xsl:apply-templates select="titolo"/>
<xsl:apply-templates select="anno"/>
</td>
</tr>
<tr>
<td rowspan="1" align="center"><xsl:apply-templates select="locandina"/></td>
<td><xsl:apply-templates select="sale"/></td>
</tr>
<tr>
<td align="left"><xsl:call-template name="leftButton"/></td>
<td align="right"><xsl:call-template name="rightButton"/></td>
</tr>
</table>
</xsl:template>
<xsl:template name="title">
<xsl:value-of select="film/titolo"/> in <xsl:value-of select="count(film/sale/sala)"/> cinema
</xsl:template>
<xsl:template name="leftButton">
<xsl:variable name="prec">
<xsl:choose>
<xsl:when test="@id > 0"><xsl:value-of select="@id - 1"/></xsl:when>
<xsl:otherwise>0</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<p class="small"><a href="test3.php?id={$prec}"><- Film precedente</a></p>
</xsl:template>
<xsl:template name="rightButton">
<xsl:variable name="seg">
<xsl:choose>
<xsl:when test="(@id < (@max - 2))"><xsl:value-of select="1 + @id"/></xsl:when>
<xsl:otherwise><xsl:value-of select="@max - 1"/></xsl:otherwise>
</xsl:choose>
</xsl:variable>
<p class="small"><a href="test3.php?id={$seg}">-> Film seguente</a></p>
</xsl:template>
<xsl:template match="titolo">
<p class="big center font2">Proiezioni del film <br/><xsl:apply-templates/></p>
</xsl:template>
<xsl:template match="anno">
<p class="small center">(<xsl:apply-templates/>)</p>
</xsl:template>
<xsl:template match="locandina">
<img height="400" alt="locandina" src="img/{.}"/>
</xsl:template>
<xsl:template match="regista">
<p class="small"><b>Regia di: </b><xsl:apply-templates/></p>
</xsl:template>
<xsl:template match="attori">
<p class="small">
<b>Con: </b>
<ul><xsl:apply-templates/></ul>
</p>
</xsl:template>
<xsl:template match="sale">
<p class="small">
<b>Al cinema: </b>
<ul><xsl:apply-templates/></ul>
</p>
</xsl:template>
<xsl:template match="attore|sala">
<li class="small"><xsl:apply-templates/></li>
</xsl:template>
<xsl:template match="cinema">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="indirizzo">
<br/><xsl:apply-templates/>
</xsl:template>
<xsl:template match="telefono">
<br/>Tel.: <xsl:apply-templates/>
</xsl:template>
<xsl:template match="orario">
<br/>h: <xsl:apply-templates/>
</xsl:template>
</xsl:stylesheet>
| 30.14 | 95 | 0.616125 |
fa7d409367db86301442bcbbb246823b8de0deb3 | 14,267 | xsl | XSLT | pretext/static/xsl/localizations/fr-FR.xsl | StevenClontz/ptxtikzjaxtest | 312fd6bba79c8671ba89f08a2ce6a510568ee808 | [
"MIT"
] | null | null | null | pretext/static/xsl/localizations/fr-FR.xsl | StevenClontz/ptxtikzjaxtest | 312fd6bba79c8671ba89f08a2ce6a510568ee808 | [
"MIT"
] | null | null | null | pretext/static/xsl/localizations/fr-FR.xsl | StevenClontz/ptxtikzjaxtest | 312fd6bba79c8671ba89f08a2ce6a510568ee808 | [
"MIT"
] | null | null | null | <?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!--********************************************************************
Copyright 2016 Robert A. Beezer
This file is part of MathBook XML.
MathBook XML is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 or version 3 of the
License (at your option).
MathBook XML is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with MathBook XML. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************-->
<!-- See xsl/localizations/README.md for an explanation of this file -->
<!-- fr-FR, French (France) -->
<!-- Thomas W. Judson, judsontw@sfasu.edu, 2016-03-23 -->
<!-- Julien Giol, julien.giol@gmail.com, 2018-02-05 -->
<xsl:variable name="fr-FR">
<!-- THEOREM-LIKE blocks -->
<!-- Environments which have proofs, plus proofs themselves -->
<localization string-id="theorem">Théorème</localization>
<localization string-id="corollary">Corollaire</localization>
<localization string-id="lemma">Lemme</localization>
<localization string-id='algorithm'><xsl:text>Algorithme</xsl:text></localization>
<localization string-id='proposition'><xsl:text>Proposition</xsl:text></localization>
<localization string-id='claim'><xsl:text>Affirmation</xsl:text></localization>
<localization string-id='fact'><xsl:text>Fait</xsl:text></localization>
<localization string-id='identity'><xsl:text>Identité</xsl:text></localization>
<localization string-id='proof'><xsl:text>Démonstration</xsl:text></localization>
<localization string-id='case'><xsl:text>Cas</xsl:text></localization>
<!-- Mathematical statements without proofs -->
<!-- AXIOM-LIKE blocks -->
<localization string-id='axiom'><xsl:text>Axiome</xsl:text></localization>
<localization string-id='conjecture'><xsl:text>Conjecture</xsl:text></localization>
<localization string-id='principle'><xsl:text>Principe</xsl:text></localization>
<!-- <localization string-id='heuristic'><xsl:text>Heuristic</xsl:text></localization> -->
<localization string-id='hypothesis'><xsl:text>Hypothèse</xsl:text></localization>
<!-- <localization string-id='assumption'><xsl:text>Assumption</xsl:text></localization> -->
<!-- Definitions -->
<localization string-id='definition'><xsl:text>Définition</xsl:text></localization>
<!-- Equations, when referenced by number -->
<localization string-id='men'><xsl:text>Équation</xsl:text></localization>
<localization string-id='mrow'><xsl:text>Équation</xsl:text></localization>
<!-- Types of documents, mostly for informational messages -->
<localization string-id='volume'><xsl:text>Volume</xsl:text></localization>
<localization string-id='book'><xsl:text>Livre</xsl:text></localization>
<localization string-id='article'><xsl:text>Article</xsl:text></localization>
<localization string-id='letter'><xsl:text>Lettre</xsl:text></localization>
<localization string-id='memo'><xsl:text>Mémo</xsl:text></localization>
<localization string-id='presentation'><xsl:text>Présentation</xsl:text></localization>
<!-- Parts of a document -->
<localization string-id='frontmatter'><xsl:text>Pages Liminaires</xsl:text></localization>
<localization string-id='part'><xsl:text>Partie</xsl:text></localization>
<localization string-id='chapter'><xsl:text>Chapitre</xsl:text></localization>
<localization string-id='appendix'><xsl:text>Appendice</xsl:text></localization>
<localization string-id='section'><xsl:text>Section</xsl:text></localization>
<localization string-id='subsection'><xsl:text>Sous-section</xsl:text></localization>
<localization string-id='subsubsection'><xsl:text>Sous-sous-section</xsl:text></localization>
<localization string-id='exercises'><xsl:text>Exercices</xsl:text></localization>
<!-- <localization string-id='worksheet'><xsl:text>Worksheet</xsl:text></localization> -->
<!-- <localization string-id='reading-questions'><xsl:text>Reading Questions</xsl:text></localization> -->
<!-- <localization string-id='solutions'><xsl:text>Solutions</xsl:text></localization> -->
<!-- <localization string-id='glossary'><xsl:text>Glossary</xsl:text></localization> -->
<localization string-id='references'><xsl:text>Références</xsl:text></localization>
<localization string-id='backmatter'><xsl:text>Appendices</xsl:text></localization>
<!-- paragraph is deprecated, getting plural correct is not super critical, just in messages -->
<localization string-id='paragraphs'><xsl:text>Paragraphes</xsl:text></localization> <!--checked-->
<!-- <localization string-id='commentary'><xsl:text>Commentary</xsl:text></localization> -->
<localization string-id='subparagraph'><xsl:text>Sous-paragraphe</xsl:text></localization> <!--checked-->
<!-- Components of the narrative -->
<!-- REMARK-LIKE blocks -->
<!-- "note" is used within "biblio", likely to change -->
<localization string-id='remark'><xsl:text>Remarque</xsl:text></localization>
<localization string-id='convention'><xsl:text>Convention</xsl:text></localization>
<localization string-id='note'><xsl:text>Note</xsl:text></localization>
<localization string-id='observation'><xsl:text>Observation</xsl:text></localization>
<localization string-id='warning'><xsl:text>Mise en garde</xsl:text></localization>
<!-- <localization string-id='insight'><xsl:text>Insight</xsl:text></localization> -->
<localization string-id='computation'><xsl:text>Calcul</xsl:text></localization>
<!-- <localization string-id='technology'><xsl:text>Technology</xsl:text></localization> -->
<!-- ASIDE-LIKE blocks -->
<localization string-id='aside'><xsl:text>Digression</xsl:text></localization>
<localization string-id='biographical'><xsl:text>Digression biographique</xsl:text></localization>
<localization string-id='historical'><xsl:text>Digression historique</xsl:text></localization>
<!-- EXAMPLE-LIKE blocks -->
<localization string-id='example'><xsl:text>Exemple</xsl:text></localization> <!--checked-->
<localization string-id='question'><xsl:text>Question</xsl:text></localization>
<localization string-id='problem'><xsl:text>Problème</xsl:text></localization>
<!-- PROJECT-LIKE blocks -->
<localization string-id='project'><xsl:text>Projet</xsl:text></localization>
<localization string-id='activity'><xsl:text>Activité</xsl:text></localization>
<localization string-id='exploration'><xsl:text>Exploration</xsl:text></localization>
<localization string-id='task'><xsl:text>Tâche</xsl:text></localization>
<!-- <localization string-id='investigation'><xsl:text>Investigation</xsl:text></localization> -->
<!-- -->
<!-- assemblages are collections of minimally structured material -->
<localization string-id='assemblage'><xsl:text>Assemblage</xsl:text></localization>
<localization string-id='poem'><xsl:text>Poème</xsl:text></localization>
<!-- Objectives is the block, objective is a list item within -->
<localization string-id='objectives'><xsl:text>Objectifs</xsl:text></localization>
<localization string-id='objective'><xsl:text>Objectif</xsl:text></localization>
<!-- Outcomes is the block, outcome is a list item within (different) -->
<!-- <localization string-id='outcomes'><xsl:text>Outcomes</xsl:text></localization> -->
<!-- <localization string-id='outcome'><xsl:text>Outcome</xsl:text></localization> -->
<!-- -->
<localization string-id='figure'><xsl:text>Figure</xsl:text></localization>
<localization string-id='table'><xsl:text>Table</xsl:text></localization>
<localization string-id='fn'><xsl:text>Note de bas de page</xsl:text></localization> <!--checked-->
<!-- Lists and their items -->
<!-- Translations needed for France French -->
<localization string-id='list'><xsl:text>Liste</xsl:text></localization>
<localization string-id='li'><xsl:text>Point</xsl:text></localization>
<!-- A term (word) defined in a glossary -->
<!-- <localization string-id='defined-term'><xsl:text>Term</xsl:text></localization> -->
<!-- A regular paragraph, not the old sectioning structure -->
<localization string-id='p'><xsl:text>Paragraph</xsl:text></localization>
<localization string-id='blockquote'><xsl:text>Citation</xsl:text></localization>
<!-- Parts of an exercise and its solution -->
<localization string-id='divisionalexercise'><xsl:text>Exercice</xsl:text></localization>
<!-- Translation needed for France French -->
<!-- See en-US file for distinctions here, do not repeat previous translation -->
<!-- <localization string-id='inlineexercise'><xsl:text>Checkpoint</xsl:text></localization> -->
<!-- <localization string-id='worksheetexercise'><xsl:text>Worksheet Exercise</xsl:text></localization> -->
<!-- <localization string-id='readingquestion'><xsl:text>Reading Question</xsl:text></localization> -->
<localization string-id='webwork'><xsl:text>WeBWorK</xsl:text></localization>
<localization string-id='hint'><xsl:text>Indication</xsl:text></localization>
<localization string-id='answer'><xsl:text>Réponse</xsl:text></localization>
<localization string-id='solution'><xsl:text>Solution</xsl:text></localization>
<!-- Front matter components -->
<localization string-id='toc'><xsl:text>Sommaire</xsl:text></localization>
<localization string-id='abstract'><xsl:text>Résumé</xsl:text></localization>
<localization string-id='preface'><xsl:text>Préface</xsl:text></localization>
<localization string-id='acknowledgement'><xsl:text>Remerciements</xsl:text></localization>
<localization string-id='biography'><xsl:text>Biographie</xsl:text></localization>
<!-- singular and plural titles for biography subdivision -->
<localization string-id='about-author'><xsl:text>À propos de l'auteur</xsl:text></localization>
<localization string-id='about-authors'><xsl:text>À propos des auteurs</xsl:text></localization>
<localization string-id='foreword'><xsl:text>Avant-propos</xsl:text></localization>
<localization string-id='dedication'><xsl:text>Dédicace</xsl:text></localization>
<localization string-id='colophon'><xsl:text>Colophon</xsl:text></localization>
<!-- Back matter components -->
<!-- index-part is deprecated, but not abandoned -->
<!-- NB: repurpose translations, maybe move appendix here -->
<localization string-id='index-part'><xsl:text>Index</xsl:text></localization>
<localization string-id='jump-to'><xsl:text>Aller à :</xsl:text></localization>
<!-- Parts of the Index -->
<localization string-id='index'><xsl:text>Index</xsl:text></localization>
<localization string-id='see'><xsl:text>Visiter</xsl:text></localization>
<localization string-id='also'><xsl:text>Voir Aussi</xsl:text></localization>
<!-- Navigation Interface elements -->
<!-- Assistive "skip to content" link -->
<localization string-id='skip-to-content'><xsl:text>Sauter</xsl:text></localization>
<localization string-id='previous'><xsl:text>Précédent</xsl:text></localization> <!--buttons for HTML navigation-->
<localization string-id='up'><xsl:text>Haut</xsl:text></localization>
<localization string-id='next'><xsl:text>Suivant</xsl:text></localization>
<!-- Keep these short, so buttons are not overly wide, 4 characters maximum -->
<!-- TODO: SHORTEN THESE -->
<localization string-id='previous-short'><xsl:text>Précédent</xsl:text></localization> <!--buttons for HTML navigation-->
<localization string-id='up-short'><xsl:text>Haut</xsl:text></localization>
<localization string-id='next-short'><xsl:text>Suivant</xsl:text></localization>
<!-- NB: Use toc from above for both headings and navigation sidebar-->
<localization string-id='annotations'><xsl:text>Annotations</xsl:text></localization> <!--does not get printed -->
<localization string-id='feedback'><xsl:text>Commentaires</xsl:text></localization> <!--e.g., in case there is a link for feedback. Will appear in HTML.-->
<localization string-id='authored'><xsl:text>Rédigé avec PreTeXt</xsl:text></localization> <!--e.g., authored in MBX. Will appear in HTML.-->
<!-- Parts of memos and letters -->
<localization string-id='to'><xsl:text>À</xsl:text></localization>
<localization string-id='from'><xsl:text>De</xsl:text></localization>
<localization string-id='subject'><xsl:text>Sujet</xsl:text></localization>
<localization string-id='date'><xsl:text>Date</xsl:text></localization>
<localization string-id='copy'><xsl:text>Copie</xsl:text></localization>
<localization string-id='enclosure'><xsl:text>Pièce Jointe</xsl:text></localization>
<!-- Various -->
<localization string-id='todo'><xsl:text>À Faire</xsl:text></localization>
<localization string-id='editor'><xsl:text>Éditeur</xsl:text></localization>
<localization string-id='edition'><xsl:text>Édition</xsl:text></localization>
<localization string-id='website'><xsl:text>Site web</xsl:text></localization>
<localization string-id='copyright'><xsl:text>Copyright</xsl:text></localization>
<localization string-id='incontext'><xsl:text>Contexte</xsl:text></localization>
<!-- Sage Cell evaluate button -->
<!-- eg, "Evaluate (Maxima)" -->
<!-- 2017-05-14: 'code' is obsolete -->
<!-- This needs to be defined to *something* (English) -->
<!-- else whatever crud ends up on the button kills the cell -->
<!-- Translate at first opportunity, please -->
<localization string-id='evaluate'><xsl:text>Évaluer</xsl:text></localization>
<localization string-id='code'><xsl:text>Code</xsl:text></localization>
</xsl:variable>
</xsl:stylesheet>
| 70.628713 | 161 | 0.696152 |
acd21148a5c227bd6472adf8e7e68090d7a53f4c | 6,596 | xsl | XSLT | xproc/tei-bibls-to-table.xsl | IsisCB/IsisCBLegacyDigitization | 475a525f91dab6afadaf63cd6b9e1fcb50e4e97f | [
"MIT"
] | null | null | null | xproc/tei-bibls-to-table.xsl | IsisCB/IsisCBLegacyDigitization | 475a525f91dab6afadaf63cd6b9e1fcb50e4e97f | [
"MIT"
] | 57 | 2015-10-18T06:47:41.000Z | 2016-08-19T14:41:36.000Z | xproc/tei-bibls-to-table.xsl | IsisCB/IsisCBLegacyDigitization | 475a525f91dab6afadaf63cd6b9e1fcb50e4e97f | [
"MIT"
] | null | null | null | <xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:tei="http://www.tei-c.org/ns/1.0"
xmlns="http://www.tei-c.org/ns/1.0"
exclude-result-prefixes="tei">
<xsl:template match="/tei:TEI">
<table>
<row role="label">
<cell>ID</cell>
<cell>Correction</cell>
<cell>ChapterTitle</cell>
<cell>Title</cell>
<cell>Type</cell>
<cell>Heading</cell>
<cell>SeePreferredHeading</cell>
<cell>Description</cell>
<cell>AdditionalTitles</cell>
<cell>Authors</cell>
<cell>Editors</cell>
<cell>Contributors</cell>
<cell>UnrecognizedMaterial</cell>
<cell>PlacePublished</cell>
<cell>Publisher</cell>
<cell>YearPublished</cell>
<cell>BookSeriesTitle</cell>
<cell>JournalTitleAbbreviation</cell>
<cell>JournalTitle</cell>
<cell>VolumeFullText</cell>
<cell>IssueFullText</cell>
<cell>PagesFullText</cell>
<cell>PagesBegin</cell>
<cell>PagesEnd</cell>
<cell>ExtentFullText</cell>
<cell>Extent</cell>
<cell>SourceBookTitle</cell>
<cell>SourceBookResponsibility</cell>
<cell>SourceBookPublicationDetails</cell>
<cell>SourceBookLink</cell>
<cell>ClassificationTerm</cell>
<cell>LocationInBibliography</cell>
<cell>FullCitation</cell>
</row>
<!-- for each citation or cross reference -->
<xsl:for-each select="
tei:text/tei:body//tei:bibl |
tei:text/tei:body//tei:p[string(tei:ref) = normalize-space(.)]
">
<!-- if current bibl is a review, the source-book is the item reviewed -->
<xsl:variable name="source-book" select="ancestor::tei:bibl[1]"/>
<row>
<cell n="ID"><xsl:if test="self::tei:bibl">
<xsl:value-of select="concat(ancestor::tei:text/@xml:id, '-', @xml:id)"/>
</xsl:if></cell>
<cell n="Correction"><xsl:value-of select="(@subtype='correction')"/></cell>
<cell n="ChapterTitle"><xsl:value-of select="
normalize-space(
self::tei:bibl/tei:biblScope[@unit='chapter']/tei:title
)
"/></cell>
<cell n="Title"><xsl:if test="self::tei:bibl"><xsl:value-of select="normalize-space(
(
tei:title[not(@level)],
if ($source-book/tei:title[not(@level)]) then
concat('Review of ', $source-book/tei:title[not(@level)][1])
else
''
)[1]
)"/></xsl:if></cell>
<cell n="Type"><xsl:value-of select="@type"/></cell>
<cell n="Heading"><xsl:value-of select="
string-join(
for $div in (ancestor::tei:div) return $div/tei:head[1],
' / '
)
"/></cell>
<cell n="SeePreferredHeading"><xsl:value-of select="self::tei:p/tei:ref"/></cell>
<cell n="Description"><xsl:apply-templates mode="plain-text" select="tei:note"/></cell>
<cell n="AdditionalTitles">(not parsed)</cell>
<cell n="Authors"><xsl:value-of select="string-join(tei:author, ', ')"/></cell>
<cell n="Editors">(not parsed)</cell>
<cell n="Contributors">(not parsed)</cell>
<!-- list of all unparsed text which is not composed entirely of punctuation and whitespace -->
<cell n="UnrecognizedMaterial"><xsl:value-of select="
string-join(
for $text in (text()[matches(., '(\p{L}|\p{N})')]) return normalize-space($text),
' [...] '
)"/></cell>
<cell n="PlacePublished"><xsl:value-of select="tei:pubPlace"/></cell>
<cell n="Publisher"><xsl:value-of select="tei:publisher"/></cell>
<cell n="YearPublished"><xsl:value-of select="tei:date"/></cell>
<cell n="BookSeriesTitle"><xsl:value-of select="normalize-space(tei:title[@level='s'])"/></cell>
<cell n="JournalTitleAbbreviation"><xsl:value-of select="normalize-space(tei:title[@level='j']/tei:abbr)"/></cell>
<cell n="JournalTitle"><xsl:value-of select="normalize-space(tei:title[@level='j']/tei:expan)"/></cell>
<cell n="VolumeFullText"><xsl:value-of select="tei:biblScope[@unit='volume']"/></cell>
<cell n="IssueFullText"><xsl:value-of select="tei:biblScope[@unit='issue']"/></cell>
<xsl:variable name="page-range" select="tei:biblScope[@unit='page'][1]"/>
<cell n="PagesFullText"><xsl:value-of select="$page-range"/></cell>
<cell n="PagesBegin"><xsl:value-of select="$page-range/@from"/></cell>
<cell n="PagesEnd"><xsl:value-of select="$page-range/@to"/></cell>
<cell n="ExtentFullText"><xsl:value-of select="
normalize-space(
string-join(
for $m in tei:extent/tei:measure return
string-join(
($m/@quantity, $m/@commodity),
' '
),
', '
)
)
"/></cell>
<cell n="Extent"><xsl:value-of select="string(
number((tei:extent/tei:measure[@commodity='prefatory pages']/@quantity, '0')[1]) +
number((tei:extent/tei:measure[@commodity='pages']/@quantity, '0')[1])
)"/></cell>
<cell n="SourceBookTitle"><xsl:value-of select="normalize-space($source-book/tei:title[not(@level)])"/></cell>
<cell n="SourceBookResponsibility"><xsl:value-of select="
string-join(
$source-book/tei:author,
'; '
)
"/></cell>
<cell n="SourceBookPublicationDetails"><xsl:value-of select="
string-join(
(
$source-book/tei:pubPlace,
$source-book/tei:publisher,
$source-book/tei:date
),
' '
)
"/></cell>
<cell n="SourceBookLink"><xsl:if test="$source-book">
<xsl:value-of select="concat(ancestor::tei:text/@xml:id, '-', $source-book/@xml:id)"/>
</xsl:if></cell>
<cell n="ClassificationTerm"><xsl:value-of select="
substring-before(
concat(ancestor::tei:div[1][not(@type='party')]/tei:head[1], ' '),
' '
)
"/></cell>
<cell n="LocationInBibliography"><!--<xsl:value-of select="
concat(
'Volume ',
ancestor::tei:text/@xml:id, ', page ',
preceding::tei:pb[1]/@n, ', citation ',
string(1 + count(
(preceding::tei:bibl | ancestor::tei:bibl)[. >> preceding::tei:pb[1]]
))
)
"/>--><!-- "Just provide the page number here. We can do the rest from the ID." --><xsl:value-of select="preceding::tei:pb[1]/@n"/></cell>
<cell n="FullCitation"><xsl:apply-templates mode="plain-text" select="."/></cell>
</row>
</xsl:for-each>
</table>
</xsl:template>
<xsl:variable name="quote" select="codepoints-to-string(34)"/>
<xsl:template match="*" mode="plain-text">
<xsl:apply-templates/>
</xsl:template>
<!-- do not render expansions in FullCitation mode -->
<xsl:template match="tei:expan" mode="plain-text"/>
</xsl:stylesheet>
| 39.029586 | 143 | 0.60279 |
d2558db887d5dc42eb2a44209f3401729c625dfe | 1,618 | xslt | XSLT | Website/SourceCode/Profiles/Profiles/Profile/XSLT/MemberRoleOf.xslt | kapelletier/ProfilesRNS-Orchard | 1140404da798c36b7d029458de3eaef66001f912 | [
"BSD-3-Clause"
] | 13 | 2015-09-18T08:42:22.000Z | 2020-05-15T06:01:10.000Z | Website/SourceCode/Profiles/Profiles/Profile/XSLT/MemberRoleOf.xslt | nicholaswilliambrown/ProfilesRNS | 5a1a52dd0289e63d85b73be697f4e45c648d3c30 | [
"BSD-3-Clause"
] | 149 | 2015-04-28T14:21:43.000Z | 2021-04-09T21:17:32.000Z | Website/SourceCode/Profiles/Profiles/Profile/XSLT/MemberRoleOf.xslt | nicholaswilliambrown/ProfilesRNS | 5a1a52dd0289e63d85b73be697f4e45c648d3c30 | [
"BSD-3-Clause"
] | 15 | 2015-03-19T16:10:30.000Z | 2022-03-05T14:00:35.000Z | <?xml version="1.0" encoding="UTF-8"?>
<?altova_samplexml Profile.xml?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:vivo="http://vivoweb.org/ontology/core#" >
<xsl:template match="/">
<xsl:choose>
<xsl:when test="rdf:RDF/rdf:Description/vivo:hasMemberRole !=''">
<div class="sectionHeader">Narrative</div>
<div class="narrative">
translate(<xsl:value-of select="rdf:RDF/rdf:Description/vivo:hasMemberRole "/>," ","<br/>")
</div>
</xsl:when>
</xsl:choose>
<div class="passiveSectionBody">
<ul class="prns-details-list">
<xsl:for-each select="//rdf:RDF/rdf:Description/vivo:hasMemberRole">
<xsl:variable name="resource" select="@rdf:resource"></xsl:variable>
<xsl:for-each select="//rdf:RDF/rdf:Description[@rdf:about=$resource]/vivo:roleContributesTo">
<xsl:variable name="groupResource" select="@rdf:resource"></xsl:variable>
<li>
<a href="{$groupResource}">
<xsl:value-of select="//rdf:RDF/rdf:Description[@rdf:about=$groupResource]/rdfs:label"/></a> (<xsl:value-of select="//rdf:RDF/rdf:Description[@rdf:about=$resource]/rdfs:label"/>)
</li>
</xsl:for-each>
</xsl:for-each>
</ul>
</div>
</xsl:template>
</xsl:stylesheet>
| 55.793103 | 373 | 0.625464 |
3612f85696277ad2b612cae5ff796dd3091e20da | 4,881 | xsl | XSLT | modules/ci/legis-leg.num_ci.cite.xsl | priyakaushal/XSpec_Chanakya1 | d1cb34214e50f3ad2782955001fcf8150eac2732 | [
"MIT"
] | null | null | null | modules/ci/legis-leg.num_ci.cite.xsl | priyakaushal/XSpec_Chanakya1 | d1cb34214e50f3ad2782955001fcf8150eac2732 | [
"MIT"
] | null | null | null | modules/ci/legis-leg.num_ci.cite.xsl | priyakaushal/XSpec_Chanakya1 | d1cb34214e50f3ad2782955001fcf8150eac2732 | [
"MIT"
] | null | null | null | <?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dita="http://dita.oasis-open.org/architecture/2005/" xmlns:leg="http://www.lexis-nexis.com/glp/leg" xmlns:lnci="http://www.lexisnexis.com/xmlschemas/content/shared/citations/1/" xmlns:ref="http://www.lexisnexis.com/xmlschemas/content/shared/reference/1/" version="2.0" exclude-result-prefixes="dita leg">
<dita:topic xmlns="http://dita.oasis-open.org/architecture/2005/" id="legis-leg.num_ci.cite">
<title>leg:num/ci:cite <lnpid>id-ST03-26640</lnpid></title>
<body>
<section>
<p><sourcexml>leg:num/ci:cite[@type="cite4thisdoc"]</sourcexml> becomes <targetxml>ref:citations/ref:cite4thisresource</targetxml> and create child element <targetxml>lnci:cite</targetxml> for handling citation markup.</p>
<note>When text appears inside <sourcexml>leg:num</sourcexml>, conversion needs to move the pinpoint information into <targetxml>lnci:content</targetxml>. </note>
<note>If <sourcexml>leg:num</sourcexml> does not contain any citation markup and has just text then it will be converted to <targetxml>ref:citations/ref:cite4thisresource</targetxml>, create a child <targetxml>lnci:cite/lnci:content</targetxml> to capture the text.</note>
</section>
<example>
<title>CANADA SOURCE XML 1: Mapping of <sourcexml>leg:num/ci:cite</sourcexml></title>
<codeblock>
<leg:num>
<ci:cite type="cite4thisdoc">
<ci:stat>
<ci:statinfo spanref="stcspan1">
<ci:hier>
<ci:hierlev label="year" num="1996">
<ci:hierlev label="chapter" num="1" />
</ci:hierlev>
</ci:hier>
</ci:statinfo>
<ci:statref spanref="stcspan1">
<ci:publicationname normpubcode="RSBC" value="RSBC" />
</ci:statref>
</ci:stat>
<ci:content>
<ci:span spanid="stcspan1">R.S.B.C. 1996, c. 1</ci:span>
</ci:content>
</ci:cite>, Preamble
</leg:num>
</codeblock>
<b>Becomes</b>
<title>CANADA TARGET XML 1: Mapping of <sourcexml>leg:num/ci:cite</sourcexml></title>
<codeblock>
<ref:citations>
<ref:cite4thisresource>
<lnci:cite>
<lnci:stat>
<lnci:statinfo>
<lnci:hier>
<lnci:hierlev label="year" num="1996">
<lnci:hierlev label="chapter" num="1" />
</lnci:hierlev>
</lnci:hier>
</lnci:statinfo>
<lnci:statref>
<lnci:publicationname normpubcode="RSBC" value="RSBC" />
</lnci:statref>
</lnci:stat>
<lnci:content>R.S.B.C. 1996, c. 1, Preamble</lnci:content>
</lnci:cite>
</ref:cite4thisresource>
</ref:citations>
</codeblock>
</example>
<example>
<title>CANADA SOURCE XML 2: Mapping of <sourcexml>leg:num</sourcexml> with text only</title>
<codeblock>
<leg:num>R.S.B.C. 1996, c. 117, s. 2</leg:num>
</codeblock>
<b>Becomes</b>
<title>CANADA TARGET XML 2: Mapping of <sourcexml>leg:num</sourcexml> with text only</title>
<codeblock>
<ref:citations>
<ref:cite4thisresource>
<lnci:cite>
<lnci:content>R.S.B.C. 1996, c. 117, s. 2</lnci:content>
</lnci:cite>
</ref:cite4thisresource>
</ref:citations>
</codeblock>
</example>
<section>
<title>Changes</title>
<p>2013-07-16: <ph id="change_20130716_SK">Instruction narrative edited for language; no changes to mappings, no impact to stylesheets.</ph></p>
<p>2013-07-08: <ph id="change_20130708_AB">Created.</ph></p>
</section>
</body>
</dita:topic>
<!-- @@@ This file has been autogenerated. Remove this comment after manual development complete! @@@ -->
<!-- Original DITA file location: DITA\ConversionInstructions\Rosetta\DITA-Standard\Legislation\legis-leg.num_ci.cite.dita -->
<xsl:message>legis-leg.num_ci.cite.xsl requires manual development!</xsl:message>
<xsl:template match="leg:num/ci:cite[@type="cite4thisdoc"]">
<!-- Original Target XPath: ref:citations/ref:cite4thisresource -->
<ref:citations>
<ref:cite4thisresource>
<xsl:apply-templates select="@* | node()"/>
</ref:cite4thisresource>
</ref:citations>
</xsl:template>
<xsl:template match="leg:num">
<!-- Original Target XPath: lnci:content -->
<lnci:content>
<xsl:apply-templates select="@* | node()"/>
</lnci:content>
</xsl:template>
<xsl:template match="leg:num/ci:cite">
<!-- Original Target XPath: -->
<!-- Could not determine target element or attribute name: <> --> <xsl:apply-templates select="@* | node()"/>
<!-- Could not determine target element or attribute name: </> -->
</xsl:template>
</xsl:stylesheet> | 39.048 | 375 | 0.663389 |
f3d51240f570ecc7d27ed26e8477dc5d89ce82f4 | 648 | xsl | XSLT | basex/webapp/hello-world.xsl | wendellpiez/BoxerXML | 31aeefadb7dc98d46d4420202edb9574baeda38e | [
"Unlicense"
] | null | null | null | basex/webapp/hello-world.xsl | wendellpiez/BoxerXML | 31aeefadb7dc98d46d4420202edb9574baeda38e | [
"Unlicense"
] | null | null | null | basex/webapp/hello-world.xsl | wendellpiez/BoxerXML | 31aeefadb7dc98d46d4420202edb9574baeda38e | [
"Unlicense"
] | null | null | null | <?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:math="http://www.w3.org/2005/xpath-functions/math"
xmlns="http://www.w3.org/1999/xhtml"
exclude-result-prefixes="xs math"
version="3.0">
<!-- Run on hello-world.xml for a small demo -->
<xsl:template match="/*">
<h2 xsl:expand-text="true">Greeting <i>{ name() }</i> not recognized</h2>
</xsl:template>
<xsl:template priority="2" match="/hello">
<h1 xsl:expand-text="true">Hello { . }</h1>
</xsl:template>
</xsl:stylesheet> | 34.105263 | 81 | 0.611111 |
e1ff745549fa65c3d4793165441b8c016d32c515 | 50,668 | xsl | XSLT | xslt/affichage.xsl | erc-dharma/digital-areal | e2263a1d69a111be5b02965c048c23575476d605 | [
"CC-BY-4.0"
] | 1 | 2021-11-04T13:24:11.000Z | 2021-11-04T13:24:11.000Z | xslt/affichage.xsl | erc-dharma/digital-areal | e2263a1d69a111be5b02965c048c23575476d605 | [
"CC-BY-4.0"
] | null | null | null | xslt/affichage.xsl | erc-dharma/digital-areal | e2263a1d69a111be5b02965c048c23575476d605 | [
"CC-BY-4.0"
] | null | null | null | <?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:tei="http://www.tei-c.org/ns/1.0"
exclude-result-prefixes="xs tei"
version="2.0">
<!-- Written by Axelle Janiak for ERC-DHARMA, 2021-11 -->
<xsl:output method="html" indent="no"/>
<!-- Identity template -->
<xsl:template match="@* | text() | comment()" mode="copy">
<xsl:copy/>
</xsl:template>
<xsl:template match="/tei:TEI">
<xsl:element name="html">
<xsl:call-template name="fable-head"/>
<xsl:element name="body">
<xsl:attribute name="class">font-weight-light</xsl:attribute>
<xsl:apply-templates select="./tei:teiHeader"/>
<xsl:call-template name="table"/>
<xsl:element name="div">
<xsl:attribute name="class">container</xsl:attribute>
<xsl:apply-templates select="./tei:text"/>
<xsl:apply-templates select="//tei:note | //tei:choice[child::tei:sic and child::tei:corr] | //tei:choice[child::tei:orig and child::tei:reg] | //tei:choice[child::tei:unclear]" mode="modals"/>
</xsl:element>
<xsl:element name="footer">
<xsl:attribute name="class">footer mt-auto py-3 text-center</xsl:attribute>
<xsl:element name="div">
<xsl:value-of select="replace(//tei:fileDesc/tei:publicationStmt//tei:licence/tei:p[2], '\(c\)', '©')"/>
</xsl:element>
</xsl:element>
<xsl:call-template name="fable-script"/>
</xsl:element>
</xsl:element>
</xsl:template>
<!-- add ! -->
<xsl:template match="tei:add">
<xsl:element name="a">
<xsl:attribute name="class">ed-insertion</xsl:attribute>
<xsl:attribute name="data-toggle">tooltip</xsl:attribute>
<xsl:attribute name="data-placement">top</xsl:attribute>
<xsl:attribute name="title">
<xsl:element name="span">
<xsl:attribute name="class">font-italic</xsl:attribute>
<xsl:choose>
<xsl:when test="@place='above'">
<xsl:text>Ajout de l'auteur au-dessus de la ligne</xsl:text>
</xsl:when>
<xsl:when test="@place='below'">
<xsl:text>Ajout de l'auteur sous la ligne</xsl:text>
</xsl:when>
<xsl:when test="@place='right' or @place='left'">
<xsl:text>Ajout de l'auteur en marge</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>Ajout de l'auteur</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:element>
</xsl:attribute>
<xsl:apply-templates/>
</xsl:element>
</xsl:template>
<!-- back -->
<xsl:template match="tei:back">
<xsl:element name="h1">Front</xsl:element>
<xsl:apply-templates/>
</xsl:template>
<!-- byline -->
<xsl:template match="tei:byline">
<xsl:element name="span">
<xsl:call-template name="rendition"/>
<xsl:apply-templates/>
</xsl:element>
</xsl:template>
<!-- C ! -->
<!-- c -->
<xsl:template match="tei:c">
<xsl:element name="span">
<xsl:attribute name="class">initial</xsl:attribute>
<xsl:apply-templates/>
</xsl:element>
</xsl:template>
<!-- choice ! -->
<xsl:template match="tei:choice[child::tei:orig and child::tei:reg]">
<xsl:variable name="app-num">
<xsl:value-of select="name()"/>
<xsl:number level="any" format="0001"/>
</xsl:variable>
<xsl:element name="span">
<xsl:attribute name="class">reg</xsl:attribute>
<xsl:apply-templates select="child::tei:reg"/>
</xsl:element>
<xsl:element name="span">
<xsl:attribute name="class">tooltipApp orig-reg</xsl:attribute>
<xsl:element name="a">
<xsl:attribute name="tabindex">0</xsl:attribute>
<xsl:attribute name="data-toggle">popover</xsl:attribute>
<xsl:attribute name="data-html">true</xsl:attribute>
<xsl:attribute name="data-target">
<xsl:value-of select="generate-id()"/>
</xsl:attribute>
<xsl:attribute name="href"><xsl:text>#to-app-</xsl:text>
<xsl:value-of select="$app-num"/></xsl:attribute>
<xsl:attribute name="title">Note <xsl:number level="any" count="//tei:choice[child::tei:orig and child::tei:reg] | //tei:note | .//tei:choice[child::tei:sic and child::tei:corr] | //tei:choice[child::tei:unclear]"/></xsl:attribute>
<xsl:attribute name="id">
<xsl:text>from-app-</xsl:text>
<xsl:value-of select="$app-num"/>
</xsl:attribute>
<xsl:element name="sup">
<xsl:text>(</xsl:text>
<xsl:number level="any" count="//tei:choice[child::tei:orig and child::tei:reg] | //tei:note | .//tei:choice[child::tei:sic and child::tei:corr] | //tei:choice[child::tei:unclear]"/>
<xsl:text>)</xsl:text>
</xsl:element>
</xsl:element>
</xsl:element>
</xsl:template>
<xsl:template match="tei:choice[child::tei:orig and child::tei:reg]" mode="modals">
<xsl:variable name="apparatus">
<xsl:element name="span">
<xsl:element name="span">
<xsl:attribute name="class">mb-1 lemma-line</xsl:attribute>
<xsl:element name="span">
<xsl:attribute name="class">app-orig</xsl:attribute>
<xsl:apply-templates select="child::tei:orig"/>
<xsl:text> (orig)</xsl:text>
</xsl:element>
</xsl:element>
</xsl:element>
</xsl:variable>
<span class="popover-content d-none" id="{generate-id()}">
<xsl:copy-of select="$apparatus"/>
</span>
</xsl:template>
<xsl:template match="tei:choice[child::tei:sic and child::tei:corr]">
<xsl:param name="location"/>
<xsl:variable name="app-num">
<xsl:value-of select="name()"/>
<xsl:number level="any" format="0001"/>
</xsl:variable>
<xsl:element name="span">
<xsl:attribute name="class">corr</xsl:attribute>
<xsl:apply-templates select="tei:corr"/>
</xsl:element>
<xsl:element name="span">
<xsl:attribute name="class">tooltipApp sic-corr</xsl:attribute>
<xsl:element name="a">
<xsl:attribute name="tabindex">0</xsl:attribute>
<xsl:attribute name="data-toggle">popover</xsl:attribute>
<xsl:attribute name="data-html">true</xsl:attribute>
<xsl:attribute name="data-target">
<xsl:value-of select="generate-id()"/>
</xsl:attribute>
<xsl:attribute name="href"><xsl:text>#to-app-</xsl:text>
<xsl:value-of select="$app-num"/></xsl:attribute>
<xsl:attribute name="title">Note <xsl:number level="any" count="//tei:choice[child::tei:orig and child::tei:reg] | //tei:note | //tei:choice[child::tei:sic and child::tei:corr] | //tei:choice[child::tei:unclear]"/></xsl:attribute>
<xsl:attribute name="id">
<xsl:text>from-app-</xsl:text>
<xsl:value-of select="$app-num"/>
</xsl:attribute>
<xsl:element name="sup">
<xsl:text>(</xsl:text>
<xsl:number level="any" count="//tei:choice[child::tei:orig and child::tei:reg] | //tei:note | //tei:choice[child::tei:sic and child::tei:corr] | //tei:choice[child::tei:unclear]"/>
<xsl:text>)</xsl:text>
</xsl:element>
</xsl:element>
</xsl:element>
</xsl:template>
<xsl:template match="tei:choice[child::tei:sic and child::tei:corr]" mode="modals">
<xsl:variable name="apparatus">
<xsl:element name="span">
<xsl:element name="span">
<xsl:attribute name="class">mb-1 lemma-line</xsl:attribute>
<xsl:element name="span">
<xsl:attribute name="class">app-sic</xsl:attribute>
<xsl:apply-templates select="child::tei:sic"/>
<xsl:text> (</xsl:text>
<xsl:element name="span">
<xsl:attribute name="class">font-italic</xsl:attribute>
<xsl:value-of select="child::tei:sic/name()"/>
</xsl:element>
<xsl:text>)</xsl:text>
</xsl:element>
</xsl:element>
</xsl:element>
</xsl:variable>
<span class="popover-content d-none" id="{generate-id()}">
<xsl:copy-of select="$apparatus"/>
</span>
</xsl:template>
<!-- choice with two unclears -->
<xsl:template match="tei:choice[child::tei:unclear]">
<xsl:param name="location"/>
<xsl:variable name="app-num">
<xsl:value-of select="name()"/>
<xsl:number level="any" format="0001"/>
</xsl:variable>
<xsl:element name="span">
<xsl:attribute name="class">unclear</xsl:attribute>
<xsl:apply-templates select="child::tei:unclear[1]"/>
</xsl:element>
<xsl:element name="span">
<xsl:attribute name="class">tooltipApp</xsl:attribute>
<xsl:element name="a">
<xsl:attribute name="tabindex">0</xsl:attribute>
<xsl:attribute name="data-toggle">popover</xsl:attribute>
<xsl:attribute name="data-html">true</xsl:attribute>
<xsl:attribute name="data-target">
<xsl:value-of select="generate-id()"/>
</xsl:attribute>
<xsl:attribute name="href"><xsl:text>#to-app-</xsl:text>
<xsl:value-of select="$app-num"/></xsl:attribute>
<xsl:attribute name="title">Note <xsl:number level="any" count="//tei:choice[child::tei:orig and child::tei:reg] | //tei:note | //tei:choice[child::tei:sic and child::tei:corr] | //tei:choice[child::tei:unclear]"/></xsl:attribute>
<xsl:attribute name="id">
<xsl:text>from-app-</xsl:text>
<xsl:value-of select="$app-num"/>
</xsl:attribute>
<xsl:element name="sup">
<xsl:text>(</xsl:text>
<xsl:number level="any" count="//tei:choice[child::tei:orig and child::tei:reg] | //tei:note | //tei:choice[child::tei:sic and child::tei:corr] | //tei:choice[child::tei:unclear]"/>
<xsl:text>)</xsl:text>
</xsl:element>
</xsl:element>
</xsl:element>
</xsl:template>
<xsl:template match="tei:choice[child::tei:unclear]" mode="modals">
<xsl:variable name="apparatus">
<xsl:element name="span">
<xsl:element name="span">
<xsl:attribute name="class">mb-1 lemma-line</xsl:attribute>
<xsl:element name="span">
<xsl:attribute name="class">app-unclear</xsl:attribute>
<xsl:apply-templates select="child::tei:unclear[2]"/>
<xsl:text> (lecture alternative)</xsl:text>
</xsl:element>
</xsl:element>
</xsl:element>
</xsl:variable>
<span class="popover-content d-none" id="{generate-id()}">
<xsl:copy-of select="$apparatus"/>
</span>
</xsl:template>
<!-- del ! -->
<xsl:template match="tei:del">
<xsl:element name="a">
<xsl:attribute name="class">ed-deletion</xsl:attribute>
<xsl:attribute name="data-toggle">tooltip</xsl:attribute>
<xsl:attribute name="data-placement">top</xsl:attribute>
<xsl:attribute name="title">Suppression</xsl:attribute>
<xsl:element name="span">
<xsl:attribute name="class">scribe-deletion</xsl:attribute>
<xsl:apply-templates/>
</xsl:element>
</xsl:element>
</xsl:template>
<!-- div -->
<xsl:template match="tei:div[@type='fable']">
<xsl:element name="div">
<xsl:attribute name="class">row</xsl:attribute>
<xsl:element name="div">
<xsl:attribute name="class">col-1 font-weight-bold</xsl:attribute>
<xsl:if test="@type">
<xsl:value-of select="concat(upper-case(substring(@type,1,1)), substring(@type, 2),' '[not(last())] )"/>
<xsl:text> </xsl:text>
</xsl:if>
<xsl:if test="@n">
<xsl:value-of select="@n"/>
</xsl:if>
</xsl:element>
<xsl:element name="div">
<xsl:attribute name="class">col-5 text-center</xsl:attribute>
<xsl:apply-templates select="node() except tei:pb"/>
</xsl:element>
<xsl:element name="div">
<xsl:attribute name="class">col-6</xsl:attribute>
<xsl:call-template name="facsimiles"/>
</xsl:element>
</xsl:element>
<xsl:if test="./following-sibling::tei:div[@type='fable']">
<xsl:element name="hr"/>
</xsl:if>
</xsl:template>
<!-- docAuthor -->
<xsl:template match="tei:docAuthor">
<xsl:element name="span">
<xsl:call-template name="rendition"/>
<xsl:apply-templates/>
</xsl:element>
</xsl:template>
<!-- docDate -->
<xsl:template match="tei:docDate">
<xsl:element name="span">
<xsl:call-template name="rendition"/>
<xsl:apply-templates/>
</xsl:element>
</xsl:template>
<!-- docImprint -->
<xsl:template match="tei:docImprint">
<xsl:element name="span">
<xsl:call-template name="rendition"/>
<xsl:apply-templates/>
</xsl:element>
</xsl:template>
<!-- F ! -->
<!-- figure -->
<xsl:template match="tei:figure">
<xsl:element name="div">
<xsl:apply-templates select="tei:graphic"/>
<xsl:if test="child::tei:desc">
<xsl:element name="p">
<xsl:attribute name="class">font-italic</xsl:attribute>
<xsl:apply-templates select="child::tei:desc"/>
</xsl:element>
</xsl:if>
</xsl:element>
</xsl:template>
<!-- foreign ! -->
<xsl:template match="tei:foreign">
<xsl:element name="span">
<xsl:attribute name="class">
<xsl:text>translit </xsl:text>
<xsl:value-of select="@xml:lang"/>
</xsl:attribute>
<xsl:attribute name="class">font-italic</xsl:attribute>
<xsl:apply-templates/>
</xsl:element>
</xsl:template>
<!-- front -->
<xsl:template match="tei:front">
<xsl:element name="div">
<xsl:attribute name="class">row</xsl:attribute>
<xsl:element name="div">
<xsl:attribute name="class">col-1 font-weight-bold</xsl:attribute>
<xsl:text>Page de titre</xsl:text>
</xsl:element>
<xsl:element name="div">
<xsl:attribute name="class">col-5</xsl:attribute>
<xsl:element name="p">
<xsl:apply-templates select="tei:titlePage/child::*"/>
</xsl:element>
</xsl:element>
<xsl:element name="div">
<xsl:attribute name="class">col-6</xsl:attribute>
<xsl:if test="tei:titlePage/@facs">
<xsl:element name="img">
<xsl:attribute name="src">
<xsl:value-of select="tei:titlePage/@facs"/>
</xsl:attribute>
<xsl:attribute name="class">
<xsl:text>img-fluid</xsl:text>
</xsl:attribute>
<xsl:attribute name="alt">
<xsl:text>Image de la page </xsl:text>
<xsl:value-of select="@n"/>
<xsl:text> de l'édition de la Fontaine</xsl:text>
</xsl:attribute>
</xsl:element>
</xsl:if>
</xsl:element>
</xsl:element>
<xsl:element name="hr"/>
</xsl:template>
<!-- fw ! -->
<xsl:template match="tei:fw">
<xsl:element name="p">
<xsl:attribute name="class">text-muted form-work
<xsl:choose>
<xsl:when test="@place='top-left'">
<xsl:text> float-left</xsl:text>
</xsl:when>
<xsl:when test="@place='top-center'">
<xsl:text> text-center</xsl:text>
</xsl:when>
<xsl:when test="@place='top-right'">
<xsl:text> float-right</xsl:text>
</xsl:when>
<xsl:when test="@place='bot-right'">
<xsl:text> text-right</xsl:text>
</xsl:when>
</xsl:choose>
<xsl:if test="@type='head'">
<xsl:text> font-weight-bold header</xsl:text>
</xsl:if>
<xsl:if test="@type='sig'">
<xsl:text> font-italic sig</xsl:text>
</xsl:if>
</xsl:attribute>
<xsl:apply-templates/>
</xsl:element>
</xsl:template>
<!-- G ! -->
<!-- g -->
<xsl:template match="tei:g">
<xsl:element name="span">
<xsl:attribute name="class">symbol</xsl:attribute>
<xsl:apply-templates/>
</xsl:element>
</xsl:template>
<!-- gap -->
<xsl:template match="tei:gap">
<xsl:choose>
<xsl:when test="@reason='omitted'"/>
<xsl:when test="@reason='lost' and not(@quantity or @unity)"/>
<xsl:otherwise>
<xsl:element name="span">
<xsl:attribute name="class">gap</xsl:attribute>
<xsl:choose>
<xsl:when test="@quantity and @unit">
<xsl:if test="@precision='low'">
<xsl:text>ca. </xsl:text>
</xsl:if>
<xsl:value-of select="@quantity"/>
<xsl:if test="@unit='character'">
<xsl:choose>
<xsl:when test="@reason='lost'">
<xsl:text>+</xsl:text>
</xsl:when>
<xsl:when test="@reason='illegible'">
<xsl:text>×</xsl:text>
</xsl:when>
<xsl:when test="@reason='undefined'">
<xsl:text>*</xsl:text>
</xsl:when>
</xsl:choose>
</xsl:if>
</xsl:when>
<xsl:when test="@extent">
<xsl:text>...</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>...</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:element>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- graphic -->
<xsl:template match="tei:graphic">
<xsl:choose>
<xsl:when test="@url">
<xsl:element name="img">
<xsl:attribute name="src">
<xsl:value-of select="@url"/>
</xsl:attribute>
<xsl:attribute name="class">
<xsl:text>img-fluid</xsl:text>
</xsl:attribute>
<xsl:attribute name="alt">
<xsl:text>Image de la page </xsl:text>
<xsl:value-of select="@n"/>
<xsl:text> de l'édition de la Fontaine</xsl:text>
</xsl:attribute>
</xsl:element>
</xsl:when>
<xsl:otherwise>
<xsl:element name="span">
<xsl:text>Emplacement d'une image</xsl:text>
</xsl:element>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- H ! -->
<!-- head ! -->
<xsl:template match="tei:head">
<xsl:element name="p">
<xsl:attribute name="class">font-weight-bold</xsl:attribute>
<xsl:apply-templates/>
</xsl:element>
</xsl:template>
<!-- hi ! -->
<xsl:template match="tei:hi">
<xsl:choose>
<xsl:when test="@rend='superscript'">
<xsl:element name="sup">
<xsl:attribute name="class">ed-siglum</xsl:attribute>
<xsl:apply-templates/>
</xsl:element>
</xsl:when>
<xsl:when test="@rend='subscript'">
<xsl:element name="sub">
<xsl:attribute name="class">ed-siglum</xsl:attribute>
<xsl:apply-templates/>
</xsl:element>
</xsl:when>
<xsl:when test="@rend='bold'">
<xsl:element name="span">
<xsl:attribute name="class">font-weight-bold</xsl:attribute>
<xsl:apply-templates/>
</xsl:element>
</xsl:when>
<xsl:when test="@rend='italic'">
<xsl:element name="span">
<xsl:attribute name="class">font-italic</xsl:attribute>
<xsl:apply-templates/>
</xsl:element>
</xsl:when>
</xsl:choose>
</xsl:template>
<!-- imprimatur -->
<xsl:template match="tei:imprimatur">
<xsl:element name="span">
<xsl:call-template name="rendition"/>
<xsl:apply-templates/>
</xsl:element>
</xsl:template>
<!-- l ! -->
<xsl:template match="tei:l">
<xsl:element name="span">
<xsl:attribute name="class">
<xsl:text>vers</xsl:text>
</xsl:attribute>
<!-- <xsl:element name="sup">
<xsl:attribute name="class">text-muted float-left</xsl:attribute>
<xsl:value-of select="@n"/>
</xsl:element>-->
<xsl:apply-templates/>
</xsl:element>
<br/>
</xsl:template>
<!-- lb-->
<xsl:template match="tei:lb[ancestor-or-self::tei:front]">
<!-- <xsl:element name="span">
<xsl:attribute name="class">text-muted lineation</xsl:attribute>
<xsl:value-of select="@n"/>
</xsl:element>-->
<br/>
</xsl:template>
<!-- lg ! -->
<xsl:template match="tei:lg">
<xsl:element name="div">
<xsl:attribute name="class">lg text-center</xsl:attribute>
<xsl:apply-templates/>
</xsl:element>
</xsl:template>
<!-- List -->
<xsl:template match="tei:list">
<xsl:element name="ul">
<xsl:attribute name="class">list-unstyle</xsl:attribute>
<xsl:for-each select="child::tei:item">
<xsl:element name="li">
<xsl:apply-templates/>
</xsl:element>
</xsl:for-each>
</xsl:element>
</xsl:template>
<!-- pb ! -->
<xsl:template name="facsimiles">
<xsl:for-each select="//tei:pb">
<xsl:element name="img">
<xsl:attribute name="src">
<xsl:value-of select="@facs"/>
</xsl:attribute>
<xsl:attribute name="class">
<xsl:text>img-fluid</xsl:text>
</xsl:attribute>
<xsl:attribute name="alt">
<xsl:text>Image de la page </xsl:text>
<xsl:value-of select="@n"/>
<xsl:text> de l'édition de la Fontaine</xsl:text>
</xsl:attribute>
</xsl:element>
</xsl:for-each>
</xsl:template>
<!-- P ! -->
<!-- persName ! -->
<xsl:template match="tei:persName">
<xsl:element name="span">
<xsl:attribute name="class">indexable</xsl:attribute>
<xsl:apply-templates/>
<xsl:element name="sup">
<xsl:text>👤</xsl:text>
</xsl:element>
</xsl:element>
</xsl:template>
<!-- placeName ! -->
<xsl:template match="tei:placeName">
<xsl:element name="span">
<xsl:attribute name="class">indexable</xsl:attribute>
<xsl:apply-templates/>
<xsl:element name="sup">
<xsl:attribute name="class">indexable</xsl:attribute>
<xsl:text>🧭</xsl:text>
</xsl:element>
</xsl:element>
</xsl:template>
<!-- Q ! -->
<!-- q ! -->
<xsl:template match="tei:q">
<xsl:choose>
<xsl:when test="@rend='block'">
<xsl:element name="span">
<xsl:attribute name="class">block</xsl:attribute>
<xsl:apply-templates/>
</xsl:element>
</xsl:when>
<xsl:otherwise>
<xsl:text>‘</xsl:text>
<xsl:apply-templates/>
<xsl:text>’</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- quote ! -->
<xsl:template match="tei:quote">
<xsl:choose>
<xsl:when test="@rend='block'">
<xsl:element name="span">
<xsl:attribute name="class">block</xsl:attribute>
<xsl:apply-templates/>
</xsl:element>
</xsl:when>
<xsl:otherwise>
<xsl:text>“</xsl:text>
<xsl:apply-templates/>
<xsl:text>”</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- R ! -->
<xsl:template match="tei:ref">
<xsl:element name="a">
<xsl:attribute name="href">
<xsl:value-of select="@target"/>
</xsl:attribute>
<xsl:apply-templates/>
</xsl:element>
</xsl:template>
<!-- sp ! -->
<xsl:template match="tei:sp">
<xsl:element name="div">
<xsl:attribute name="class">row sp</xsl:attribute>
<xsl:element name="div">
<xsl:attribute name="class">col-sm-3</xsl:attribute>
<xsl:apply-templates mode="bypass" select="tei:speaker"/>
</xsl:element>
<xsl:element name="div">
<xsl:attribute name="class">col-sm-9</xsl:attribute>
<xsl:apply-templates/>
</xsl:element>
</xsl:element>
</xsl:template>
<!-- speaker ! -->
<xsl:template match="tei:speaker"/>
<xsl:template match="tei:speaker" mode="bypass">
<xsl:element name="span">
<xsl:attribute name="class">speaker san</xsl:attribute>
<xsl:apply-templates/>
</xsl:element>
</xsl:template>
<!-- stage ! -->
<!-- case one: it is not contained within a character’s
lines ! -->
<xsl:template match="tei:stage[not(ancestor::tei:sp)]">
<xsl:element name="div">
<xsl:attribute name="class">row</xsl:attribute>
<xsl:element name="div">
<xsl:attribute name="class">col-sm-12 clearfix</xsl:attribute>
<xsl:element name="p">
<xsl:attribute name="class">
<xsl:text>stage san text-center</xsl:text>
<xsl:if test="@type = 'division'"> stage-division</xsl:if>
</xsl:attribute>
<xsl:apply-templates/>
</xsl:element>
</xsl:element>
</xsl:element>
</xsl:template>
<!-- case two: it is contained within a characters’ lines ! -->
<xsl:template match="tei:sp//tei:stage">
<xsl:element name="span">
<xsl:attribute name="class">
<xsl:text>stage san stage-sp</xsl:text>
</xsl:attribute>
<xsl:apply-templates/>
</xsl:element>
</xsl:template>
<!-- space ! -->
<!-- transformation à mettre à jour -->
<xsl:template match="tei:space">
<xsl:text>_SPACE_</xsl:text>
</xsl:template>
<!-- subst ! -->
<xsl:template match="tei:subst">
<xsl:element name="span">
<xsl:attribute name="class">ed-insertion</xsl:attribute>
<xsl:apply-templates select="child::tei:del"/>
<xsl:value-of select="child::tei:add"/>
</xsl:element>
</xsl:template>
<!-- supplied ! -->
<xsl:template match="tei:supplied">
<xsl:element name="span">
<xsl:attribute name="class">text-muted supplied</xsl:attribute>
<xsl:attribute name="data-toggle">tooltip</xsl:attribute>
<xsl:attribute name="data-placement">top</xsl:attribute>
<xsl:attribute name="title">Ajouté par l'éditeur</xsl:attribute>
<xsl:choose>
<xsl:when test="@reason='omitted'">
<xsl:element name="span">
<xsl:attribute name="class">omitted</xsl:attribute>
<xsl:apply-templates/>
</xsl:element>
</xsl:when>
<xsl:when test="@reason='lost' or @reason='illegible'">
<xsl:element name="span">
<xsl:attribute name="class">lost-illegible</xsl:attribute>
<xsl:apply-templates/>
<xsl:if test="@cert='low'">
<xsl:text>?</xsl:text>
</xsl:if>
</xsl:element>
</xsl:when>
<xsl:when test="@reason='subaudible'">
<xsl:element name="span">
<xsl:attribute name="class">subaudible</xsl:attribute>
<xsl:apply-templates/>
<xsl:if test="@cert='low'">
<xsl:text>?</xsl:text>
</xsl:if>
</xsl:element>
</xsl:when>
<xsl:when test="@reason='explanation'">
<xsl:element name="span">
<xsl:attribute name="class">explanation</xsl:attribute>
<xsl:apply-templates/>
<xsl:if test="@cert='low'">
<xsl:text>?</xsl:text>
</xsl:if>
</xsl:element>
</xsl:when>
</xsl:choose>
</xsl:element>
</xsl:template>
<!-- surplus ! -->
<xsl:template match="tei:surplus">
<xsl:element name="span">
<xsl:attribute name="class">surplus</xsl:attribute>
<xsl:apply-templates/>
</xsl:element>
</xsl:template>
<!-- teiHeader ! -->
<xsl:template match="tei:teiHeader">
<xsl:element name="div">
<xsl:attribute name="class">row</xsl:attribute>
<xsl:element name="div">
<xsl:attribute name="class">col text-center my-5</xsl:attribute>
<xsl:choose>
<xsl:when test="@*">
<xsl:element name="h1">
<xsl:attribute name="class">display-5</xsl:attribute>
<xsl:value-of select="./tei:fileDesc/tei:titleStmt/tei:title[@type='main']"/>
</xsl:element>
<xsl:element name="h2">
<xsl:attribute name="class">display-5</xsl:attribute>
<xsl:value-of select="./tei:fileDesc/tei:titleStmt/tei:title[@type='sub']"/>
</xsl:element>
</xsl:when>
<xsl:otherwise>
<xsl:element name="h1">
<xsl:attribute name="class">display-5</xsl:attribute>
<xsl:apply-templates select="./tei:fileDesc/tei:titleStmt/tei:title"/>
</xsl:element>
</xsl:otherwise>
</xsl:choose>
<xsl:if test="tei:fileDesc/tei:titleStmt/tei:author">
<xsl:element name="p">
<xsl:attribute name="class">mb-3</xsl:attribute>
</xsl:element>
<xsl:element name="h1">
<xsl:attribute name="class">display-6</xsl:attribute>
<xsl:value-of select="tei:fileDesc/tei:titleStmt/tei:author"/>
</xsl:element>
</xsl:if>
<xsl:if test="tei:fileDesc/tei:titleStmt/tei:editor">
<xsl:element name="h1">
<xsl:attribute name="class">display-6</xsl:attribute>
<xsl:for-each select="tei:fileDesc/tei:titleStmt/tei:editor">
<xsl:choose>
<xsl:when test="position()= 1">
<xsl:text>Édition réalisée par </xsl:text>
</xsl:when>
<xsl:when test="position()=last()">
<xsl:text> & </xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>, </xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="normalize-space(.)"/>
</xsl:for-each>
</xsl:element>
</xsl:if>
<xsl:if test="not(tei:fileDesc/tei:titleStmt/tei:editor)">
<xsl:element name="h1">
<xsl:attribute name="class">display-6</xsl:attribute>
<xsl:for-each select="tei:fileDesc/tei:titleStmt/tei:respStmt/tei:persName">
<xsl:choose>
<xsl:when test="position()= 1">
<xsl:text>Édition réalisée par </xsl:text>
</xsl:when>
<xsl:when test="position()=last()">
<xsl:text> & </xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>, </xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="normalize-space(.)"/>
</xsl:for-each>
</xsl:element>
</xsl:if>
</xsl:element>
</xsl:element>
</xsl:template>
<!-- term ! -->
<xsl:template match="tei:term">
<xsl:element name="span">
<xsl:attribute name="class">term font-weight-bold</xsl:attribute>
<xsl:apply-templates/>
</xsl:element>
</xsl:template>
<!-- title ! -->
<xsl:template match="tei:title">
<xsl:element name="span">
<xsl:attribute name="class">title font-italic</xsl:attribute>
<xsl:apply-templates/>
</xsl:element>
</xsl:template>
<!-- titlePart ! -->
<xsl:template match="tei:titlePart">
<xsl:element name="span">
<xsl:call-template name="rendition"/>
<xsl:apply-templates/>
</xsl:element>
</xsl:template>
<!-- U ! -->
<!-- unclear -->
<xsl:template match="tei:unclear[not(parent::tei:choice)]">
<xsl:element name="span">
<xsl:attribute name="class">unclear</xsl:attribute>
<xsl:apply-templates/>
<xsl:if test="@cert='low'">
<xsl:text>?</xsl:text>
</xsl:if>
</xsl:element>
</xsl:template>
<!-- W ! -->
<xsl:template match="tei:w">
<xsl:element name="span">
<xsl:attribute name="class">word</xsl:attribute>
<xsl:apply-templates/>
</xsl:element>
</xsl:template>
<!-- Templates nommés -->
<!-- DHARMA html prolog -->
<xsl:template name="fable-head">
<xsl:variable name="title">
<xsl:if test="//tei:titleStmt/tei:title/text()">
<xsl:if test="//tei:idno[@type='filename']/text()">
<xsl:value-of select="//tei:idno[@type='filename']"/>
<xsl:text>. </xsl:text>
</xsl:if>
<xsl:value-of select="//tei:titleStmt/tei:title"/>
</xsl:if>
</xsl:variable>
<head>
<title>
<xsl:value-of select="$title"/>
</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS local -->
<link rel="stylesheet" href="../assets/css/bootstrap.min.css"></link>
<link rel="stylesheet" href="../assets/css/fable-style.css"></link>
</meta>
</head>
</xsl:template>
<!-- scripts -->
<xsl:template name="fable-script">
<!-- <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"/>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"/> -->
<script src="../assets/js/jquery-3.6.0.min.js"></script>
<script src="../assets/js/popper.min.js"></script>
<script src="../assets/js/bootstrap.min.js"></script>
<script src="../assets/js/loader.js"></script>
</xsl:template>
<xsl:template name="tab-metadata">
<xsl:element name="div">
<xsl:attribute name="class">tab-pane fade</xsl:attribute>
<xsl:attribute name="id">metadata</xsl:attribute>
<xsl:attribute name="role">tabpanel</xsl:attribute>
<xsl:attribute name="aria-labelledby">metadata-tab</xsl:attribute>
<xsl:element name="h4">Métadonnées de l'édition</xsl:element>
<xsl:element name="ul">
<xsl:element name="li">
<xsl:element name="b">
<xsl:text>Title</xsl:text>
</xsl:element>
<xsl:text>: </xsl:text>
<xsl:choose>
<xsl:when test="//tei:title/@*">
<xsl:apply-templates select="//tei:title[@type='main']"/>
<xsl:text>. </xsl:text>
<xsl:apply-templates select="//tei:title[@type='sub']"/>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="//tei:titleStmt/tei:title"/>
</xsl:otherwise>
</xsl:choose>
</xsl:element>
<xsl:element name="li">
<xsl:element name="b">
<xsl:text>Identifiant du texte</xsl:text>
</xsl:element>
<xsl:text>: </xsl:text>
<xsl:value-of select="//tei:idno[@type='filename']"/>
</xsl:element>
<xsl:element name="li">
<xsl:choose>
<xsl:when test="//tei:titleStmt[1]/tei:editor">
<xsl:for-each select="//tei:titleStmt[1]/tei:editor">
<xsl:choose>
<xsl:when test="position()= 1">
<xsl:element name="b">
<xsl:text>Édition réalisée par </xsl:text>
</xsl:element>
</xsl:when>
<xsl:when test="position()=last()">
<xsl:text> & </xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>, </xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="normalize-space(.)"/>
</xsl:for-each>
</xsl:when>
<xsl:when test="not(//tei:titleStmt[1]/tei:editor)">
<xsl:for-each select="//tei:titleStmt[1]/tei:respStmt/tei:persName">
<xsl:choose>
<xsl:when test="position()= 1">
<xsl:element name="b">
<xsl:text>Édition réalisée par </xsl:text>
</xsl:element>
</xsl:when>
<xsl:when test="position()=last()">
<xsl:text> & </xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>, </xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="normalize-space(.)"/>
</xsl:for-each>
</xsl:when>
</xsl:choose>
</xsl:element>
<xsl:element name="li">
<xsl:value-of select="replace(//tei:fileDesc/tei:publicationStmt//tei:licence/tei:p[2], '\(c\)', '©')"/>
</xsl:element>
</xsl:element>
<xsl:if test="//tei:projectDesc/tei:p">
<xsl:apply-templates select="//tei:projectDesc/tei:p"/>
</xsl:if>
</xsl:element>
</xsl:template>
<xsl:template name="tab-source">
<xsl:element name="div">
<xsl:attribute name="class">tab-pane active</xsl:attribute>
<xsl:attribute name="id">witnesses</xsl:attribute>
<xsl:attribute name="role">tabpanel</xsl:attribute>
<xsl:attribute name="aria-labelledby">witnesses-tab</xsl:attribute>
<xsl:element name="h4">Informations sur la source</xsl:element>
<xsl:element name="ul">
<xsl:if test="//tei:sourceDesc/tei:biblStruct//text()">
<xsl:element name="li">
<xsl:element name="b">
<xsl:text>Ouvrage</xsl:text>
</xsl:element>
<xsl:text>: </xsl:text>
<xsl:element name="ul">
<xsl:if test="//tei:sourceDesc/tei:biblStruct/tei:monogr/tei:title">
<xsl:element name="li">
<xsl:element name="b">
<xsl:text>Titre</xsl:text>
</xsl:element>
<xsl:text>: </xsl:text>
<xsl:apply-templates select="//tei:sourceDesc/tei:biblStruct/tei:monogr/tei:title"/>
</xsl:element>
</xsl:if>
<xsl:if test="//tei:sourceDesc/tei:biblStruct/tei:monogr/tei:author">
<xsl:element name="li">
<xsl:element name="b">
<xsl:text>Auteur</xsl:text>
</xsl:element>
<xsl:text>: </xsl:text>
<xsl:apply-templates select="//tei:sourceDesc/tei:biblStruct/tei:monogr/tei:author"/>
</xsl:element>
</xsl:if>
<xsl:if test="//tei:sourceDesc/tei:biblStruct/tei:monogr/tei:imprint">
<xsl:element name="li">
<xsl:element name="b">
<xsl:text>Éditeur</xsl:text>
</xsl:element>
<xsl:text>: </xsl:text>
<xsl:apply-templates select="//tei:sourceDesc/tei:biblStruct/tei:monogr/tei:imprint/tei:publisher"/>
<xsl:text>, </xsl:text>
<xsl:apply-templates select="//tei:sourceDesc/tei:biblStruct/tei:monogr/tei:imprint/tei:pubPlace"/>
</xsl:element>
</xsl:if>
<xsl:if test="//tei:sourceDesc/tei:biblStruct/tei:monogr/tei:imprint/tei:date">
<xsl:element name="li">
<xsl:element name="b">
<xsl:text>Date</xsl:text>
</xsl:element>
<xsl:text>: </xsl:text>
<xsl:apply-templates select="//tei:sourceDesc/tei:biblStruct/tei:monogr/tei:imprint/tei:date"/>
</xsl:element>
</xsl:if>
</xsl:element>
</xsl:element>
</xsl:if>
</xsl:element>
</xsl:element>
</xsl:template>
<xsl:template name="table">
<xsl:element name="div">
<xsl:attribute name="class">row wrapper</xsl:attribute>
<xsl:element name="ul">
<xsl:attribute name="class">nav nav-tabs nav-justified</xsl:attribute>
<xsl:attribute name="id">tab</xsl:attribute>
<xsl:attribute name="role">tablist</xsl:attribute>
<xsl:element name="li">
<xsl:attribute name="class">nav-item</xsl:attribute>
<xsl:attribute name="role">presentation</xsl:attribute>
<xsl:element name="a">
<xsl:attribute name="class">nav-link active</xsl:attribute>
<xsl:attribute name="id">witnesses-tab</xsl:attribute>
<xsl:attribute name="data-toggle">tab</xsl:attribute>
<xsl:attribute name="href">#witnesses</xsl:attribute>
<xsl:attribute name="role">tab</xsl:attribute>
<xsl:attribute name="aria-controls">witnesses</xsl:attribute>
<xsl:attribute name="aria-selected">true</xsl:attribute>
<xsl:element name="div">
<xsl:attribute name="class">panel</xsl:attribute>
<xsl:text>Source</xsl:text>
</xsl:element>
</xsl:element>
</xsl:element>
<xsl:element name="li">
<xsl:attribute name="class">nav-item</xsl:attribute>
<xsl:attribute name="role">presentation</xsl:attribute>
<xsl:element name="a">
<xsl:attribute name="class">nav-link</xsl:attribute>
<xsl:attribute name="id">metadata-tab</xsl:attribute>
<xsl:attribute name="data-toggle">tab</xsl:attribute>
<xsl:attribute name="href">#metadata</xsl:attribute>
<xsl:attribute name="role">tab</xsl:attribute>
<xsl:attribute name="aria-controls">metadata</xsl:attribute>
<xsl:attribute name="aria-selected">false</xsl:attribute>
<xsl:element name="div">
<xsl:attribute name="class">panel</xsl:attribute>
<xsl:text>Métadonnées</xsl:text>
</xsl:element>
</xsl:element>
</xsl:element>
</xsl:element>
<xsl:element name="div">
<xsl:attribute name="class">tab-content</xsl:attribute>
<xsl:call-template name="tab-source"/>
<xsl:call-template name="tab-metadata"/>
</xsl:element>
</xsl:element>
</xsl:template>
<xsl:template name="rendition">
<xsl:choose>
<xsl:when test="@rend='bold'">
<xsl:attribute name="class">font-weight-bold</xsl:attribute>
</xsl:when>
<xsl:when test="@rend='italic'">
<xsl:attribute name="class">font-italic</xsl:attribute>
</xsl:when>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
| 44.406661 | 250 | 0.462639 |
2d04370bbd6937a5029df998d6533d77e59cc81a | 13,872 | xsl | XSLT | pso-epub-core/src/main/resources/org/pageseeder/epub/xslt/export/content.xsl | pageseeder/epub | 03f9d0a81ba8f8508ba5566918e7d17276bbc17f | [
"Apache-2.0"
] | null | null | null | pso-epub-core/src/main/resources/org/pageseeder/epub/xslt/export/content.xsl | pageseeder/epub | 03f9d0a81ba8f8508ba5566918e7d17276bbc17f | [
"Apache-2.0"
] | null | null | null | pso-epub-core/src/main/resources/org/pageseeder/epub/xslt/export/content.xsl | pageseeder/epub | 03f9d0a81ba8f8508ba5566918e7d17276bbc17f | [
"Apache-2.0"
] | null | null | null | <!--
This is the default template to import an EPUB as PSML.
@author Christophe Lauret
@version 18 February 2013
-->
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:root="urn:oasis:names:tc:opendocument:xmlns:container" xmlns:opf="http://www.idpf.org/2007/opf"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:fn="http://www.pageseeder.com/function" exclude-result-prefixes="#all">
<!--
Main document for transformations from epub to PSML/psxml formats
-->
<xsl:variable name="inline">
<xsl:for-each select="$configDoc/config/inline/element/@psml">
<xsl:choose>
<xsl:when test="position() = last()">
<xsl:value-of select="." />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat(.,'|')" />
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</xsl:variable>
<xsl:variable name="block">
<xsl:for-each select="$configDoc/config/block/element/@psml">
<xsl:choose>
<xsl:when test="position() = last()">
<xsl:value-of select="." />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat(.,'|')" />
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</xsl:variable>
<xsl:variable name="table">
<xsl:for-each select="$configDoc/config/table/element/@psml">
<xsl:choose>
<xsl:when test="position() = last()">
<xsl:value-of select="." />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat(.,'|')" />
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</xsl:variable>
<xsl:variable name="lists">
<xsl:for-each select="$configDoc/config/lists/element/@psml">
<xsl:choose>
<xsl:when test="position() = last()">
<xsl:value-of select="." />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat(.,'|')" />
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</xsl:variable>
<!-- Match the root -->
<xsl:template natch="/" mode="content">
</xsl:template>
<xsl:template match="document" mode="content">
<xsl:choose>
<xsl:when test="not(ancestor::document)">
<xhtml:html>
<xhtml:head/>
<xhtml:body>
<xsl:apply-templates mode="content" />
</xhtml:body>
</xhtml:html>
</xsl:when>
<xsl:when test="$configDoc/config/split">
<xhtml:html>
<xhtml:head/>
<xhtml:body>
<xsl:apply-templates mode="content" />
</xhtml:body>
</xhtml:html>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates mode="content" />
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!--##properties##-->
<xsl:template match="xref-fragment" mode="content">
<xsl:apply-templates mode="content" />
</xsl:template>
<!--##section##-->
<xsl:template match="section" mode="content">
<xhtml:div>
<xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
<xsl:apply-templates mode="content" />
</xhtml:div>
</xsl:template>
<xsl:template match="fragment" mode="content">
<xsl:apply-templates mode="content" />
</xsl:template>
<!-- Breaks are transformed into breaks -->
<xsl:template match="br" mode="content">
<xhtml:br />
<xsl:apply-templates mode="content" />
</xsl:template>
<!-- Each div is transformed into a paraLabel with the class of the div set as the paraLabel name -->
<xsl:template match="block" mode="content">
<xhtml:div class="{@label}">
<xsl:apply-templates mode="content" />
</xhtml:div>
</xsl:template>
<!-- Headings -->
<!-- <xsl:template match="heading[@level = '1']" mode="content"> -->
<!-- <xhtml:h1> -->
<!-- <xsl:apply-templates mode="content" /> -->
<!-- </xhtml:h1> -->
<!-- </xsl:template> -->
<!-- <xsl:template match="heading[@level = '2']" mode="content"> -->
<!-- <xhtml:h2> -->
<!-- <xsl:apply-templates mode="content" /> -->
<!-- </xhtml:h2> -->
<!-- </xsl:template> -->
<!-- <xsl:template match="heading[@level = '3']" mode="content"> -->
<!-- <xhtml:h3> -->
<!-- <xsl:apply-templates mode="content" /> -->
<!-- </xhtml:h3> -->
<!-- </xsl:template> -->
<!-- <xsl:template match="heading[@level = '4']" mode="content"> -->
<!-- <xhtml:h4> -->
<!-- <xsl:apply-templates mode="content" /> -->
<!-- </xhtml:h4> -->
<!-- </xsl:template> -->
<!-- <xsl:template match="heading[@level = '5']" mode="content"> -->
<!-- <xhtml:h5> -->
<!-- <xsl:apply-templates mode="content" /> -->
<!-- </xhtml:h5> -->
<!-- </xsl:template> -->
<!-- <xsl:template match="heading[@level = '6']" mode="content"> -->
<!-- <xhtml:h6> -->
<!-- <xsl:apply-templates mode="content" /> -->
<!-- </xhtml:h6> -->
<!-- </xsl:template> -->
<!-- Span element is transformed into inlineLabel and the class is the name of the inlineLabel -->
<xsl:template match="inline" mode="content">
<xhtml:span class="{@label}">
<xsl:apply-templates mode="content" />
</xhtml:span>
</xsl:template>
<!-- element p is transformed into a para except when it has a class, in which case it is transformed into a paraLabel -->
<xsl:template match="xhtml:para" mode="content">
<p>
<xsl:apply-templates mode="content" />
</p>
</xsl:template>
<!-- Element table is a table -->
<xsl:template match="table" mode="content">
<xhtml:table>
<xsl:apply-templates mode="content" />
</xhtml:table>
</xsl:template>
<!-- Element tr is a row -->
<xsl:template match="row" mode="content">
<xhtml:tr>
<xsl:apply-templates mode="content" />
</xhtml:tr>
</xsl:template>
<!-- element td is a cell; if there is an element div inside of the cell, the element is transformed into a paraLabel ( see match="xhtml:div"); -->
<!-- otherwise all content is placed inside of a para -->
<xsl:template match="cell" mode="content">
<xhtml:td>
<xsl:apply-templates mode="content" select="." />
</xhtml:td>
</xsl:template>
<!-- Formatting -->
<!-- <xsl:template match="bold" mode="content"> -->
<!-- <xhtml:b> -->
<!-- <xsl:apply-templates mode="content" /> -->
<!-- </xhtml:b> -->
<!-- </xsl:template> -->
<!-- <xsl:template match="italic" mode="content"> -->
<!-- <xhtml:i> -->
<!-- <xsl:apply-templates mode="content" /> -->
<!-- </xhtml:i> -->
<!-- </xsl:template> -->
<!-- <xsl:template match="sub" mode="content"> -->
<!-- <xhtml:sub> -->
<!-- <xsl:apply-templates mode="content" /> -->
<!-- </xhtml:sub> -->
<!-- </xsl:template> -->
<!-- <xsl:template match="sup" mode="content"> -->
<!-- <xhtml:sup> -->
<!-- <xsl:apply-templates mode="content" /> -->
<!-- </xhtml:sup> -->
<!-- </xsl:template> -->
<!-- <xsl:template match="underline" mode="content"> -->
<!-- <xhtml:u> -->
<!-- <xsl:apply-templates mode="content" /> -->
<!-- </xhtml:u> -->
<!-- </xsl:template> -->
<!-- <xsl:template match="code" mode="content"> -->
<!-- <xhtml:code> -->
<!-- <xsl:apply-templates mode="content" /> -->
<!-- </xhtml:code> -->
<!-- </xsl:template> -->
<!-- Lists -->
<!-- <xsl:template match="list" mode="content"> -->
<!-- <xhtml:ul> -->
<!-- <xsl:apply-templates mode="content" /> -->
<!-- </xhtml:ul> -->
<!-- </xsl:template> -->
<!-- <xsl:template match="nlist" mode="content"> -->
<!-- <xhtml:ol> -->
<!-- <xsl:apply-templates mode="content" /> -->
<!-- </xhtml:ol> -->
<!-- </xsl:template> -->
<!-- <xsl:template match="item" mode="content"> -->
<!-- <xhtml:li> -->
<!-- <xsl:apply-templates mode="content" /> -->
<!-- </xhtml:li> -->
<!-- </xsl:template> -->
<xsl:template match="text()" mode="content">
<xsl:copy-of select="." />
</xsl:template>
<!-- Element img is transformed into graphic. if it has a class, a paraLabel is created with the image inside-->
<xsl:template match="image" mode="content">
<xhtml:img>
<xsl:if test="@width and @width != ''">
<xsl:attribute name="width" select="@width" />
</xsl:if>
<xsl:if test="@height and @height != ''">
<xsl:attribute name="height" select="@height" />
</xsl:if>
<xsl:attribute name="src" select="@src" />
</xhtml:img>
</xsl:template>
<!-- element a is transformed into link; if the link contains an href, it is a reference to another document; -->
<!-- if it does not contain an href, then it is an anchor -->
<xsl:template match="link" mode="content">
<xhtml:a>
<xsl:attribute name="id" select="@name" />
</xhtml:a>
</xsl:template>
<xsl:template match="xref" mode="content">
<xhtml:a>
<xsl:attribute name="title">
<xsl:choose>
<xsl:when test="@title">
<xsl:value-of select="@title" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="." />
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:choose>
<xsl:when test="@title">
<xsl:value-of select="@title" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="." />
</xsl:otherwise>
</xsl:choose>
</xhtml:a>
</xsl:template>
<xsl:template match="*" mode="content">
<xsl:choose>
<xsl:when test="matches(*/name(),$block)">
<xsl:choose>
<xsl:when test="$configDoc/config/block/element[@psml='name()'][@xhtml='div']">
<xsl:element name="div">
<xsl:attribute name="class"><xsl:value-of select="$configDoc/config/block/element[@psml='name()']/@xhtmlvalue"/></xsl:attribute>
<xsl:apply-templates mode="content" select="." />
</xsl:element>
</xsl:when>
<xsl:when test="$configDoc/config/block/element[@psml='name()'][@xhtml='span']">
<xsl:element name="span">
<xsl:attribute name="class"><xsl:value-of select="$configDoc/config/block/element[@psml='name()']/@xhtmlvalue"/></xsl:attribute>
<xsl:apply-templates mode="content" select="." />
</xsl:element>
</xsl:when>
<xsl:when test="$configDoc/config/block/element[@psml='name()'][@xhtmlvalue!='']">
<xsl:element name="{$configDoc/config/block/element[@xhtml='name()']/@xhtml}">
<xsl:attribute name="class"><xsl:value-of select="$configDoc/config/block/element[@psml='name()']/@xhtmlvalue"/></xsl:attribute>
<xsl:apply-templates mode="content" select="." />
</xsl:element>
</xsl:when>
<xsl:otherwise>
<xsl:element name="{$configDoc/config/block/element[@psml='name()']/@xhtml}">
<xsl:apply-templates mode="content" select="." />
</xsl:element>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:when test="matches(*/name(),$inline)">
<xsl:choose>
<xsl:when test="$configDoc/config/inline/element[@psml='name()'][@xhtml='div']">
<xsl:element name="div">
<xsl:attribute name="class"><xsl:value-of select="$configDoc/config/inline/element[@psml='name()']/@xhtmlvalue"/></xsl:attribute>
<xsl:apply-templates mode="content" select="." />
</xsl:element>
</xsl:when>
<xsl:when test="$configDoc/config/inline/element[@psml='name()'][@xhtml='span']">
<xsl:element name="span">
<xsl:attribute name="class"><xsl:value-of select="$configDoc/config/inline/element[@psml='name()']/@xhtmlvalue"/></xsl:attribute>
<xsl:apply-templates mode="content" select="." />
</xsl:element>
</xsl:when>
<xsl:otherwise>
<xsl:element name="{$configDoc/config/inline/element[@psml='name()']/@psml}">
<xsl:apply-templates mode="content" select="." />
</xsl:element>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:when test="matches(*/name(),$table)">
<xsl:element name="{$configDoc/config/table/element[@psml='name()']/@xhtml}">
<xsl:apply-templates mode="content" select="." />
</xsl:element>
</xsl:when>
<xsl:when test="matches(*/name(),$lists)">
<xsl:element name="{$configDoc/config/lists/element[@psml='name()']/@xhtml}">
<xsl:apply-templates mode="content" select="." />
</xsl:element>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates mode="content" select="." />
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:function name="fn:isLocal">
<xsl:param name="href" />
<xsl:choose>
<xsl:when test="starts-with($href,'http://')">
<xsl:value-of select="false()" />
</xsl:when>
<xsl:when test="starts-with($href,'https://')">
<xsl:value-of select="false()" />
</xsl:when>
<xsl:when test="$href=''">
<xsl:value-of select="false()" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="true()" />
</xsl:otherwise>
</xsl:choose>
</xsl:function>
<xsl:function name="fn:string-before-last-delimiter">
<xsl:param name="string" />
<xsl:param name="delimiter" />
<xsl:analyze-string regex="^(.*)[{$delimiter}][^{$delimiter}]+"
select="$string">
<xsl:matching-substring>
<xsl:value-of select="regex-group(1)" />
</xsl:matching-substring>
</xsl:analyze-string>
</xsl:function>
</xsl:stylesheet>
| 34.083538 | 148 | 0.548587 |
dcb61ecc79d87654bff0f0e562252ca887344769 | 1,218 | xsl | XSLT | src/main/xslt/mjml/wrapper.xsl | clauret/mjml-xslt | 8d54c84eccba87b64fd266251679dbf842e3b17c | [
"Apache-2.0"
] | null | null | null | src/main/xslt/mjml/wrapper.xsl | clauret/mjml-xslt | 8d54c84eccba87b64fd266251679dbf842e3b17c | [
"Apache-2.0"
] | null | null | null | src/main/xslt/mjml/wrapper.xsl | clauret/mjml-xslt | 8d54c84eccba87b64fd266251679dbf842e3b17c | [
"Apache-2.0"
] | null | null | null | <?xml version="1.0" encoding="UTF-8"?>
<!--
Template for the `mj-wrapper`.
-->
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:f="https://tyenki.net/mjml"
exclude-result-prefixes="#all">
<xsl:template match="mj-wrapper" mode="mjml">
<xsl:comment>[if mso | IE]>
<table role="presentation" border="0" cellpadding="0" cellspacing="0" width="600" align="center" style="width:600px;">
<tr>
<td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;">
<![endif]</xsl:comment>
<div style="margin:0px auto;max-width:600px;">
<table role="presentation" cellpadding="0" cellspacing="0" style="font-size:0px;width:100%;" align="center" border="0">
<tbody>
<tr>
<td style="text-align:center;vertical-align:top;direction:ltr;font-size:0px;padding:20px 0px;">
<!-- TODO Handle attributes -->
<xsl:apply-templates mode="mjml"/>
</td>
</tr>
</tbody>
</table>
</div>
<xsl:comment>[if mso | IE]>
</td></tr></table>
<![endif]</xsl:comment>
</xsl:template>
</xsl:stylesheet>
| 34.8 | 123 | 0.606732 |
acfa4f3ea8559ae10a0ed2a0dc55119a03616fae | 21,442 | xsl | XSLT | transform.xsl | dret/draft-geojson | 60cd76009d178c507fbb82a88f9d641e2bbc26fb | [
"CC-BY-3.0"
] | 183 | 2015-01-15T08:35:52.000Z | 2022-02-26T01:38:44.000Z | transform.xsl | dret/draft-geojson | 60cd76009d178c507fbb82a88f9d641e2bbc26fb | [
"CC-BY-3.0"
] | 153 | 2015-01-20T17:28:28.000Z | 2020-11-22T20:43:04.000Z | transform.xsl | dret/draft-geojson | 60cd76009d178c507fbb82a88f9d641e2bbc26fb | [
"CC-BY-3.0"
] | 36 | 2015-03-22T00:42:51.000Z | 2021-10-03T08:53:56.000Z | <?xml version="1.0"?>
<!-- vim: set shiftwidth=1 tabstop=1: -->
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:exsl="http://exslt.org/common" version="1.0"
extension-element-prefixes="exsl">
<!--
(c) Miek Gieben 2013, Licensed under the GPL version 2.
-->
<xsl:output method="xml" omit-xml-declaration="yes"/>
<xsl:variable name="smallcase" select="'abcdefghijklmnopqrstuvwxyz'"/>
<xsl:variable name="uppercase" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"/>
<xsl:variable name="ure" select="'igure: '"/>
<xsl:variable name="Fig" select="concat('@F', $ure)"/>
<xsl:variable name="fig" select="concat('@f', $ure)"/>
<xsl:template match="/">
<xsl:comment>
This document was prepared using Pandoc2rfc
https://github.com/miekg/pandoc2rfc
</xsl:comment>
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="article">
<xsl:apply-templates/>
</xsl:template>
<!--
Remove the article info section, this should be handled
in the <front> matter of the draft
-->
<xsl:template match="articleinfo">
</xsl:template>
<!-- Use footnotes for indexes (iref) -->
<xsl:template match="footnote">
<xsl:element name="iref">
<xsl:choose>
<xsl:when test="contains(./para, '!')">
<xsl:attribute name="item">
<xsl:value-of select="substring-before (normalize-space(
translate(./para, ' ', ' ')), '!')"/>
</xsl:attribute>
<xsl:attribute name="subitem">
<xsl:value-of select="substring-after (normalize-space(
translate(./para, ' ', ' ')), '!')"/>
</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="item">
<xsl:value-of select="normalize-space(
translate(./para, ' ', ' '))"/>
</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
</xsl:element>
</xsl:template>
<!-- Merge section with the title tags into one section -->
<xsl:template match="section | simplesect |
sect1 | sect2 | sect3 | sect4 | sect5">
<section>
<xsl:attribute name="title">
<xsl:value-of select="normalize-space(
translate(./title, ' ', ' '))"/>
</xsl:attribute>
<xsl:attribute name="anchor">
<xsl:value-of select="@id"/>
</xsl:attribute>
<xsl:apply-templates/>
</section>
</xsl:template>
<!--
Transform a <para> to <t>, not in lists, then it is discarded
-->
<xsl:template match="para | simpara">
<xsl:choose>
<xsl:when test="ancestor::orderedlist">
<xsl:if test="position() > 2">
<vspace blankLines="1"/>
</xsl:if>
<xsl:apply-templates/>
</xsl:when>
<xsl:when test="ancestor::itemizedlist">
<xsl:if test="position() > 2">
<vspace blankLines="1"/>
</xsl:if>
<xsl:apply-templates/>
</xsl:when>
<xsl:when test="ancestor::variablelist">
<xsl:if test="position() > 2">
<vspace blankLines="1"/>
</xsl:if>
<xsl:apply-templates/>
</xsl:when>
<xsl:when test="ancestor::tbody">
<xsl:apply-templates/>
</xsl:when>
<xsl:otherwise>
<t>
<xsl:apply-templates/>
</t>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!--
Transform a <listitem> to a <t> for lists, except in description lists
-->
<xsl:template match="listitem">
<xsl:choose>
<xsl:when test="parent::varlistentry">
<xsl:apply-templates/>
</xsl:when>
<xsl:otherwise>
<t>
<xsl:apply-templates/>
</t>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!--
Transform lists, for lists in list we do not put it in a new <t></t>
-->
<xsl:template match="orderedlist">
<xsl:choose>
<xsl:when test="contains(@numeration,'arabic')">
<xsl:choose>
<xsl:when test="ancestor::orderedlist">
<list style="numbers">
<xsl:apply-templates/>
</list>
</xsl:when>
<xsl:when test="ancestor::itemizedlist">
<list style="numbers">
<xsl:apply-templates/>
</list>
</xsl:when>
<xsl:when test="ancestor::variablelist">
<list style="numbers">
<xsl:apply-templates/>
</list>
</xsl:when>
<xsl:otherwise>
<t>
<list style="numbers">
<xsl:apply-templates/>
</list>
</t>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:when test="contains(@numeration,'lowerroman')">
<xsl:choose>
<xsl:when test="ancestor::orderedlist">
<list style="format %i.">
<xsl:apply-templates/>
</list>
</xsl:when>
<xsl:when test="ancestor::itemizedlist">
<list style="format %i.">
<xsl:apply-templates/>
</list>
</xsl:when>
<xsl:when test="ancestor::variablelist">
<list style="format %i.">
<xsl:apply-templates/>
</list>
</xsl:when>
<xsl:otherwise>
<t>
<list style="format %i.">
<xsl:apply-templates/>
</list>
</t>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:when test="contains(@numeration,'upperroman')">
<xsl:choose>
<xsl:when test="ancestor::orderedlist">
<list style="format (%d)">
<xsl:apply-templates/>
</list>
</xsl:when>
<xsl:when test="ancestor::itemizedlist">
<list style="format (%d)">
<xsl:apply-templates/>
</list>
</xsl:when>
<xsl:when test="ancestor::variablelist">
<list style="format (%d)">
<xsl:apply-templates/>
</list>
</xsl:when>
<xsl:otherwise>
<t>
<list style="format (%d)">
<xsl:apply-templates/>
</list>
</t>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:when test="contains(@numeration,'upperalpha')">
<xsl:choose>
<xsl:when test="ancestor::orderedlist">
<list style="format %C.">
<xsl:apply-templates/>
</list>
</xsl:when>
<xsl:when test="ancestor::itemizedlist">
<list style="format %C.">
<xsl:apply-templates/>
</list>
</xsl:when>
<xsl:when test="ancestor::variablelist">
<list style="format %C.">
<xsl:apply-templates/>
</list>
</xsl:when>
<xsl:otherwise>
<t>
<list style="format %C.">
<xsl:apply-templates/>
</list>
</t>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:when test="contains(@numeration,'loweralpha')">
<xsl:choose>
<xsl:when test="ancestor::orderedlist">
<list style="letters">
<xsl:apply-templates/>
</list>
</xsl:when>
<xsl:when test="ancestor::itemizedlist">
<list style="letters">
<xsl:apply-templates/>
</list>
</xsl:when>
<xsl:when test="ancestor::variablelist">
<list style="letters">
<xsl:apply-templates/>
</list>
</xsl:when>
<xsl:otherwise>
<t>
<list style="letters">
<xsl:apply-templates/>
</list>
</t>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="ancestor::orderedlist">
<list style="empty">
<xsl:apply-templates/>
</list>
</xsl:when>
<xsl:when test="ancestor::itemizedlist">
<list style="empty">
<xsl:apply-templates/>
</list>
</xsl:when>
<xsl:when test="ancestor::variablelist">
<list style="empty">
<xsl:apply-templates/>
</list>
</xsl:when>
<xsl:otherwise>
<t>
<list style="empty">
<xsl:apply-templates/>
</list>
</t>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="itemizedlist">
<xsl:choose>
<xsl:when test="ancestor::orderedlist">
<list style="symbols">
<xsl:apply-templates/>
</list>
</xsl:when>
<xsl:when test="ancestor::itemizedlist">
<list style="symbols">
<xsl:apply-templates/>
</list>
</xsl:when>
<xsl:when test="ancestor::variablelist">
<list style="symbols">
<xsl:apply-templates/>
</list>
</xsl:when>
<xsl:otherwise>
<t>
<list style="symbols">
<xsl:apply-templates/>
</list>
</t>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!--
Hanging lists are specified as <variablelist>
-->
<xsl:template match="variablelist">
<xsl:choose>
<xsl:when test="ancestor::orderedlist">
<list style="hanging">
<xsl:apply-templates/>
</list>
</xsl:when>
<xsl:when test="ancestor::itemizedlist">
<list style="hanging">
<xsl:apply-templates/>
</list>
</xsl:when>
<xsl:when test="ancestor::variablelist">
<list style="hanging">
<xsl:apply-templates/>
</list>
</xsl:when>
<xsl:otherwise>
<t>
<list style="hanging">
<xsl:apply-templates/>
</list>
</t>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="varlistentry">
<t>
<xsl:attribute name="hangText">
<xsl:value-of select="normalize-space(translate(./term,
' 	 ', ' '))"/>
</xsl:attribute>
<!--
OPTION: enable this to get a newline after the hangText
-->
<!-- <xsl:element name="vspace"/> -->
<xsl:apply-templates select="./listitem"/>
</t>
</xsl:template>
<!--
Transform <link> to <xref> crosslinks
-->
<xsl:template match="link">
<xref>
<xsl:attribute name="target">
<xsl:value-of select="@linkend"/>
</xsl:attribute>
<xsl:apply-templates/>
</xref>
</xsl:template>
<!--
Transform <ulink> to <eref> links
-->
<xsl:template match="ulink">
<eref>
<xsl:attribute name="target">
<xsl:value-of select="@url"/>
</xsl:attribute>
<xsl:apply-templates/>
</eref>
</xsl:template>
<!--
Transform <blockquote> to <list style="hanging">
-->
<xsl:template match="blockquote">
<t>
<list style="hanging" hangIndent="3">
<xsl:apply-templates/>
</list>
</t>
</xsl:template>
<!--
Transform <screen> and <programlisting> to <figure><artwork>
-->
<xsl:template match="screen | programlisting">
<figure>
<xsl:choose>
<xsl:when test="contains(., $Fig)">
<xsl:attribute name="anchor">
<xsl:text>fig:</xsl:text>
<xsl:value-of select="translate(
translate(substring(normalize-space(
translate( substring-after(., $Fig) ,
" '", " ")), 1, 10),
" ", "-"), $uppercase, $smallcase)"/>
</xsl:attribute>
<!-- If there is an caption, center the figure -->
<xsl:attribute name="align">
<xsl:text>center</xsl:text>
</xsl:attribute>
<artwork>
<xsl:value-of select="substring-before(., $Fig)"/>
</artwork>
<postamble>
<xsl:value-of select="substring-after(., $Fig)"/>
</postamble>
</xsl:when>
<xsl:when test="contains(., $fig)">
<xsl:attribute name="anchor">
<xsl:text>fig:</xsl:text>
<xsl:value-of select="translate(
translate(substring(normalize-space(
translate( substring-after(., $fig) ,
" '", " ")), 1, 10),
" ", "-"), $uppercase, $smallcase)"/>
</xsl:attribute>
<artwork>
<xsl:value-of select="substring-before(., $fig)"/>
</artwork>
<postamble>
<xsl:value-of select="substring-after(., $fig)"/>
</postamble>
</xsl:when>
<xsl:otherwise>
<artwork>
<xsl:value-of select="."/>
</artwork>
</xsl:otherwise>
</xsl:choose>
</figure>
</xsl:template>
<xsl:template match="title"/>
<xsl:template match="literal">
<spanx style="verb">
<xsl:apply-templates/>
</spanx>
</xsl:template>
<xsl:template match="emphasis">
<xsl:choose>
<xsl:when test="contains(@role,'strong')">
<spanx style="strong">
<xsl:apply-templates/>
</spanx>
</xsl:when>
<xsl:otherwise>
<spanx style="emph">
<xsl:apply-templates/>
</spanx>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="literal" mode="post">
<spanx style="verb">
<xsl:apply-templates mode="post"/>
</spanx>
</xsl:template>
<xsl:template match="emphasis" mode="post">
<xsl:choose>
<xsl:when test="contains(@role,'strong')">
<spanx style="strong">
<xsl:apply-templates mode="post"/>
</spanx>
</xsl:when>
<xsl:otherwise>
<spanx style="emph">
<xsl:apply-templates mode="post"/>
</spanx>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<!-- Tables -->
<xsl:template match="table | informaltable">
<texttable>
<!-- If there is a caption, fake an anchor attribute -->
<xsl:if test="./caption">
<xsl:attribute name="anchor">
<xsl:text>tab:</xsl:text>
<xsl:value-of select="translate(
translate(substring(normalize-space(translate(
./caption, " '", " ")), 1, 10),
" ", "-"), $uppercase, $smallcase)"/>
</xsl:attribute>
</xsl:if>
<xsl:if test="./title">
<xsl:attribute name="anchor">
<xsl:text>tab:</xsl:text>
<xsl:value-of select="translate( translate(
substring(normalize-space(translate(./title,
" '", " ")), 1, 10),
" ", "-"), $uppercase, $smallcase)"/>
</xsl:attribute>
</xsl:if>
<xsl:apply-templates/>
<xsl:if test="./title">
<!-- create postamble of the title -->
<postamble>
<xsl:apply-templates select="./title" mode="post"/>
</postamble>
</xsl:if>
<xsl:if test="./caption">
<!-- create postamble of the caption -->
<postamble>
<xsl:apply-templates select="./caption" mode="post"/>
</postamble>
</xsl:if>
</texttable>
</xsl:template>
<!-- Table headers -->
<xsl:template match="table/thead/tr/th |
informaltable/thead/tr/th">
<ttcol>
<xsl:attribute name="align">
<xsl:value-of select="@align"/>
</xsl:attribute>
<!--
Every even position() need to be dealt with:
2 look back to 1, 4 look back to 2, etc.
-->
<xsl:if test="position() = 2">
<xsl:call-template name="get_col">
<xsl:with-param name="column" select="1"/>
</xsl:call-template>
</xsl:if>
<xsl:if test="position() = 4">
<xsl:call-template name="get_col">
<xsl:with-param name="column" select="2"/>
</xsl:call-template>
</xsl:if>
<xsl:if test="position() = 6">
<xsl:call-template name="get_col">
<xsl:with-param name="column" select="3"/>
</xsl:call-template>
</xsl:if>
<xsl:if test="position() = 8">
<xsl:call-template name="get_col">
<xsl:with-param name="column" select="4"/>
</xsl:call-template>
</xsl:if>
<xsl:if test="position() = 10">
<xsl:call-template name="get_col">
<xsl:with-param name="column" select="5"/>
</xsl:call-template>
</xsl:if>
<xsl:if test="position() = 12">
<xsl:call-template name="get_col">
<xsl:with-param name="column" select="6"/>
</xsl:call-template>
</xsl:if>
<xsl:if test="position() = 14">
<xsl:call-template name="get_col">
<xsl:with-param name="column" select="7"/>
</xsl:call-template>
</xsl:if>
<xsl:if test="position() = 16">
<xsl:call-template name="get_col">
<xsl:with-param name="column" select="8"/>
</xsl:call-template>
</xsl:if>
<xsl:apply-templates/>
</ttcol>
</xsl:template>
<xsl:template name="get_col">
<xsl:param name="column"/>
<xsl:if test="../../../col[$column]">
<xsl:attribute name="width">
<xsl:value-of select="../../../col[$column]/@width"/>
</xsl:attribute>
</xsl:if>
</xsl:template>
<!-- Table headers for CALS tables -->
<xsl:template match="table/tgroup/thead/row/entry">
<ttcol>
<xsl:if test="position() = 2">
<xsl:call-template name="get_colspec">
<xsl:with-param name="column" select="1"/>
</xsl:call-template>
</xsl:if>
<xsl:if test="position() = 4">
<xsl:call-template name="get_colspec">
<xsl:with-param name="column" select="2"/>
</xsl:call-template>
</xsl:if>
<xsl:if test="position() = 6">
<xsl:call-template name="get_colspec">
<xsl:with-param name="column" select="3"/>
</xsl:call-template>
</xsl:if>
<xsl:if test="position() = 8">
<xsl:call-template name="get_colspec">
<xsl:with-param name="column" select="4"/>
</xsl:call-template>
</xsl:if>
<xsl:if test="position() = 10">
<xsl:call-template name="get_colspec">
<xsl:with-param name="column" select="5"/>
</xsl:call-template>
</xsl:if>
<xsl:if test="position() = 12">
<xsl:call-template name="get_colspec">
<xsl:with-param name="column" select="6"/>
</xsl:call-template>
</xsl:if>
<xsl:if test="position() = 14">
<xsl:call-template name="get_colspec">
<xsl:with-param name="column" select="7"/>
</xsl:call-template>
</xsl:if>
<xsl:if test="position() = 16">
<xsl:call-template name="get_colspec">
<xsl:with-param name="column" select="8"/>
</xsl:call-template>
</xsl:if>
<!-- If the entry itself has align, we use that -->
<xsl:if test="@align">
<xsl:attribute name="align">
<xsl:value-of select="@align"/>
</xsl:attribute>
</xsl:if>
<xsl:apply-templates/>
</ttcol>
</xsl:template>
<xsl:template name="get_colspec">
<xsl:param name="column"/>
<xsl:if test="../../../../tgroup/colspec[$column]">
<xsl:attribute name="align">
<xsl:value-of
select="../../../../tgroup/colspec[$column]/@align"/>
</xsl:attribute>
<!-- Optionally colwidth, translate * to % -->
<xsl:if test="../../../../tgroup/colspec[$column]/@colwidth">
<xsl:attribute name="width">
<xsl:value-of select="translate(
../../../../tgroup/colspec[$column]/@colwidth, '*', '%')"/>
</xsl:attribute>
</xsl:if>
</xsl:if>
</xsl:template>
<!-- Table headers for CALS tables, Pandoc 1.9.x+ -->
<xsl:template match="informaltable/tgroup/thead/row/entry">
<ttcol>
<xsl:if test="position() = 2">
<xsl:call-template name="get_colspec_informal">
<xsl:with-param name="column" select="1"/>
</xsl:call-template>
</xsl:if>
<xsl:if test="position() = 4">
<xsl:call-template name="get_colspec_informal">
<xsl:with-param name="column" select="2"/>
</xsl:call-template>
</xsl:if>
<xsl:if test="position() = 6">
<xsl:call-template name="get_colspec_informal">
<xsl:with-param name="column" select="3"/>
</xsl:call-template>
</xsl:if>
<xsl:if test="position() = 8">
<xsl:call-template name="get_colspec_informal">
<xsl:with-param name="column" select="4"/>
</xsl:call-template>
</xsl:if>
<xsl:if test="position() = 10">
<xsl:call-template name="get_colspec_informal">
<xsl:with-param name="column" select="5"/>
</xsl:call-template>
</xsl:if>
<xsl:if test="position() = 12">
<xsl:call-template name="get_colspec_informal">
<xsl:with-param name="column" select="6"/>
</xsl:call-template>
</xsl:if>
<xsl:if test="position() = 14">
<xsl:call-template name="get_colspec_informal">
<xsl:with-param name="column" select="7"/>
</xsl:call-template>
</xsl:if>
<xsl:if test="position() = 16">
<xsl:call-template name="get_colspec_informal">
<xsl:with-param name="column" select="8"/>
</xsl:call-template>
</xsl:if>
<!-- If the entry itself has align, we use that -->
<xsl:if test="@align">
<xsl:attribute name="align">
<xsl:value-of select="@align"/>
</xsl:attribute>
</xsl:if>
<xsl:apply-templates/>
</ttcol>
</xsl:template>
<xsl:template name="get_colspec_informal">
<xsl:param name="column"/>
<xsl:if test="../../../../tgroup/colspec[$column]">
<xsl:attribute name="align">
<xsl:value-of
select="../../../../tgroup/colspec[$column]/@align"/>
</xsl:attribute>
<!-- Optionally colwidth, translate * to % -->
<xsl:if test="../../../../tgroup/colspec[$column]/@colwidth">
<xsl:attribute name="width">
<xsl:value-of
select="translate(
../../../../tgroup/colspec[$column]/@colwidth,
'*', '%')"/>
</xsl:attribute>
</xsl:if>
</xsl:if>
</xsl:template>
<xsl:template match="table/tbody/tr/td |
informaltable/tbody/tr/td |
table/tgroup/tbody/row/entry |
informaltable/tgroup/tbody/row/entry">
<c>
<xsl:apply-templates/>
</c>
</xsl:template>
<!-- CALS table -->
<xsl:template match="table/tbody/row/entry">
<c>
<xsl:apply-templates/>
</c>
</xsl:template>
</xsl:stylesheet>
| 29.739251 | 72 | 0.5534 |
e9d69e9bc3dfa9e79d3b5701f8fc01a5bffdf7f3 | 4,446 | xsl | XSLT | com.antennahouse.wml/xsl/dita2wml_text_mode.xsl | AntennaHouse/ah-wml | a3723728398dbecc6cc3c86b47ba683102466e37 | [
"Apache-2.0"
] | 5 | 2019-09-11T12:03:18.000Z | 2021-07-19T07:27:21.000Z | com.antennahouse.wml/xsl/dita2wml_text_mode.xsl | AntennaHouse/ah-wml | a3723728398dbecc6cc3c86b47ba683102466e37 | [
"Apache-2.0"
] | 9 | 2018-05-03T14:02:25.000Z | 2020-12-10T08:28:26.000Z | com.antennahouse.wml/xsl/dita2wml_text_mode.xsl | AntennaHouse/ah-wml | a3723728398dbecc6cc3c86b47ba683102466e37 | [
"Apache-2.0"
] | 1 | 2020-07-07T08:47:32.000Z | 2020-07-07T08:47:32.000Z | <?xml version='1.0' encoding="UTF-8" ?>
<!--
****************************************************************
DITA to WordprocessingML Stylesheet
Module: Text mode templates
Copyright © 2009-2017 Antenna House, Inc. All rights reserved.
Antenna House is a trademark of Antenna House, Inc.
URL : http://www.antennahouse.com/
E-mail : info@antennahouse.com
****************************************************************
-->
<xsl:stylesheet version="3.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:ahf="http://www.antennahouse.com/names/XSLT/Functions/Document"
exclude-result-prefixes="#all"
>
<!-- ======================================================================
Text-only templates
======================================================================
-->
<!-- * -->
<xsl:template match="*" mode="MODE_TEXT_ONLY" as="text()*">
<xsl:apply-templates mode="#current"/>
</xsl:template>
<!-- text -->
<xsl:template match="text()" mode="MODE_TEXT_ONLY" as="text()">
<xsl:value-of select="."/>
</xsl:template>
<!-- fn -->
<xsl:template match="*[@class => contains-token('topic/fn')]" mode="MODE_TEXT_ONLY" as="empty-sequence()">
</xsl:template>
<!-- tm -->
<xsl:template match="*[@class => contains-token('topic/tm')]" mode="MODE_TEXT_ONLY" as="text()*">
<xsl:apply-templates mode="#current"/>
<xsl:variable name="tmType" as="xs:string" select="string(@tmtype)"/>
<xsl:choose>
<xsl:when test="$tmType eq 'tm'">
<xsl:variable name="tmSymbolTmText" as="xs:string">
<xsl:call-template name="getVarValueWithLang">
<xsl:with-param name="prmVarName" select="'Tm_Symbol_Tm_Text'"/>
</xsl:call-template>
</xsl:variable>
<xsl:value-of select="$tmSymbolTmText"/>
</xsl:when>
<xsl:when test="$tmType eq 'reg'">
<xsl:variable name="tmSymbolRegText" as="xs:string">
<xsl:call-template name="getVarValueWithLang">
<xsl:with-param name="prmVarName" select="'Tm_Symbol_Reg_Text'"/>
</xsl:call-template>
</xsl:variable>
<xsl:value-of select="$tmSymbolRegText"/>
</xsl:when>
<xsl:when test="$tmType eq 'service'">
<xsl:variable name="tmSymbolServiceText" as="xs:string">
<xsl:call-template name="getVarValueWithLang">
<xsl:with-param name="prmVarName" select="'Tm_Symbol_Service_Text'"/>
</xsl:call-template>
</xsl:variable>
<xsl:value-of select="$tmSymbolServiceText"/>
</xsl:when>
</xsl:choose>
</xsl:template>
<!-- data-about -->
<xsl:template match="*[@class => contains-token('topic/data-about')]" mode="MODE_TEXT_ONLY" as="empty-sequence()">
</xsl:template>
<!-- data -->
<xsl:template match="*[@class => contains-token('topic/data')]" mode="MODE_TEXT_ONLY" as="empty-sequence()">
</xsl:template>
<!-- foreign -->
<xsl:template match="*[@class => contains-token('topic/foreign')]" mode="MODE_TEXT_ONLY" as="empty-sequence()">
</xsl:template>
<!-- unknown -->
<xsl:template match="*[@class => contains-token('topic/unknown')]" mode="MODE_TEXT_ONLY" as="empty-sequence()">
</xsl:template>
<!-- no-topic-nesting -->
<xsl:template match="*[@class => contains-token('topic/no-topic-nesting')]" mode="MODE_TEXT_ONLY" as="empty-sequence()">
</xsl:template>
<!-- indexterm is coded in dita2fo_indexcommon.xsl -->
<!-- required-cleanup -->
<xsl:template match="*[@class => contains-token('topic/required-cleanup')]" mode="MODE_TEXT_ONLY" as="empty-sequence()"/>
<!-- state -->
<xsl:template match="*[@class => contains-token('topic/state')]" mode="MODE_TEXT_ONLY" as="text()*">
<xsl:value-of select="@name"/>
<xsl:text>=</xsl:text>
<xsl:value-of select="@value"/>
</xsl:template>
<!-- boolean -->
<xsl:template match="*[@class => contains-token('topic/boolean')]" mode="MODE_TEXT_ONLY" as="text()">
<xsl:value-of select="@state"/>
</xsl:template>
</xsl:stylesheet>
| 41.166667 | 125 | 0.533738 |
943a07639336ff4aa1b2145dca6159b43dc8403e | 3,327 | xslt | XSLT | tools/crap4net/xslt/Crap4j/detail_crap_load.xslt | kissstudio/cassinidev | d250cb8a354f2e70ac151ce62d7f10aaabbbe9f4 | [
"MS-PL"
] | 3 | 2016-11-29T11:09:47.000Z | 2020-10-13T17:29:25.000Z | tools/crap4net/xslt/Crap4j/detail_crap_load.xslt | kissstudio/cassinidev | d250cb8a354f2e70ac151ce62d7f10aaabbbe9f4 | [
"MS-PL"
] | null | null | null | tools/crap4net/xslt/Crap4j/detail_crap_load.xslt | kissstudio/cassinidev | d250cb8a354f2e70ac151ce62d7f10aaabbbe9f4 | [
"MS-PL"
] | 4 | 2016-06-02T02:44:47.000Z | 2021-12-29T16:35:57.000Z | <?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml" exclude-result-prefixes="xhtml xsl">
<xsl:output method="xml" version="1.0" encoding="UTF-8" doctype-public="-//W3C//DTD XHTML 1.1//EN" doctype-system="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" indent="yes"/>
<xsl:strip-space elements="package className"/>
<xsl:template match="/crap_result">
<html>
<head>
<title>CRAP Report Detail for <xsl:value-of select="project"/></title>
<style type="text/css">
body {font-family: sans-serif}
h2 {text-align: center; padding: 0; margin: 0.5em}
h4 {text-align: center; padding: 0; margin: 0.5em}
table {border: 1px solid; border-spacing: 0; margin: 1em auto 1em auto}
tr.diagnostic:hover {background-color: #e0e0e0}
th {background-color: #ccccff; border: 1px solid; margin: 0; padding: 5px}
td {border: 1px solid; margin: 0; padding: 5px}
.show {color: blue; text-decoration: underline; cursor: pointer}
p.class {margin: 0; padding: 0; font-size: smaller}
p.method {margin: 0; padding: 0}
th.stat {width: 50%; text-align: left; background-color: #e0e0e0}
td.value {width: 50%; text-align: right}
td.complexity {text-align: right; width: 10em}
td.coverage {text-align: right; width: 10em}
td.crap {text-align: right; width: 10em}
</style>
<script type="text/javascript">
function show(id) {
document.getElementById(id).style.display='';
document.getElementById("show-" + id).style.display="none";
}
</script>
</head>
<body>
<h2>CRAP Report Detail</h2><h4>(Sorted by Crap Load)</h4><h3 style="text-align: center;">Project: <xsl:value-of select="project"/></h3>
<center><a href="index.html">Overview Page</a> |
<a href="detail_crap.html">CRAP</a> |
<a href="detail_complexity.html">Complexity</a> |
<a href="detail_coverage.html">Coverage</a></center>
<xsl:apply-templates select="methods"/>
</body>
</html>
</xsl:template>
<xsl:template match="methods">
<table border="1">
<tr class="header">
<th class="method">Method</th>
<th class="complexity">Complexity</th>
<th class="coverage">Coverage</th>
<th class="crap">CRAP</th>
<th class="crap">CRAP Load</th>
</tr>
<xsl:for-each select="method">
<xsl:sort data-type="number" order="descending" select="crapLoad"/>
<xsl:apply-templates select="."/>
</xsl:for-each>
</table>
</xsl:template>
<xsl:template match="method">
<tr>
<td class="method">
<p class="method"><xsl:value-of select="fullMethod"/></p>
<xsl:choose>
<xsl:when test="package">
<p class="class"><xsl:value-of select="package"/><xsl:text>.</xsl:text><xsl:value-of select="className"/></p>
</xsl:when>
<xsl:otherwise>
<p class="class"><xsl:value-of select="className"/></p>
</xsl:otherwise>
</xsl:choose>
</td>
<td class="complexity"><xsl:value-of select="complexity"/></td>
<td class="coverage"><xsl:value-of select="coverage"/>%</td>
<td class="crap"><xsl:value-of select="crap"/></td>
<td class="crap"><xsl:value-of select="crapLoad"/></td>
</tr>
</xsl:template>
</xsl:stylesheet>
| 40.084337 | 195 | 0.636309 |
50fb0aed752b34bb4b597738c661ef3a720e36b1 | 756 | xslt | XSLT | src/messages/transforms/TestApplication.TestMap.xslt | 345James/aimazure | 3eb42314d6f9eb39d58034041b8bb5402c72d7ca | [
"MIT"
] | 6 | 2020-10-26T16:39:10.000Z | 2021-05-01T17:27:05.000Z | src/messages/transforms/TestApplication.TestMap.xslt | 345James/aimazure | 3eb42314d6f9eb39d58034041b8bb5402c72d7ca | [
"MIT"
] | 1 | 2020-11-20T15:09:24.000Z | 2020-11-23T13:36:15.000Z | src/messages/transforms/TestApplication.TestMap.xslt | 345James/aimazure | 3eb42314d6f9eb39d58034041b8bb5402c72d7ca | [
"MIT"
] | 9 | 2020-10-26T11:59:54.000Z | 2021-07-27T23:15:05.000Z | <?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:var="http://schemas.microsoft.com/BizTalk/2003/var" exclude-result-prefixes="msxsl var" version="1.0" xmlns:ns0="http://Aim.XmlMapping.Schema1">
<xsl:output omit-xml-declaration="yes" method="xml" version="1.0" />
<xsl:template match="/">
<xsl:apply-templates select="/ns0:Payment" />
</xsl:template>
<xsl:template match="/ns0:Payment">
<ns0:PaymentOutbound>
<Amount>
<xsl:value-of select="Amount/text()" />
</Amount>
<Currency>
<xsl:value-of select="Currency/text()" />
</Currency>
</ns0:PaymentOutbound>
</xsl:template>
</xsl:stylesheet> | 44.470588 | 260 | 0.661376 |
58e32486213156ab1454c9b5dc31dfde72cc6128 | 1,298 | xsl | XSLT | rest-api/transforms/get-property.xsl | elkana/kalbecare2 | d3d915748a34de2dca041bc03b99abc5e9afacc1 | [
"Apache-2.0"
] | 26 | 2015-02-27T17:53:48.000Z | 2017-05-02T02:28:43.000Z | rest-api/transforms/get-property.xsl | elkana/kalbecare2 | d3d915748a34de2dca041bc03b99abc5e9afacc1 | [
"Apache-2.0"
] | 381 | 2015-01-08T14:40:32.000Z | 2017-06-09T10:32:16.000Z | rest-api/transforms/get-property.xsl | elkana/kalbecare2 | d3d915748a34de2dca041bc03b99abc5e9afacc1 | [
"Apache-2.0"
] | 33 | 2015-01-06T13:47:12.000Z | 2017-05-09T17:55:05.000Z | <?xml version="1.0" encoding="UTF-8"?>
<!--
REST transform for returning single document-properties with indentation for the purpose of showing it to the end user.
-->
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:map="http://marklogic.com/xdmp/map"
xmlns:xdmp="http://marklogic.com/xdmp"
extension-element-prefixes="xdmp"
exclude-result-prefixes="#all">
<xsl:output indent="yes" omit-xml-declaration="yes"/>
<xsl:strip-space elements="*"/>
<xsl:param name="context" as="map:map"/>
<xsl:param name="params" as="map:map"/>
<xsl:variable name="property" select="map:get($params, 'property')"/>
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="/">
<xsl:variable name="uri" select="map:get($context, 'uri')"/>
<xsl:choose>
<xsl:when test="string-length($property) > 0">
<xsl:sequence select="map:put($context,'output-type','application/xml')"/>
<xsl:apply-templates select="xdmp:document-properties($uri)/*/*[local-name() = $property]"/>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="."/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
| 32.45 | 119 | 0.640216 |
30a8142b22c6cda895624826d00c05878210d654 | 2,367 | xsl | XSLT | Database/ExistDB/transformations/resultToContractCorpusHtml.xsl | RIDICS/ITJakub | c75ebde0c85e7ad628604770bbec7228d4d300d2 | [
"BSD-3-Clause"
] | 3 | 2017-12-31T15:27:27.000Z | 2019-12-19T08:27:45.000Z | Database/ExistDB/transformations/resultToContractCorpusHtml.xsl | RIDICS/ITJakub | c75ebde0c85e7ad628604770bbec7228d4d300d2 | [
"BSD-3-Clause"
] | 4 | 2022-01-15T02:07:08.000Z | 2022-03-08T23:06:27.000Z | Database/ExistDB/transformations/resultToContractCorpusHtml.xsl | RIDICS/ITJakub | c75ebde0c85e7ad628604770bbec7228d4d300d2 | [
"BSD-3-Clause"
] | 1 | 2018-03-07T20:01:39.000Z | 2018-03-07T20:01:39.000Z | <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns:c="http://schemas.datacontract.org/2004/07/ITJakub.Shared.Contracts.Searching.Results" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xd="http://www.oxygenxml.com/ns/doc/xsl" exclude-result-prefixes="xs xd c" version="2.0">
<xd:doc scope="stylesheet">
<xd:desc>
<xd:p>
<xd:b>Created on:</xd:b> Aug 27, 2015</xd:p>
<xd:p>
<xd:b>Author:</xd:b> lehecka</xd:p>
<xd:p>Escapování HTML znaků kvůli deserializaci kontraktu v C#</xd:p>
</xd:desc>
</xd:doc>
<xsl:template match="/">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
<xsl:template match="c:After | c:Before | c:Match">
<xsl:copy>
<xsl:apply-templates select="@*"/>
<xsl:apply-templates mode="serialize"/>
</xsl:copy>
</xsl:template>
<xsl:template match="a:string">
<xsl:copy>
<xsl:apply-templates select="@*"/>
<xsl:apply-templates mode="serialize"/>
</xsl:copy>
</xsl:template>
<xsl:template match="*" mode="serialize">
<xsl:text><</xsl:text>
<xsl:value-of select="name()"/>
<xsl:apply-templates select="@*" mode="serialize"/>
<xsl:choose>
<xsl:when test="node()">
<xsl:text>></xsl:text>
<xsl:apply-templates mode="serialize"/>
<xsl:text></</xsl:text>
<xsl:value-of select="name()"/>
<xsl:text>></xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text> /></xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="@*" mode="serialize">
<xsl:text> </xsl:text>
<xsl:value-of select="name()"/>
<xsl:text>="</xsl:text>
<xsl:value-of select="."/>
<xsl:text>"</xsl:text>
</xsl:template>
<xsl:template match="text()" mode="serialize">
<xsl:value-of select="."/>
</xsl:template>
</xsl:stylesheet> | 40.810345 | 417 | 0.539079 |
358c0e8b15aaedd313c40c2850a43c2eab7961f0 | 1,782 | xsl | XSLT | workspace/utilities/com/schema-newsarticle.xsl | hotdoy/symphonycms-template | 4f1a9b56a3be2881840933cc31af519af46cf188 | [
"MIT"
] | 10 | 2015-02-13T10:21:13.000Z | 2017-02-25T14:11:54.000Z | workspace/utilities/com/schema-newsarticle.xsl | hotdoy/symphonycms-template | 4f1a9b56a3be2881840933cc31af519af46cf188 | [
"MIT"
] | 325 | 2017-08-22T19:48:28.000Z | 2021-04-05T11:06:19.000Z | workspace/utilities/com/schema-newsarticle.xsl | hotdoy/symphonycms-template | 4f1a9b56a3be2881840933cc31af519af46cf188 | [
"MIT"
] | 12 | 2017-08-07T14:34:02.000Z | 2021-08-30T20:10:21.000Z | <?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!-- COMPONENT: schema-newsarticle -->
<xsl:template name="schema-newsarticle">
<xsl:param name="img-article" select="concat($workspace, image/@path, '/', image/filename)" />
<xsl:param name="img-organisation" select="concat($workspace, $config/image-partage/@path, '/', $config/image-partage/filename)" />
<xsl:param name="description">
<xsl:choose>
<xsl:when test="string-length(meta-description) != 0">
<xsl:value-of select="meta-description" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="substring(content, 0, 300)" />
</xsl:otherwise>
</xsl:choose>
</xsl:param>
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "NewsArticle",
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "<xsl:value-of select="$current-url" />"
},
"headline": "<xsl:value-of select="translate(title/item[1], ',"', '')" />",
"image": [
"<xsl:value-of select="$img-article" />"
],
"datePublished": "<xsl:value-of select="publish-date/date/start" />",
"dateModified": "<xsl:value-of select="publish-date/date/start" />",
"author": {
"@type": "Person",
"name": "<xsl:value-of select="translate(author/item, ',"', '')" />"
},
"publisher": {
"@type": "Organization",
"name": "<xsl:value-of select="translate($data/site-config/entry[1]/schema-name, ',"', '')" />",
"logo": {
"@type": "ImageObject",
"url": "<xsl:value-of select="$img-organisation" />"
}
},
"description": "<xsl:value-of select="translate($description, ',"', '')" />"
}
</script>
</xsl:template>
</xsl:stylesheet>
| 34.269231 | 133 | 0.594837 |
fc3aea00bee6c9df99008c32d677bbe68e8552f6 | 759 | xsl | XSLT | Leak #5 - Lost In Translation/windows/Resources/Ep/Commands/Display/adgc_display.xsl | bidhata/EquationGroupLeaks | 1ff4bc115cb2bd5bf2ed6bf769af44392926830c | [
"Unlicense"
] | 9 | 2019-11-22T04:58:40.000Z | 2022-02-26T16:47:28.000Z | Python.Fuzzbunch/Resources/Ep/Commands/Display/adgc_display.xsl | 010001111/Vx-Suites | 6b4b90a60512cce48aa7b87aec5e5ac1c4bb9a79 | [
"MIT"
] | null | null | null | Python.Fuzzbunch/Resources/Ep/Commands/Display/adgc_display.xsl | 010001111/Vx-Suites | 6b4b90a60512cce48aa7b87aec5e5ac1c4bb9a79 | [
"MIT"
] | 8 | 2017-09-27T10:31:18.000Z | 2022-01-08T10:30:46.000Z | <?xml version='1.0' ?>
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:import href="StandardTransforms.xsl"/>
<xsl:output method="text"/>
<xsl:template match="Entry">
<xsl:variable name="type" select="substring-before(substring-after(Category, 'CN='), ',')" />
<xsl:value-of select="$type"/>
<xsl:call-template name="PrintReturn" />
<xsl:text>	</xsl:text>
<xsl:value-of select="Name" />
<xsl:call-template name="PrintReturn" />
<xsl:text>	</xsl:text>
<xsl:value-of select="DistinguishedName" />
<xsl:call-template name="PrintReturn" />
<xsl:text>-------------------------------------------------</xsl:text>
<xsl:call-template name="PrintReturn" />
</xsl:template>
</xsl:transform> | 30.36 | 95 | 0.620553 |
24d30b45019ed0175a336c312bcb613c5c0c9346 | 1,266 | xsl | XSLT | doc/lib/html.base.xsl | jumptohistory/jaymod | 92d0a0334ac27da94b12280b0b42b615b8813c23 | [
"Apache-2.0"
] | 25 | 2016-05-27T11:53:58.000Z | 2021-10-17T00:13:41.000Z | doc/lib/html.base.xsl | jumptohistory/jaymod | 92d0a0334ac27da94b12280b0b42b615b8813c23 | [
"Apache-2.0"
] | 1 | 2016-07-09T05:25:03.000Z | 2016-07-09T05:25:03.000Z | doc/lib/html.base.xsl | jumptohistory/jaymod | 92d0a0334ac27da94b12280b0b42b615b8813c23 | [
"Apache-2.0"
] | 16 | 2016-05-28T23:06:50.000Z | 2022-01-26T13:47:12.000Z | <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'>
<xsl:param name="annotate.toc">0</xsl:param>
<xsl:param name="table.borders.with.css">1</xsl:param>
<xsl:param name="tablecolumns.extension">1</xsl:param>
<xsl:param name="toc.max.depth">2</xsl:param>
<!-- ###################################################################### -->
<!-- ###################################################################### -->
<xsl:template name="inline.superscriptseq">
<xsl:param name="content">
<xsl:call-template name="anchor"/>
<xsl:call-template name="simple.xlink">
<xsl:with-param name="content">
<xsl:apply-templates/>
</xsl:with-param>
</xsl:call-template>
</xsl:param>
<sup>
<xsl:choose>
<xsl:when test="string-length(@role) != 0">
<xsl:attribute name="class">
<xsl:value-of select="@role"/>
</xsl:attribute>
</xsl:when>
</xsl:choose>
<xsl:call-template name="generate.html.title"/>
<xsl:call-template name="dir"/>
<xsl:copy-of select="$content"/>
<xsl:call-template name="apply-annotations"/>
</sup>
</xsl:template>
<!-- ###################################################################### -->
</xsl:stylesheet>
| 30.878049 | 79 | 0.504739 |
b1e293ced302fc82d2b07d2d58b20276e31e1cbf | 6,976 | xslt | XSLT | PASS/CashRegister/Bill.xslt | kejdajar/PASS | f480051ed60532ecec64b944ea8f4bc8820f4560 | [
"MIT"
] | 1 | 2022-02-07T15:22:26.000Z | 2022-02-07T15:22:26.000Z | PASS/CashRegister/Bill.xslt | kejdajar/PASS | f480051ed60532ecec64b944ea8f4bc8820f4560 | [
"MIT"
] | null | null | null | PASS/CashRegister/Bill.xslt | kejdajar/PASS | f480051ed60532ecec64b944ea8f4bc8820f4560 | [
"MIT"
] | null | null | null | <?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="/">
<xsl:text disable-output-escaping='yes'><!DOCTYPE html></xsl:text>
<html>
<body>
<head>
<title>Účtenka</title>
</head>
<style>
#container {margin:0px auto;width:300px}
table {width:100%;border-collapse:collapse;}
#itemTable tr td {border-bottom:1px dashed black}
#itemTable tr th {padding-top:5px}
#headerTable {text-align:center;}
#footerTable {text-align:center;}
</style>
<div id="container" style="">
<header>
<table id="headerTable">
<tr>
<td>
<b>
<xsl:value-of select="bill/companyName"/>
</b>
</td>
</tr>
<xsl:if test="bill/companyAdress">
<tr>
<td>
<xsl:value-of select="bill/companyAdress"/>
</td>
</tr>
</xsl:if>
<xsl:if test="bill/companyCity or bill/companyPostalCode">
<tr>
<td>
<xsl:value-of select="bill/companyCity"/>
<xsl:if test="bill/companyPostalCode and bill/companyCity">, </xsl:if>
<xsl:value-of select="bill/companyPostalCode"/>
</td>
</tr>
</xsl:if>
<xsl:if test="bill/companyPhone">
<tr>
<td>
Telefon: <xsl:value-of select="bill/companyPhone"/>
</td>
</tr>
</xsl:if>
<xsl:if test="bill/companyWeb">
<tr >
<td>
Internet: <xsl:value-of select="bill/companyWeb"/>
</td>
</tr>
</xsl:if>
</table>
</header>
<table id="itemTable" style="margin-top:5px;border-top:1px dashed black">
<tr>
<th></th>
<th style="text-align:right" > Kč </th>
</tr>
<xsl:for-each select="bill/product">
<tr>
<td>
<xsl:value-of select="name"/>
<xsl:text> </xsl:text>
<xsl:if test="priceForUnit = 'False'">
<xsl:value-of select="unitQuantity"/>
</xsl:if>
<xsl:if test="priceForUnit = 'True'">
<xsl:value-of select="quantity"/>
</xsl:if>
<xsl:value-of select="unit"/>
<xsl:if test="priceForUnit = 'False'">
<xsl:text disable-output-escaping='yes'></br></xsl:text>
<span style="font-size:0.8em;font-style:italic">
<xsl:value-of select="quantity"/> X <xsl:value-of select="priceForSingleUnit"/> Kč
</span>
</xsl:if>
</td>
<td style="text-align:right">
<xsl:value-of select="totalPrice"/>
<xsl:text> </xsl:text>
<xsl:value-of select="vatType"/>
</td>
</tr>
</xsl:for-each>
<tr style="font-weight:bold;font-size:1.1em">
<td >Celkem</td>
<td colspan="3" style="text-align:right">
<xsl:value-of select="bill/totalShoppingCartPrice"/>
</td>
</tr>
<tr>
<td >Přijato</td>
<td colspan="3" style="text-align:right">
<xsl:value-of select="bill/paid"/>
</td>
</tr>
<tr>
<td >Vráceno</td>
<td colspan="3" style="text-align:right">
<xsl:value-of select="bill/change"/>
</td>
</tr>
</table>
<table >
<tr>
<td>DPH Rekapitulace</td>
<td></td>
</tr>
<tr>
<td>Sazba</td>
<td >DPH</td>
<td style="text-align:right">Celkem</td>
</tr>
<tr>
<td>
D<xsl:text> </xsl:text><xsl:value-of select="bill/D/@percentage"/>
</td>
<td >
<xsl:value-of select="bill/D"/>
</td>
<td style="text-align:right">
<xsl:value-of select="bill/D/@totalPrice"/>
</td>
</tr>
<tr>
<td>
C<xsl:text> </xsl:text><xsl:value-of select="bill/C/@percentage"/>
</td>
<td >
<xsl:value-of select="bill/C"/>
</td>
<td style="text-align:right">
<xsl:value-of select="bill/C/@totalPrice"/>
</td>
</tr>
<tr>
<td>
B<xsl:text> </xsl:text><xsl:value-of select="bill/B/@percentage"/>
</td>
<td >
<xsl:value-of select="bill/B"/>
</td>
<td style="text-align:right">
<xsl:value-of select="bill/B/@totalPrice"/>
</td>
</tr>
<tr>
<td>
A<xsl:text> </xsl:text><xsl:value-of select="bill/A/@percentage"/>
</td>
<td >
<xsl:value-of select="bill/A"/>
</td>
<td style="text-align:right">
<xsl:value-of select="bill/A/@totalPrice"/>
</td>
</tr>
<tr>
<td>
Celkem
</td>
<td>
<xsl:value-of select="bill/vatSum"/>
</td>
<td style="text-align:right">
<xsl:value-of select="bill/vatSumSingle"/>
</td>
</tr>
<tr>
<td >Obsluha</td>
<td colspan="3" style="text-align:right">
<xsl:value-of select="bill/staff"/>
</td>
</tr>
</table>
<!-- Patička -->
<table id="footerTable" style="margin-top:15px;border-top:1px dashed black">
<tr >
<td style="padding-top:5px">
<xsl:value-of select="bill/time"/>
</td>
</tr>
<xsl:if test="bill/billText">
<tr>
<td>
<xsl:value-of select="bill/billText"/>
</td>
</tr>
</xsl:if>
</table>
</div>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
| 29.310924 | 104 | 0.388618 |
c5ce06c81a04afebaf584ebf45eeedee79b9acaf | 1,868 | xsl | XSLT | static/formats/s3csv/org/sector.xsl | flavour/lacity | fd1f1cccdcea64d07143b29d4f88996e3af35c4b | [
"MIT"
] | null | null | null | static/formats/s3csv/org/sector.xsl | flavour/lacity | fd1f1cccdcea64d07143b29d4f88996e3af35c4b | [
"MIT"
] | null | null | null | static/formats/s3csv/org/sector.xsl | flavour/lacity | fd1f1cccdcea64d07143b29d4f88996e3af35c4b | [
"MIT"
] | null | null | null | <?xml version="1.0"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- **********************************************************************
Sector - CSV Import Stylesheet
- use for import to org/sector resource
- example raw URL usage:
Let URLpath be the URL to Sahana Eden appliation
Let Resource be org/organisation/create
Let Type be s3csv
Let CSVPath be the path on the server to the CSV file to be imported
Let XSLPath be the path on the server to the XSL transform file
Then in the browser type:
URLpath/Resource.Type?filename=CSVPath&transform=XSLPath
You can add a third argument &ignore_errors
CSV fields:
UUID....................org_sector
name....................org_sector
abrv....................org_sector
*********************************************************************** -->
<xsl:template match="/">
<s3xml>
<!-- ********************************************************** -->
<!-- Create each record -->
<xsl:for-each select="table/row">
<!-- Create the Sector -->
<resource name="org_sector">
<xsl:if test="col[@field='UUID']!=''">
<xsl:attribute name="uuid">
<xsl:value-of select="col[@field='UUID']"/>
</xsl:attribute>
</xsl:if>
<data field="name"><xsl:value-of select="col[@field='name']"/></data>
<data field="abrv"><xsl:value-of select="col[@field='abrv']"/></data>
</resource>
</xsl:for-each>
</s3xml>
</xsl:template>
</xsl:stylesheet>
| 41.511111 | 89 | 0.436296 |
1b141652acd5ae2aec12ac1e3c3b7ec5e91d6b08 | 1,407 | xslt | XSLT | OclX/OclXsamples/play.xslt | mff-uk/exolutio | d1d1c936822ddf6c550fbaa2c5169a396edb2596 | [
"BSD-2-Clause"
] | 1 | 2018-09-03T18:28:21.000Z | 2018-09-03T18:28:21.000Z | OclX/OclXsamples/play.xslt | mff-uk/exolutio | d1d1c936822ddf6c550fbaa2c5169a396edb2596 | [
"BSD-2-Clause"
] | null | null | null | OclX/OclXsamples/play.xslt | mff-uk/exolutio | d1d1c936822ddf6c550fbaa2c5169a396edb2596 | [
"BSD-2-Clause"
] | 2 | 2018-09-03T18:28:32.000Z | 2021-09-04T15:42:31.000Z | <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xs" version="2.0">
<xsl:output indent="yes"></xsl:output>
<xsl:template match="/purchase">
<xsl:copy>
<xsl:apply-templates select="code"/>
<xsl:apply-templates select="date"/>
<xsl:apply-templates select="status"/>
<totalPrice>
<xsl:value-of select="sum(item/price)"/>
</totalPrice>
<xsl:apply-templates select="item"/>
</xsl:copy>
</xsl:template>
<xsl:template match="/purchase/item">
<item>
<xsl:apply-templates select="code"/>
</item>
</xsl:template>
<xsl:template match="code | date | status">
<xsl:copy-of select="."/>
</xsl:template>
<!--
<xsl:template match="/">
<xsl:variable name="v1" as="item()*">
<xsl:sequence select="a"/>
</xsl:variable>
<xsl:variable name="v2" as="item()*" select="a"/>
<xsl:text>v1: </xsl:text>
<xsl:apply-templates select="$v1" mode="out"/>
<xsl:text>
</xsl:text>
<xsl:text>v2: </xsl:text>
<xsl:apply-templates select="$v2" mode="out"/>
</xsl:template>
<xsl:template match="*" mode="out">
<xsl:value-of select="name()"/>
<xsl:apply-templates mode="#current"/>
</xsl:template>
<xsl:template match="text()" mode="#all"/>-->
</xsl:stylesheet>
| 26.055556 | 89 | 0.5828 |
e7dab526f5b1c72cd47f10236f5d8ffb059f68cc | 1,163 | xsl | XSLT | xproc/convert-bogus-table-markup-to-headings.xsl | IsisCB/IsisCBLegacyDigitization | 475a525f91dab6afadaf63cd6b9e1fcb50e4e97f | [
"MIT"
] | null | null | null | xproc/convert-bogus-table-markup-to-headings.xsl | IsisCB/IsisCBLegacyDigitization | 475a525f91dab6afadaf63cd6b9e1fcb50e4e97f | [
"MIT"
] | 57 | 2015-10-18T06:47:41.000Z | 2016-08-19T14:41:36.000Z | xproc/convert-bogus-table-markup-to-headings.xsl | IsisCB/IsisCBLegacyDigitization | 475a525f91dab6afadaf63cd6b9e1fcb50e4e97f | [
"MIT"
] | null | null | null | <xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:tite="http://www.tei-c.org/ns/tite/1.0"
xmlns:tei="http://www.tei-c.org/ns/1.0"
exclude-result-prefixes="tei">
<!-- converts bogus table markup in ISIS-07.xml into bold paragraphs -->
<xsl:template match="*">
<xsl:copy>
<xsl:copy-of select="@*"/>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>
<!-- the tei:body contains the bibliographic citations -->
<!-- these two-column tables in ISIS-07.xml (only!) are bogus, and should be encoded as paragraphs containing bold text for consistency with the rest of the text -->
<xsl:template match="tei:body//tei:table">
<xsl:for-each select="tei:row">
<xsl:element name="p" namespace="http://www.tei-c.org/ns/1.0">
<xsl:element name="tite:b">
<xsl:copy-of select="tei:cell[1]/node()"/>
<xsl:if test="normalize-space(tei:cell[1]) and normalize-space(tei:cell[2])">
<xsl:text> </xsl:text>
</xsl:if>
<xsl:copy-of select="tei:cell[2]/node()"/>
</xsl:element>
</xsl:element>
<xsl:text>
</xsl:text>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
| 33.228571 | 166 | 0.641445 |
62d7c638daa71ea0f6ffb9b9e9692d87737fd0de | 734 | xsl | XSLT | implementation-1/implementation-1.xsl | xatapult/xproc-merging-example | 274b57162c9c23defd5f7c42fb7092b55899103c | [
"MIT"
] | null | null | null | implementation-1/implementation-1.xsl | xatapult/xproc-merging-example | 274b57162c9c23defd5f7c42fb7092b55899103c | [
"MIT"
] | null | null | null | implementation-1/implementation-1.xsl | xatapult/xproc-merging-example | 274b57162c9c23defd5f7c42fb7092b55899103c | [
"MIT"
] | null | null | null | <xsl:stylesheet version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
exclude-result-prefixes="#all" expand-text="true">
<xsl:mode on-no-match="shallow-copy"/>
<xsl:param name="temps-filename" as="xs:string" required="yes"/>
<xsl:param name="city-ids-filename" as="xs:string" required="yes"/>
<xsl:template match="body">
<xsl:copy>
<xsl:apply-templates select="@*"/>
<xsl:for-each select="doc($temps-filename)/*/citytemp">
<xsl:variable name="city-id" as="xs:string" select="@id"/>
<p>{doc($city-ids-filename)/*/city-id[@id eq $city-id]/@name}: {@temp}</p>
</xsl:for-each>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
| 34.952381 | 82 | 0.63079 |
ebb6521e77d194d852464f45964037f50c38e78e | 2,956 | xsl | XSLT | deployment/webpublic/webapp/resources/demoskins/MainCampus/themes/bedeworkTheme-3.10/year.xsl | Bedework/bw-classic | fd0144657ba4f2f011f735b875e9718cea265f0d | [
"Apache-2.0"
] | 2 | 2015-06-28T19:46:23.000Z | 2020-03-04T20:25:27.000Z | deployment/webpublic/webapp/resources/demoskins/MainCampus/themes/bedeworkTheme-3.10/year.xsl | Bedework/bw-classic | fd0144657ba4f2f011f735b875e9718cea265f0d | [
"Apache-2.0"
] | null | null | null | deployment/webpublic/webapp/resources/demoskins/MainCampus/themes/bedeworkTheme-3.10/year.xsl | Bedework/bw-classic | fd0144657ba4f2f011f735b875e9718cea265f0d | [
"Apache-2.0"
] | null | null | null | <!--
Licensed to Jasig under one or more contributor license
agreements. See the NOTICE file distributed with this work
for additional information regarding copyright ownership.
Jasig licenses this file to you under the Apache License,
Version 2.0 (the "License"); you may not use this file
except in compliance with the License. You may obtain a
copy of the License at:
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!--==== YEAR VIEW ====-->
<xsl:template name="yearView">
<div class="yearMonthRow">
<xsl:apply-templates select="/bedework/eventscalendar/year/month[position() <= 4]" />
</div>
<div class="yearMonthRow">
<xsl:apply-templates select="/bedework/eventscalendar/year/month[(position() > 4) and (position() <= 8)]" />
</div>
<div class="yearMonthRow">
<xsl:apply-templates select="/bedework/eventscalendar/year/month[position() > 8]" />
</div>
</xsl:template>
<!-- year view month tables -->
<xsl:template match="month">
<table class="yearViewMonthTable" cellspacing="0"
cellpadding="0">
<tr>
<td colspan="7" class="monthName">
<xsl:variable name="firstDayOfMonth" select="week/day/date" />
<a href="{$setViewPeriod}&viewType=monthView&date={$firstDayOfMonth}">
<xsl:value-of select="longname" />
</a>
</td>
</tr>
<tr>
<xsl:for-each select="/bedework/shortdaynames/val">
<th>
<xsl:value-of select="." />
</th>
</xsl:for-each>
</tr>
<xsl:for-each select="week">
<tr>
<xsl:for-each select="day">
<xsl:choose>
<xsl:when test="filler='true'">
<td class="filler"> </td>
</xsl:when>
<xsl:otherwise>
<td>
<xsl:if test="/bedework/now/date = date">
<xsl:attribute name="class">today</xsl:attribute>
</xsl:if>
<xsl:variable name="dayDate"
select="date" />
<a href="{$setViewPeriod}&viewType=dayView&date={$dayDate}">
<xsl:attribute name="class">today</xsl:attribute>
<xsl:value-of select="value" />
</a>
</td>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</tr>
</xsl:for-each>
</table>
</xsl:template>
</xsl:stylesheet>
| 35.614458 | 120 | 0.569689 |
02d7c7ed40471397ae63aada966fb9bbd8815edd | 2,272 | xsl | XSLT | data/dtd/funcs.xsl | sparklemotion/nekodtd | aeb19d38535ec01819f04c4b6d8185df2a74705d | [
"Apache-2.0"
] | null | null | null | data/dtd/funcs.xsl | sparklemotion/nekodtd | aeb19d38535ec01819f04c4b6d8185df2a74705d | [
"Apache-2.0"
] | 1 | 2022-02-01T12:47:45.000Z | 2022-02-01T12:47:45.000Z | data/dtd/funcs.xsl | sparklemotion/nekodtd | aeb19d38535ec01819f04c4b6d8185df2a74705d | [
"Apache-2.0"
] | 1 | 2022-03-22T09:53:59.000Z | 2022-03-22T09:53:59.000Z | <xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0'>
<!-- COMMENTS -->
<xsl:template name='comment_contentModel'>
<xsl:for-each select='following::elementDecl[1]'>
<xsl:call-template name='comment_elementDecl'/>
</xsl:for-each>
</xsl:template>
<xsl:template name='comment_elementDecl'>
<xsl:comment>
<xsl:text><!ELEMENT </xsl:text>
<xsl:value-of select='@ename'/>
<xsl:text> </xsl:text>
<xsl:value-of select='@model'/>
<xsl:text>></xsl:text>
</xsl:comment>
</xsl:template>
<xsl:template name='comment_attributeDecl'>
<xsl:comment>
<xsl:text><!ATTLIST </xsl:text>
<xsl:value-of select='@ename'/>
<xsl:text> </xsl:text>
<xsl:value-of select='@aname'/>
<xsl:text> </xsl:text>
<xsl:value-of select='@atype'/>
<xsl:if test='@atype="NOTATION"'>
<xsl:text> (</xsl:text>
<xsl:for-each select='enumeration'>
<xsl:if test='position()>1'>|</xsl:if>
<xsl:value-of select='@value'/>
</xsl:for-each>
<xsl:text>)</xsl:text>
</xsl:if>
<xsl:choose>
<xsl:when test='@required'> #REQUIRED</xsl:when>
<xsl:when test='@fixed'> #FIXED</xsl:when>
<xsl:when test='not(@default)'> #IMPLIED</xsl:when>
</xsl:choose>
<xsl:if test='@default'>
<xsl:text> "</xsl:text>
<xsl:call-template name='escape'>
<xsl:with-param name='s'><xsl:value-of select='@default'/></xsl:with-param>
</xsl:call-template>
<xsl:text>"</xsl:text>
</xsl:if>
<xsl:text>></xsl:text>
</xsl:comment>
</xsl:template>
<xsl:template name='escape'>
<xsl:param name='s'/>
<xsl:param name='c'>"</xsl:param>
<xsl:param name='C'>&#34;</xsl:param>
<xsl:if test='string-length($s)>0'>
<xsl:choose>
<xsl:when test='contains($s,$c)'>
<xsl:value-of select='substring-before($s,$c)'/>
<xsl:value-of select='$C'/>
<xsl:call-template name='escape'>
<xsl:with-param name='s'>
<xsl:value-of select='substring(substring-after($s,$c),2)'/>
</xsl:with-param>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select='$s'/>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
</xsl:template>
</xsl:stylesheet> | 30.293333 | 81 | 0.585827 |
fb6d8b0e5ce4b7f5071e24166132e6aab3c800c5 | 1,372 | xsl | XSLT | ds/security/ssr/[windir.security.ssr]/transformfiles/sce-rollback-script.xsl | npocmaka/Windows-Server-2003 | 5c6fe3db626b63a384230a1aa6b92ac416b0765f | [
"Unlicense"
] | 17 | 2020-11-13T13:42:52.000Z | 2021-09-16T09:13:13.000Z | ds/security/ssr/[windir.security.ssr]/transformfiles/sce-rollback-script.xsl | sancho1952007/Windows-Server-2003 | 5c6fe3db626b63a384230a1aa6b92ac416b0765f | [
"Unlicense"
] | 2 | 2020-10-19T08:02:06.000Z | 2020-10-19T08:23:18.000Z | ds/security/ssr/[windir.security.ssr]/transformfiles/sce-rollback-script.xsl | sancho1952007/Windows-Server-2003 | 5c6fe3db626b63a384230a1aa6b92ac416b0765f | [
"Unlicense"
] | 14 | 2020-11-14T09:43:20.000Z | 2021-08-28T08:59:57.000Z | <?xml version="1.0" encoding="iso-8859-1"?>
<!-- simple xslt file: sce_rollback.xsl -->
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxsl="urn:schemas-microsoft-com:xslt"
xmlns:ssr="http://microsoft.com/sce/ssr"
>
<xsl:import href="../CommonLib/ExtFunctions.xsl"/>
<xsl:output method="text" indent="no"/>
<xsl:template match="/SSRSecurityPolicy/Services">
<![CDATA[
<job id="SsrSceRollback">
<reference object="SSR.SsrCore"/>
<script language="VBScript">
Option Explicit
On Error Resume Next
]]>
<!-- first, let's create the rollback inf template -->
<xsl:variable name="CfgInf" select="ssr:GetFileLocation('Rollback', 'SCE.inf')"/>
<xsl:variable name="Rbklog" select="ssr:GetFileLocation('Rollback', 'SCE-Rollback.log')"/>
'configure template is <xsl:value-of select="$CfgInf"/>
DIM SCEAgent
Set SCEAgent = CreateObject("Ssr.SCEAgent")
If Err.Number <> 0 Then
WScript.Echo "Creating SSR.SCEAgent failed."
WScript.Quit Err.Number
End If
SCEAgent.Configure "<xsl:value-of select="$CfgInf"/>", 65535, "<xsl:value-of select="$Rbklog"/>"
If Err.Number <> 0 Then
WScript.Echo "SCEAgent.Configure failed."
WScript.Quit Err.Number
End If
<![CDATA[
</script>
</job>
]]>
</xsl:template>
</xsl:stylesheet>
| 23.254237 | 97 | 0.656706 |
7bd2d97d7fac348f3acfdf4262aeffdfece3cdc6 | 34,482 | xsl | XSLT | src/Spreadsheet/Converter/resources/odf2oox/validation.xsl | datadiode/B2XTranslator | 9dd6b53b835569e5aa705b37b7ac392328d70af7 | [
"BSD-3-Clause"
] | 1 | 2018-09-29T01:19:17.000Z | 2018-09-29T01:19:17.000Z | src/Spreadsheet/Converter/resources/odf2oox/validation.xsl | datadiode/B2XTranslator | 9dd6b53b835569e5aa705b37b7ac392328d70af7 | [
"BSD-3-Clause"
] | 1 | 2019-02-03T21:53:49.000Z | 2019-02-03T21:53:49.000Z | src/Spreadsheet/Converter/resources/odf2oox/validation.xsl | datadiode/B2XTranslator | 9dd6b53b835569e5aa705b37b7ac392328d70af7 | [
"BSD-3-Clause"
] | 1 | 2020-01-12T14:10:45.000Z | 2020-01-12T14:10:45.000Z | <?xml version="1.0" encoding="UTF-8"?>
<!--
* Copyright (c) 2006, Clever Age
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of Clever Age nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"
xmlns:pzip="urn:cleverage:xmlns:post-processings:zip"
xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0"
xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0"
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0"
xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0"
xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
exclude-result-prefixes="table r">
<!--<xsl:import href="conditional.xsl"/>-->
<!-- search validation -->
<xsl:template match="table:table-row" mode="validation">
<xsl:param name="rowNumber"/>
<xsl:param name="cellNumber"/>
<xsl:param name="TableColumnTagNum"/>
<xsl:param name="MergeCell"/>
<xsl:param name="tableName"/>
<xsl:apply-templates select="child::node()[name() = 'table:table-cell'][1]"
mode="validation">
<xsl:with-param name="colNumber">
<xsl:text>0</xsl:text>
</xsl:with-param>
<xsl:with-param name="rowNumber" select="$rowNumber"/>
<xsl:with-param name="TableColumnTagNum" select="$TableColumnTagNum"/>
<xsl:with-param name="MergeCell" select="$MergeCell"/>
<xsl:with-param name="tableName" select="$tableName"/>
</xsl:apply-templates>
<!-- check next row -->
<xsl:choose>
<!-- next row is a sibling -->
<xsl:when test="following-sibling::node()[1][name() = 'table:table-row' ]">
<xsl:apply-templates select="following-sibling::table:table-row[1]"
mode="validation">
<!--Vijayeta,SP2,@table:number-rows-repeated-->
<!--<xsl:with-param name="rowNumber">
<xsl:choose>
<xsl:when test="@table:number-rows-repeated">
<xsl:value-of select="$rowNumber+@table:number-rows-repeated"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$rowNumber+1"/>
</xsl:otherwise>
</xsl:choose>
</xsl:with-param>-->
<xsl:with-param name="rowNumber">
<xsl:choose>
<xsl:when test="@table:number-rows-repeated">
<xsl:choose >
<xsl:when test ="@table:number-rows-repeated > 65536">
<xsl:value-of select ="$rowNumber+(65536 - (1048576 - @table:number-rows-repeated))"/>
</xsl:when>
<xsl:when test ="@table:number-rows-repeated <= 65536">
<xsl:value-of select="$rowNumber+@table:number-rows-repeated"/>
</xsl:when>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$rowNumber+1"/>
</xsl:otherwise>
</xsl:choose>
</xsl:with-param>
<!--Vijayeta,SP2,@table:number-rows-repeated,End-->
<xsl:with-param name="cellNumber">
<xsl:text>0</xsl:text>
</xsl:with-param>
<xsl:with-param name="TableColumnTagNum" select="$TableColumnTagNum"/>
<xsl:with-param name="MergeCell" select="$MergeCell"/>
<xsl:with-param name="tableName" select="$tableName"/>
</xsl:apply-templates>
</xsl:when>
</xsl:choose>
</xsl:template>
<!-- insert validation -->
<xsl:template match="table:table-cell|table:covered-table-cell" mode="validation">
<xsl:param name="colNumber"/>
<xsl:param name="rowNumber"/>
<xsl:param name="TableColumnTagNum"/>
<xsl:param name="MergeCell"/>
<xsl:param name="tableName"/>
<xsl:if test="./@table:content-validation-name != ''">
<xsl:variable name="ValidationName">
<xsl:value-of select="@table:content-validation-name"/>
</xsl:variable>
<!--Vijayeta,SP2,@table:number-columns-repeated/@table:number-rows-repeated-->
<!--<xsl:variable name="RowsRepeated">
<xsl:value-of select="parent::table:table-row/@table:number-rows-repeated"/>
</xsl:variable>-->
<!--<xsl:variable name="CollRepeated">
<xsl:value-of select="@table:number-columns-repeated"/>
</xsl:variable>-->
<xsl:variable name="RowsRepeated">
<xsl:choose >
<xsl:when test ="parent::table:table-row/@table:number-rows-repeated > 65536">
<xsl:value-of select ="65536 - (1048576 - parent::table:table-row/@table:number-rows-repeated)"/>
</xsl:when>
<xsl:when test ="parent::table:table-row/@table:number-rows-repeated <= 65536">
<xsl:value-of select="parent::table:table-row/@table:number-rows-repeated"/>
</xsl:when>
</xsl:choose>
</xsl:variable>
<xsl:variable name="CollRepeated">
<!--<xsl:choose >
<xsl:when test ="@table:number-columns-repeated > 256">
<xsl:value-of select ="256 - (16384 - @table:number-columns-repeated)"/>
</xsl:when>
<xsl:when test ="@table:number-columns-repeated <= 256">
<xsl:value-of select="@table:number-columns-repeated"/>
</xsl:when>
</xsl:choose>-->
<xsl:variable name ="tempOfficeVersion">
<xsl:value-of select ="document('meta.xml')/office:document-meta/office:meta/meta:generator"/>
</xsl:variable>
<xsl:choose>
<xsl:when test ="starts-with($tempOfficeVersion,'OpenOffice.org')">
<xsl:value-of select="@table:number-columns-repeated"/>
</xsl:when>
<xsl:when test ="starts-with($tempOfficeVersion,'MicrosoftOffice')">
<xsl:choose>
<xsl:when test ="@table:number-columns-repeated > 256">
<xsl:value-of select ="256 - (16384 - @table:number-columns-repeated)"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="@table:number-columns-repeated"/>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="@table:number-columns-repeated"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<!--Vijayeta,SP2,@table:number-columns-repeated/@table:number-rows-repeated,End-->
<xsl:for-each
select="ancestor::office:body/office:spreadsheet/table:content-validations/table:content-validation[@table:name = $ValidationName]">
<xsl:call-template name="dataValid">
<xsl:with-param name="rowNumber">
<xsl:value-of select="$rowNumber"/>
</xsl:with-param>
<xsl:with-param name="colNumber">
<xsl:value-of select="$colNumber"/>
</xsl:with-param>
<xsl:with-param name="RowsRepeated">
<xsl:value-of select="$RowsRepeated"/>
</xsl:with-param>
<xsl:with-param name="CollRepeated">
<xsl:value-of select="$CollRepeated"/>
</xsl:with-param>
</xsl:call-template>
</xsl:for-each>
</xsl:if>
<xsl:if test="following-sibling::table:table-cell">
<xsl:apply-templates
select="following-sibling::node()[1][name() = 'table:table-cell' or name() = 'table:covered-table-cell']"
mode="validation">
<!--Vijayeta,SP2,@table:number-columns-repeated,End-->
<!--<xsl:with-param name="colNumber">
<xsl:choose>
<xsl:when test="@table:number-columns-repeated != ''">
<xsl:value-of
select="number($colNumber) + number(@table:number-columns-repeated)"
/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$colNumber + 1"/>
</xsl:otherwise>
</xsl:choose>
</xsl:with-param>-->
<xsl:with-param name="colNumber">
<!--<xsl:choose>
<xsl:when test="@table:number-columns-repeated != ''">
<xsl:choose >
<xsl:when test ="@table:number-columns-repeated > 256">
<xsl:value-of select ="number($colNumber) + number(256 - (16384 - number(@table:number-columns-repeated)))"/>
</xsl:when>
<xsl:when test ="@table:number-columns-repeated <= 256">
<xsl:value-of
select="number($colNumber) + number(@table:number-columns-repeated)"/>
</xsl:when>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$colNumber + 1"/>
</xsl:otherwise>
</xsl:choose>-->
<xsl:variable name ="tempOfficeVersion">
<xsl:value-of select ="document('meta.xml')/office:document-meta/office:meta/meta:generator"/>
</xsl:variable>
<xsl:choose>
<xsl:when test="@table:number-columns-repeated != ''">
<xsl:choose>
<xsl:when test ="starts-with($tempOfficeVersion,'OpenOffice.org')">
<xsl:value-of
select="number($colNumber) + number(@table:number-columns-repeated)"/>
</xsl:when>
<xsl:when test ="starts-with($tempOfficeVersion,'MicrosoftOffice')">
<xsl:choose>
<xsl:when test ="@table:number-columns-repeated > 256">
<xsl:value-of select ="number($colNumber) + number(256 - (16384 - number(@table:number-columns-repeated)))"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of
select="number($colNumber) + number(@table:number-columns-repeated)"/>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:value-of
select="number($colNumber) + number(@table:number-columns-repeated)"/>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$colNumber + 1"/>
</xsl:otherwise>
</xsl:choose>
</xsl:with-param>
<!--Vijayeta,SP2,@table:number-columns-repeated,End-->
<xsl:with-param name="rowNumber">
<xsl:value-of select="$rowNumber"/>
</xsl:with-param>
<xsl:with-param name="TableColumnTagNum" select="$TableColumnTagNum"/>
<xsl:with-param name="MergeCell" select="$MergeCell"/>
<xsl:with-param name="tableName" select="$tableName"/>
</xsl:apply-templates>
</xsl:if>
</xsl:template>
<!-- Data Validation Template -->
<xsl:template name="dataValid">
<xsl:param name="colNumber"/>
<xsl:param name="rowNumber"/>
<xsl:param name="RowsRepeated"/>
<xsl:param name="CollRepeated"/>
<dataValidation>
<!-- Criteria Allow -->
<xsl:attribute name="type">
<xsl:choose>
<xsl:when test="contains(@table:condition, 'is-whole-number')">
<xsl:text>whole</xsl:text>
</xsl:when>
<xsl:when test="contains(@table:condition, 'is-decimal-number')">
<xsl:text>decimal</xsl:text>
</xsl:when>
<xsl:when test="contains(@table:condition, 'is-date')">
<xsl:text>date</xsl:text>
</xsl:when>
<xsl:when test="contains(@table:condition, 'is-time')">
<xsl:text>time</xsl:text>
</xsl:when>
<!--Conditon(or condition) added by Sateesh, fix for the bug 1768233
Bug Description:ODS Filters dropdown list worngly converted-office XP/2003
File Name:Criminal.EN.ods
Date:14th July '08-->
<xsl:when test="contains(@table:condition, 'is-in-list("') or contains(@table:condition, 'cell-content-is-in-list')">
<xsl:text>list</xsl:text>
</xsl:when>
<xsl:when test="contains(@table:condition, 'cell-content-text-length')">
<xsl:text>textLength</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>whole</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<!-- Error Allert Action-->
<!--
Changes By: Vijayeta
Desc : attribute 'errorStyle' is set to blank in SP2 converted file, which actually works in SP2 but in SP1
File : MS_Kalkulace_Campus_Agreement.xlsx->SP2->MS_Kalkulace_Campus_Agreement.ods->Translator->MS_Kalkulace_Campus_Agreement.xlsx
-->
<xsl:for-each select="table:error-message">
<xsl:if test ="table:error-message/@table:message-type">
<xsl:attribute name="errorStyle">
<xsl:choose>
<xsl:when test="contains(@table:message-type, 'information')">
<xsl:text>information</xsl:text>
</xsl:when>
<xsl:when test="contains(@table:message-type, 'warning')">
<xsl:text>warning</xsl:text>
</xsl:when>
<xsl:when test="contains(@table:message-type, 'stop')">
<xsl:text>stop</xsl:text>
</xsl:when>
</xsl:choose>
</xsl:attribute>
</xsl:if>
</xsl:for-each>
<xsl:if test="table:error-macro">
<xsl:message terminate="no">translation.odf2oox.DataValidErrorMacro</xsl:message>
</xsl:if>
<xsl:if test="contains(@table:condition, 'is-in-list(') and not(contains(@table:condition, 'is-in-list("'))">
<xsl:message terminate="no">translation.odf2oox.DataValidCellRange</xsl:message>
</xsl:if>
<!-- Criteria Data -->
<xsl:attribute name="operator">
<xsl:choose>
<xsl:when test="contains(@table:condition, '<=')">
<xsl:text>lessThanOrEqual</xsl:text>
</xsl:when>
<xsl:when test="contains(@table:condition, '<')">
<xsl:text>lessThan</xsl:text>
</xsl:when>
<xsl:when test="contains(@table:condition, '>=')">
<xsl:text>greaterThanOrEqual</xsl:text>
</xsl:when>
<xsl:when test="contains(@table:condition, '>')">
<xsl:text>greaterThan</xsl:text>
</xsl:when>
<xsl:when test="contains(@table:condition, '!=')">
<xsl:text>notEqual</xsl:text>
</xsl:when>
<xsl:when test="contains(@table:condition, 'is-between')">
<xsl:text>between</xsl:text>
</xsl:when>
<xsl:when test="contains(@table:condition, 'is-not-between')">
<xsl:text>notBetween</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>equal</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<!-- Criteria Allow Blank Cells -->
<xsl:choose>
<xsl:when test="contains(@table:allow-empty-cell, 'true')">
<xsl:attribute name="allowBlank">
<xsl:text>1</xsl:text>
</xsl:attribute>
</xsl:when>
</xsl:choose>
<!-- Input Help - Show input help when cell is selected -->
<xsl:for-each select="table:help-message">
<xsl:if test="contains(@table:display, 'true')">
<xsl:attribute name="showInputMessage">
<xsl:text>1</xsl:text>
</xsl:attribute>
</xsl:if>
<!-- Input Help Title -->
<xsl:if test="@table:title !='' ">
<xsl:attribute name="promptTitle">
<xsl:value-of select="@table:title"/>
</xsl:attribute>
</xsl:if>
<!-- Input Help - input help -->
<xsl:if test=".!=''">
<xsl:attribute name="prompt">
<xsl:value-of select="."/>
</xsl:attribute>
</xsl:if>
</xsl:for-each>
<!-- Show error message wheninvalid values are entered -->
<xsl:for-each select="table:error-message">
<xsl:if test="contains(@table:display, 'true')">
<xsl:attribute name="showErrorMessage">
<xsl:text>1</xsl:text>
</xsl:attribute>
</xsl:if>
<!-- Error Allert Title -->
<xsl:if test="@table:title !='' ">
<xsl:attribute name="errorTitle">
<xsl:value-of select="@table:title"/>
</xsl:attribute>
</xsl:if>
<!-- Error Allert message -->
<xsl:if test=".!='' ">
<xsl:attribute name="error">
<xsl:value-of select="substring(., 1, 255)"/>
</xsl:attribute>
</xsl:if>
</xsl:for-each>
<!-- Converts number of column on letter -->
<xsl:variable name="Collnumber2Char">
<xsl:call-template name="NumbersToChars">
<xsl:with-param name="num">
<xsl:value-of select="$colNumber"/>
</xsl:with-param>
</xsl:call-template>
</xsl:variable>
<!-- Defines range of cells -->
<xsl:attribute name="sqref">
<xsl:choose>
<xsl:when test="$RowsRepeated !='' and $CollRepeated !='' ">
<xsl:variable name="RownumberEnd">
<xsl:value-of select="$rowNumber + $RowsRepeated"/>
</xsl:variable>
<xsl:variable name="CollnumberEnd2Char">
<xsl:call-template name="NumbersToChars">
<xsl:with-param name="num">
<xsl:value-of select="$colNumber + $CollRepeated - 1"/>
</xsl:with-param>
</xsl:call-template>
</xsl:variable>
<xsl:value-of
select="concat((concat((concat($Collnumber2Char, $rowNumber)), ':')), concat($CollnumberEnd2Char, $RownumberEnd))"
/>
</xsl:when>
<xsl:when test="$RowsRepeated !='' and $CollRepeated =''">
<xsl:variable name="RownumberEnd">
<xsl:value-of select="$rowNumber + $RowsRepeated - 1"/>
</xsl:variable>
<xsl:value-of
select="concat((concat((concat($Collnumber2Char, $rowNumber)), ':')), concat($Collnumber2Char, $RownumberEnd))"
/>
</xsl:when>
<xsl:when test="$RowsRepeated ='' and $CollRepeated !=''">
<xsl:variable name="CollnumberEnd2Char">
<xsl:call-template name="NumbersToChars">
<xsl:with-param name="num">
<xsl:value-of select="$colNumber + $CollRepeated - 1"/>
</xsl:with-param>
</xsl:call-template>
</xsl:variable>
<xsl:value-of
select="concat((concat((concat($Collnumber2Char, $rowNumber)), ':')), concat($CollnumberEnd2Char, $rowNumber))"
/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat($Collnumber2Char, $rowNumber)"/>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<!-- inserts formula template -->
<xsl:call-template name="InsertValidityFormula">
<xsl:with-param name="tableName" select="@table:name"/>
</xsl:call-template>
</dataValidation>
</xsl:template>
<!-- Insert Criteria Formula of Data Validation -->
<xsl:template name="InsertValidityFormula">
<xsl:param name="tableName"/>
<xsl:choose>
<xsl:when test="contains(@table:condition, '.$#REF!$#REF!')">
<formula1/>
</xsl:when>
<!-- Condition: Formula is -->
<xsl:when test="contains(@table:condition, 'is-true-formula')">
<formula1/>
</xsl:when>
<!-- Condition: Cell content is less than or equal to-->
<xsl:when test="contains(@table:condition, '<=')">
<formula1>
<xsl:call-template name="TranslateFormula">
<xsl:with-param name="formula"
select="substring-after(@table:condition,'<=')"/>
<xsl:with-param name="tableName" select="$tableName"/>
</xsl:call-template>
</formula1>
</xsl:when>
<!-- Condition: Cell content is less than -->
<xsl:when test="contains(@table:condition, '<')">
<formula1>
<xsl:call-template name="TranslateFormula">
<xsl:with-param name="formula"
select="substring-after(@table:condition,'<')"/>
<xsl:with-param name="tableName" select="$tableName"/>
</xsl:call-template>
</formula1>
</xsl:when>
<!-- Condition: Cell content is greater than or equal to-->
<xsl:when test="contains(@table:condition, '>=')">
<formula1>
<xsl:call-template name="TranslateFormula">
<xsl:with-param name="formula"
select="substring-after(@table:condition,'>=')"/>
<xsl:with-param name="tableName" select="$tableName"/>
</xsl:call-template>
</formula1>
</xsl:when>
<!-- Condition: Cell content is greater than -->
<xsl:when test="contains(@table:condition, '>')">
<formula1>
<xsl:call-template name="TranslateFormula">
<xsl:with-param name="formula"
select="substring-after(@table:condition,'>')"/>
<xsl:with-param name="tableName" select="$tableName"/>
</xsl:call-template>
</formula1>
</xsl:when>
<!-- Condition: Cell content is not equal to -->
<xsl:when test="contains(@table:condition, '!=')">
<formula1>
<xsl:call-template name="TranslateFormula">
<xsl:with-param name="formula"
select="substring-after(@table:condition,'!=')"/>
<xsl:with-param name="tableName" select="$tableName"/>
</xsl:call-template>
</formula1>
</xsl:when>
<!-- Condition: Cell content is equal to -->
<xsl:when test="contains(@table:condition, '=')">
<formula1>
<xsl:call-template name="TranslateFormula">
<xsl:with-param name="formula"
select="substring-after(@table:condition,'=')"/>
<xsl:with-param name="tableName" select="$tableName"/>
</xsl:call-template>
</formula1>
</xsl:when>
<!-- Condition: Cell content is between -->
<!-- Condition: Cell content is not between -->
<xsl:when test="contains(@table:condition, 'between')">
<formula1>
<xsl:call-template name="TranslateFormula">
<xsl:with-param name="formula"
select="substring-before(substring-after(@table:condition,'between('),',')"/>
<xsl:with-param name="tableName" select="$tableName"/>
</xsl:call-template>
</formula1>
<formula2>
<xsl:call-template name="TranslateFormula">
<xsl:with-param name="formula"
select="substring-before(substring-after(@table:condition,','),')')"/>
<xsl:with-param name="tableName" select="$tableName"/>
</xsl:call-template>
</formula2>
</xsl:when>
<!-- Condition: Cell content is in list -->
<!-- Code added by Sateesh, fix for the bug 1768233
Bug Description:ODS Filters dropdown list worngly converted-office XP/2003
File Name:Criminal.EN.ods
Date:14th July '08-->
<xsl:when test="contains(@table:condition, 'cell-content-is-in-list')">
<xsl:variable name="listValue">
<xsl:value-of select="substring-before(substring-after(@table:condition,'cell-content-is-in-list(['),'])')"/>
</xsl:variable>
<xsl:choose>
<xsl:when test="contains($listValue,'.') and contains($listValue,':')">
<formula1>
<xsl:value-of select="concat(substring-after(substring-before($listValue,':'),'.'),':',substring-after(substring-after($listValue,':'),'.'))"/>
</formula1>
<formula2>
<xsl:text>0</xsl:text>
</formula2>
</xsl:when>
<xsl:when test="contains(@table:condition,';')">
<formula1>
<xsl:variable name="value">
<xsl:value-of select="translate(translate(substring-before(substring-after(@table:condition,'cell-content-is-in-list('),')'),'"',' '),';',',')"/>
</xsl:variable>
<xsl:value-of select="concat('"',$value,'"')"/>
</formula1>
<formula2>
<xsl:text>0</xsl:text>
</formula2>
</xsl:when>
<xsl:otherwise>
<formula1>
<xsl:variable name="value">
<xsl:value-of select="translate(translate(substring-before(substring-after(@table:condition,'cell-content-is-in-list('),')'),'"',' '),';',',')"/>
</xsl:variable>
<xsl:value-of select="concat('"',$value,'"')"/>
</formula1>
<formula2>
<xsl:text>0</xsl:text>
</formula2>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<!--End-->
</xsl:choose>
</xsl:template>
<xsl:template name="TranslateReferences">
<xsl:param name="string"/>
<xsl:param name="tableName"/>
<xsl:variable name="apos">
<xsl:text>'</xsl:text>
</xsl:variable>
<xsl:choose>
<xsl:when test="contains($string,'[')">
<xsl:variable name="reference">
<xsl:value-of select="substring-before(substring-after($string,'['),']')"/>
</xsl:variable>
<xsl:choose>
<!-- when reference is to a cell in the same sheet ($sheet_name.ref or .ref)-->
<xsl:when
test="substring-before($reference,'.') = concat('$',$tableName) or substring-before($reference,'.') = '' ">
<xsl:call-template name="TranslateReferences">
<xsl:with-param name="string">
<xsl:value-of select="substring-before($string,'[')"/>
<xsl:value-of select="substring-after($reference,'.')"/>
<xsl:value-of select="substring-after($string,']')"/>
</xsl:with-param>
<xsl:with-param name="tableName" select="$tableName"/>
</xsl:call-template>
</xsl:when>
<!-- when reference is to a cell in another sheet -->
<xsl:when test="substring-before($reference,'.') != concat('$',$tableName)">
<xsl:variable name="sheet">
<xsl:choose>
<xsl:when test="starts-with($reference,'$')">
<xsl:value-of
select="substring-after(substring-before($reference,'.'),'$')"
/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="substring-before($reference,'.')"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="refSheetNumber">
<xsl:for-each
select="/office:document-content/office:body/office:spreadsheet/table:table[@table:name = translate($sheet,$apos,'')]">
<xsl:number count="table:table" level="single"/>
</xsl:for-each>
</xsl:variable>
<xsl:variable name="checkedName">
<xsl:for-each
select="/office:document-content/office:body/office:spreadsheet/table:table[@table:name = translate($sheet,$apos,'')]">
<xsl:call-template name="CheckSheetName">
<xsl:with-param name="sheetNumber">
<xsl:value-of select="$refSheetNumber"/>
</xsl:with-param>
<xsl:with-param name="name">
<xsl:value-of
select="substring(translate($sheet,"*\/[]:'?",""),1,31)"
/>
</xsl:with-param>
</xsl:call-template>
</xsl:for-each>
</xsl:variable>
<xsl:call-template name="TranslateReferences">
<xsl:with-param name="string">
<xsl:value-of select="substring-before($string,'[')"/>
<!-- if sheet name has space than write name in apostrophes -->
<xsl:if test="contains($checkedName,' ')">
<xsl:text>'</xsl:text>
</xsl:if>
<xsl:value-of select="$checkedName"/>
<xsl:if test="contains($checkedName,' ')">
<xsl:text>'</xsl:text>
</xsl:if>
<xsl:text>!</xsl:text>
<xsl:value-of select="substring-after($reference,'.')"/>
<xsl:value-of select="substring-after($string,']')"/>
</xsl:with-param>
<xsl:with-param name="tableName" select="$tableName"/>
</xsl:call-template>
</xsl:when>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$string"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
| 47.365385 | 158 | 0.494316 |
965300492f3d806ce206bfde772cfcc7adc74dc9 | 2,841 | xsl | XSLT | webapp/WEB-INF/xsl/normal/portlet_document_list_la_demarche_sommaire.xsl | lutece-secteur-public/particip-site-participatorybudget | 3367449b0d6434aa6e09221e7919a32107d05017 | [
"BSD-3-Clause"
] | 4 | 2020-02-06T18:19:29.000Z | 2022-02-09T08:45:49.000Z | webapp/WEB-INF/xsl/normal/portlet_document_list_la_demarche_sommaire.xsl | lutece-secteur-public/particip-site-participatorybudget | 3367449b0d6434aa6e09221e7919a32107d05017 | [
"BSD-3-Clause"
] | 1 | 2020-07-27T08:26:10.000Z | 2020-07-27T10:14:59.000Z | webapp/WEB-INF/xsl/normal/portlet_document_list_la_demarche_sommaire.xsl | lutece-secteur-public/particip-site-participatorybudget | 3367449b0d6434aa6e09221e7919a32107d05017 | [
"BSD-3-Clause"
] | 4 | 2020-03-16T16:22:02.000Z | 2020-07-29T12:48:36.000Z | <?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:param name="site-path" select="site-path" />
<xsl:variable name="portlet-id" select="portlet/portlet-id" />
<!-- *********************************************************************************** -->
<!-- * SOMMAIRE SOMMAIRE SOMMAIRE SOMMAIRE SOMMAIRE SOMMAIRE SOMMAIRE SOMMAIRE SOMMAIR * -->
<!-- * SOMMAIRE SOMMAIRE SOMMAIRE SOMMAIRE SOMMAIRE SOMMAIRE SOMMAIRE SOMMAIRE SOMMAIR * -->
<!-- *********************************************************************************** -->
<xsl:template match="portlet">
<xsl:variable name="device_class">
<xsl:choose>
<xsl:when test="string(display-on-small-device)='0'">hidden-phone</xsl:when>
<xsl:when test="string(display-on-normal-device)='0'">hidden-tablet</xsl:when>
<xsl:when test="string(display-on-large-device)='0'">hidden-desktop</xsl:when>
<xsl:otherwise></xsl:otherwise>
</xsl:choose>
</xsl:variable>
<div id="portlet-ladem-som" class="container-fluid {$device_class}">
<div class="row">
<div id="search-form">
<h1>La démarche</h1>
<h2>Le mode d'emploi du Budget Participatif</h2>
</div>
<div class="container">
<xsl:apply-templates select="document-list-portlet" />
</div>
</div>
</div>
</xsl:template>
<!-- *********************************************************************************** -->
<!-- * CHAPTER CHAPTER CHAPTER CHAPTER CHAPTER CHAPTER CHAPTER CHAPTER CHAPTER CHAPTER * -->
<!-- * CHAPTER CHAPTER CHAPTER CHAPTER CHAPTER CHAPTER CHAPTER CHAPTER CHAPTER CHAPTER * -->
<!-- *********************************************************************************** -->
<xsl:template match="document-list-portlet">
<xsl:apply-templates select="document/document-xml-content/ladem_chapter" />
</xsl:template>
<xsl:template match="ladem_chapter">
<div class="ladem-chapter-line row row-eq-height">
<div class="ladem-chapter-col1 col-xs-12 col-sm-12 col-md-1 col-md-offset-2">
<div class="ladem-chapter-num">
<xsl:value-of select="position()"/>
</div>
</div>
<div class="ladem-chapter-col2 col-xs-12 col-sm-12 col-md-7">
<div class="ladem-chapter-period"><xsl:value-of select="ladem_chapter-period"/></div>
<div class="ladem-chapter-title"><xsl:value-of select="document-title"/></div>
<div class="ladem-chapter-content"><xsl:value-of select="document-summary"/></div>
<a class="ladem-chapter-btn btn btn-14rem btn-black-on-white">
<xsl:attribute name="href">jsp/site/Portal.jsp?page_id=<xsl:value-of select="ladem_chapter-page_id"/></xsl:attribute>
En savoir plus
</a>
</div>
</div>
</xsl:template>
</xsl:stylesheet>
| 37.381579 | 123 | 0.565998 |
e8e13cea646ff51be5a968f4410e14682157cea8 | 2,770 | xsl | XSLT | indexes/default/main/conf/xslt/related_query.xsl | bireme/iahx-server | ad7525d24a7c9a349a5189f32352373070190b4d | [
"Apache-2.0"
] | null | null | null | indexes/default/main/conf/xslt/related_query.xsl | bireme/iahx-server | ad7525d24a7c9a349a5189f32352373070190b4d | [
"Apache-2.0"
] | 2 | 2020-10-15T13:13:53.000Z | 2021-08-11T12:57:16.000Z | indexes/default/main/conf/xslt/related_query.xsl | bireme/iahx-server | ad7525d24a7c9a349a5189f32352373070190b4d | [
"Apache-2.0"
] | null | null | null | <?xml version='1.0' encoding='UTF-8'?>
<xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
<xsl:output method="text" media-type="text/plain; charset=UTF-8" encoding="UTF-8"/>
<xsl:template match='/'>
<xsl:apply-templates select="response/result/doc"/>
</xsl:template>
<xsl:template match="doc">
<xsl:variable name="query">
<xsl:apply-templates select="*[@name='ti']"/>
<xsl:if test="*[@name='mh']">
OR <xsl:apply-templates select="*[@name='mh']"/>
</xsl:if>
<xsl:if test="*[@name='ab'] and not(*[@name='mh'])">
OR <xsl:apply-templates select="*[@name='ab']"/>
</xsl:if>
</xsl:variable>
<xsl:value-of select="normalize-space($query)"/>
</xsl:template>
<xsl:template match="doc/*"/>
<xsl:template match="doc/*[@name='ti']">
<xsl:call-template name="globalReplace">
<xsl:with-param name="outputString" select="."/>
<xsl:with-param name="target" select="' '"/>
<xsl:with-param name="replacement" select="' OR '"/>
</xsl:call-template>
</xsl:template>
<xsl:template match="doc/*[@name='mh']">
<xsl:text></xsl:text><xsl:apply-templates/>
</xsl:template>
<xsl:template match="doc/*[@name='mh']/*">
<xsl:if test="position() > 1"> OR </xsl:if>
<xsl:choose>
<xsl:when test="contains(.,'^s')">"<xsl:value-of select="substring-before(.,'^s')"/>"</xsl:when>
<xsl:otherwise>"<xsl:value-of select="."/>"</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="doc/*[@name='ab']">
<xsl:text>ab:(</xsl:text><xsl:apply-templates/>)
</xsl:template>
<xsl:template match="doc/*[@name='ab']/*">
<xsl:variable name="words" select="normalize-space(substring(.,1,200))"/>
<xsl:call-template name="globalReplace">
<xsl:with-param name="outputString" select="$words"/>
<xsl:with-param name="target" select="' '"/>
<xsl:with-param name="replacement" select="' OR '"/>
</xsl:call-template>
</xsl:template>
<xsl:template name="globalReplace">
<xsl:param name="outputString"/>
<xsl:param name="target"/>
<xsl:param name="replacement"/>
<xsl:choose>
<xsl:when test="contains($outputString,$target)">
<xsl:value-of select="concat(substring-before($outputString,$target), $replacement)"/>
<xsl:call-template name="globalReplace">
<xsl:with-param name="outputString" select="substring-after($outputString,$target)"/>
<xsl:with-param name="target" select="$target"/>
<xsl:with-param name="replacement" select="$replacement"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$outputString"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
| 33.373494 | 100 | 0.609747 |
cdc44d2aa2778618418c84d88257d066be6da342 | 10,928 | xsl | XSLT | verbapie/cts_html.xsl | galenus-verbatim/Verbapy | 801cd8fd0eb6c63d7f950eec48343fc002fb8b6f | [
"MIT"
] | null | null | null | verbapie/cts_html.xsl | galenus-verbatim/Verbapy | 801cd8fd0eb6c63d7f950eec48343fc002fb8b6f | [
"MIT"
] | null | null | null | verbapie/cts_html.xsl | galenus-verbatim/Verbapy | 801cd8fd0eb6c63d7f950eec48343fc002fb8b6f | [
"MIT"
] | null | null | null | <?xml version="1.0" encoding="UTF-8"?>
<!--
Part of verbapy https://github.com/galenus-verbatim/verbapy
Copyright (c) 2021 Nathalie Rousseau
MIT License https://opensource.org/licenses/mit-license.php
Split a single TEI file in a multi-pages site
output method="html" for <span></span>
-->
<xsl:transform version="1.1"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:tei="http://www.tei-c.org/ns/1.0"
xmlns="http://www.w3.org/1999/xhtml"
exclude-result-prefixes="tei"
>
<!-- output html requested with xsltproc, < -->
<xsl:output indent="yes" encoding="UTF-8" method="html" />
<xsl:template match="tei:*">
<xsl:message terminate="yes">
<xsl:text>[cts_html.xsl] </xsl:text>
<xsl:text><</xsl:text>
<xsl:value-of select="name()"/>
<xsl:text>></xsl:text>
<xsl:text> TEI tag not yet handled</xsl:text>
</xsl:message>
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="tei:teiHeader"/>
<xsl:template match="tei:TEI | tei:text | tei:body">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="tei:add">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="tei:author">
<span class="{local-name()}">
<xsl:apply-templates/>
</span>
</xsl:template>
<xsl:template match="tei:bibl">
<span class="{local-name()}">
<xsl:apply-templates/>
</span>
</xsl:template>
<xsl:template match="tei:choice">
<xsl:choose>
<xsl:when test="tei:supplied">
<xsl:apply-templates select="tei:supplied"/>
</xsl:when>
<xsl:when test="tei:corr">
<xsl:apply-templates select="tei:corr"/>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="*[1]"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="tei:cit">
<span class="{local-name()}">
<xsl:apply-templates/>
</span>
</xsl:template>
<xsl:template match="tei:date">
<span class="{local-name()}" rel="{@notBefore}-{@notAfter}">
<xsl:apply-templates/>
</span>
</xsl:template>
<xsl:template match="tei:del"/>
<xsl:template match="tei:desc">
<span class="{local-name()}">
<xsl:apply-templates/>
</span>
</xsl:template>
<xsl:template match="tei:div">
<section>
<xsl:apply-templates/>
</section>
</xsl:template>
<xsl:template match="tei:figDesc">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="tei:figure">
<figure>
<xsl:apply-templates/>
</figure>
</xsl:template>
<xsl:template match="tei:forename">
<span class="{local-name()}">
<xsl:apply-templates/>
</span>
</xsl:template>
<!-- Graphic founds seem links
<graphic url="https://babel.hathitrust.org/cgi/pt?id=hvd.hxpp8p;view=2up;seq=514"/>
-->
<xsl:template match="tei:graphic">
<a href="{@url}">
<xsl:text>[p. </xsl:text>
<xsl:value-of select="(preceding::tei:pb)[1]/@n"/>
<xsl:text>]</xsl:text>
</a>
</xsl:template>
<xsl:template match="tei:gap"/>
<xsl:template match="tei:head">
<h1>
<xsl:apply-templates/>
</h1>
</xsl:template>
<!-- line identifier -->
<xsl:template match="tei:lb" name="lb">
<xsl:param name="n">
<xsl:choose>
<xsl:when test="@n != ''">
<xsl:value-of select="@n"/>
</xsl:when>
</xsl:choose>
</xsl:param>
<xsl:variable name="page">
<xsl:call-template name="data-page"/>
</xsl:variable>
<xsl:choose>
<xsl:when test="$n != ''">
<span class="lb">
<xsl:attribute name="data-page">
<xsl:value-of select="$page"/>
</xsl:attribute>
<xsl:attribute name="data-line">
<xsl:value-of select="$n"/>
</xsl:attribute>
<xsl:attribute name="id">
<xsl:text>p</xsl:text>
<xsl:value-of select="$page"/>
<xsl:text>.</xsl:text>
<xsl:value-of select="$n"/>
</xsl:attribute>
</span>
</xsl:when>
<xsl:otherwise>
<!-- xmlns="http://www.w3.org/1999/xhtml" prodce <br></br> -->
<xsl:text disable-output-escaping="yes"><br/></xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="tei:l">
<div class="l">
<xsl:if test="@n">
<xsl:call-template name="lb">
<xsl:with-param name="n">
<xsl:value-of select="@n"/>
</xsl:with-param>
</xsl:call-template>
</xsl:if>
<xsl:apply-templates/>
</div>
</xsl:template>
<xsl:template match="tei:label">
<label>
<xsl:apply-templates/>
</label>
</xsl:template>
<xsl:template match="tei:label/tei:num">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="tei:item">
<li>
<xsl:apply-templates/>
</li>
</xsl:template>
<xsl:template match="tei:list">
<ul>
<xsl:apply-templates/>
</ul>
</xsl:template>
<xsl:template match="tei:list[@rend='table']">
<table>
<xsl:apply-templates/>
</table>
</xsl:template>
<xsl:template match="tei:list[@rend='table']/tei:item">
<tbody>
<xsl:apply-templates/>
</tbody>
</xsl:template>
<xsl:template match="tei:list[@rend='table']/tei:item[1]">
<thead>
<xsl:apply-templates/>
</thead>
</xsl:template>
<xsl:template match="tei:list[@rend='row']">
<tr>
<xsl:apply-templates/>
</tr>
</xsl:template>
<xsl:template match="tei:list[@rend='row']/tei:item">
<xsl:choose>
<xsl:when test="tei:label and count(*) = 1 and not(text()[normalize-space(.) != ''])">
<th>
<xsl:apply-templates select="tei:label/node()"/>
</th>
</xsl:when>
<xsl:otherwise>
<td>
<xsl:apply-templates/>
</td>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="tei:lg">
<div class="lg">
<xsl:apply-templates/>
</div>
</xsl:template>
<xsl:template match="tei:milestone">
<xsl:param name="class"/>
<xsl:param name="diff"/>
<span>
<xsl:attribute name="class">
<xsl:value-of select="normalize-space(concat('milestone ', @unit, ' ', $class))"/>
</xsl:attribute>
<xsl:if test="@n">
<xsl:attribute name="data-n">
<xsl:choose>
<xsl:when test="string($diff) != ''">
<xsl:value-of select="number(@n) + number($diff)"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="@n"/>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
</xsl:if>
<xsl:if test="@unit">
<xsl:attribute name="data-unit">
<xsl:value-of select="@unit"/>
</xsl:attribute>
</xsl:if>
</span>
</xsl:template>
<xsl:template match="tei:name">
<span class="{local-name()}">
<xsl:apply-templates/>
</span>
</xsl:template>
<!-- Check if notes are interesting and find a good way to display and index -->
<xsl:template match="tei:note">
<xsl:comment>
<xsl:text><</xsl:text>
<xsl:value-of select="name()"/>
<xsl:text>> </xsl:text>
<xsl:value-of select="."/>
</xsl:comment>
</xsl:template>
<xsl:template match="tei:p">
<p>
<xsl:apply-templates/>
</p>
</xsl:template>
<xsl:template match="tei:orgName">
<a class="{local-name()}">
<xsl:apply-templates/>
</a>
</xsl:template>
<xsl:template match="tei:orig">
<xsl:apply-templates/>
</xsl:template>
<!-- Get page number -->
<xsl:template name="data-page">
<xsl:variable name="n">
<xsl:choose>
<xsl:when test="self::tei:pb">
<xsl:value-of select="@n"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="preceding::tei:pb[1]/@n"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:choose>
<xsl:when test="$n = ''"/>
<xsl:when test="contains($n, '.')">
<xsl:value-of select="substring-after($n, '.')"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$n"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="tei:pb">
<xsl:param name="class"/>
<!-- Do not try to count <pb/> if no @n -->
<xsl:variable name="n">
<xsl:call-template name="data-page"/>
</xsl:variable>
<span class="pb">
<xsl:attribute name="class">
<xsl:value-of select="normalize-space(concat('pb ', $class))"/>
</xsl:attribute>
<xsl:if test="$n != ''">
<xsl:attribute name="data-page">
<xsl:value-of select="$n"/>
</xsl:attribute>
<xsl:attribute name="id">
<xsl:text>p</xsl:text>
<xsl:value-of select="$n"/>
</xsl:attribute>
</xsl:if>
</span>
</xsl:template>
<xsl:template match="tei:persName">
<a class="{local-name()}" type="{@type}" rel="{@nymRef}">
<a href="http://cahal.me/italikos/tablepers">
<xsl:apply-templates/>
</a>
</a>
</xsl:template>
<xsl:template match="tei:cit">
<i>
<a href="http://cahal.me/italikos/tablequote">
<xsl:apply-templates/>
</a>
</i>
</xsl:template>
<xsl:template match="tei:placeName">
<a class="{local-name()}" type="{@type}" rel="{@nymRef}">
<xsl:apply-templates/>
</a>
</xsl:template>
<xsl:template match="tei:q">
<q class="q">
<xsl:apply-templates/>
</q>
</xsl:template>
<xsl:template match="tei:rs">
<span class="{local-name()}">
<xsl:apply-templates/>
</span>
</xsl:template>
<!-- Will produce bad html for p/quote -->
<xsl:template match="tei:quote">
<xsl:variable name="class" select="normalize-space(concat('quote ', @rend, ' ', @type))"/>
<xsl:choose>
<!-- level block -->
<xsl:when test="not(ancestor::tei:p) or parent::tei:div">
<blockquote class="{$class}">
<xsl:apply-templates/>
</blockquote>
</xsl:when>
<xsl:otherwise>
<q class="{local-name()}">
<xsl:apply-templates/>
</q>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="tei:roleName">
<span class="{local-name()}">
<xsl:apply-templates/>
</span>
</xsl:template>
<xsl:template match="tei:state">
<span class="{local-name()}">
<xsl:apply-templates/>
</span>
</xsl:template>
<xsl:template match="tei:supplied">
<a class="{@reason}"><xsl:apply-templates/></a>
</xsl:template>
<xsl:template match="tei:surname">
<span class="{local-name()}">
<xsl:apply-templates/>
</span>
</xsl:template>
<xsl:template match="tei:title">
<em class="{local-name()}">
<xsl:apply-templates/>
</em>
</xsl:template>
</xsl:transform>
| 24.949772 | 94 | 0.548865 |
8a273bafb5684e30dea6269929f2b7cf6218626e | 2,069 | xsl | XSLT | trunk/ant-schematron/code/resource/xslt/iso_schematron_message.xsl | clarin-eric/schematron | 1d5af9942e9ae64bba153b53424d0f132086e546 | [
"MIT"
] | 2,151 | 2020-04-18T07:31:17.000Z | 2022-03-31T08:39:18.000Z | trunk/ant-schematron/code/resource/xslt/iso_schematron_message.xsl | clarin-eric/schematron | 1d5af9942e9ae64bba153b53424d0f132086e546 | [
"MIT"
] | 2,313 | 2015-01-05T11:39:14.000Z | 2022-03-30T21:27:47.000Z | trunk/ant-schematron/code/resource/xslt/iso_schematron_message.xsl | clarin-eric/schematron | 1d5af9942e9ae64bba153b53424d0f132086e546 | [
"MIT"
] | 613 | 2015-01-03T21:47:15.000Z | 2022-03-28T09:46:13.000Z | <?xml version="1.0" ?><?xar XSLT?>
<!-- Implmentation for the Schematron XML Schema Language.
http://www.ascc.net/xml/resource/schematron/schematron.html
Copyright (c) 2000,2001 Rick Jelliffe and Academia Sinica Computing Center, Taiwan
This software is provided 'as-is', without any express or implied warranty.
In no event will the authors be held liable for any damages arising from
the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it freely,
subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not claim
that you wrote the original software. If you use this software in a product,
an acknowledgment in the product documentation would be appreciated but is
not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
-->
<!-- Schematron message -->
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:axsl="http://www.w3.org/1999/XSL/TransformAlias">
<xsl:import href="iso_schematron_skeleton_for_xslt1.xsl"/>
<xsl:template name="process-prolog">
<axsl:output method="text" />
</xsl:template>
<!-- use default rule for process-root: copy contens / ignore title -->
<!-- use default rule for process-pattern: ignore name and see -->
<!-- use default rule for process-name: output name -->
<!-- use default rule for process-assert and process-report:
call process-message -->
<xsl:template name="process-message">
<xsl:param name="pattern" />
<xsl:param name="role" />
<axsl:message>
<xsl:apply-templates mode="text"
/> (<xsl:value-of select="$pattern" />
<xsl:if test="$role"> / <xsl:value-of select="$role" />
</xsl:if>)</axsl:message>
</xsl:template>
</xsl:stylesheet> | 37.618182 | 84 | 0.702755 |
279c6bc3292ae62a0e11ba008291d6e16b07cc7a | 12,707 | xsl | XSLT | src/xml/xslt/pdf/variablelist.xsl | samuelpenn/yagsbook | e652ef9ad2c4cd61b80be56c04f9bd89937efe89 | [
"BSD-2-Clause"
] | null | null | null | src/xml/xslt/pdf/variablelist.xsl | samuelpenn/yagsbook | e652ef9ad2c4cd61b80be56c04f9bd89937efe89 | [
"BSD-2-Clause"
] | null | null | null | src/xml/xslt/pdf/variablelist.xsl | samuelpenn/yagsbook | e652ef9ad2c4cd61b80be56c04f9bd89937efe89 | [
"BSD-2-Clause"
] | null | null | null | <?xml version="1.0"?>
<!--
Stylesheet transform for Yagsbook to PDF.
Defines the various list types, including variablelist,
targetlist etc.
Author: Samuel Penn
Version: $Revision: 1.8 $
Date: $Date: 2009/06/28 09:44:30 $
Copyright 2005 Samuel Penn, http://yagsbook.sourceforge.net.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The name of the author may not be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<xsl:stylesheet xmlns:yb="http://yagsbook.sourceforge.net/xml"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
version="1.0">
<!-- Item list -->
<xsl:template match="yb:itemlist">
<xsl:variable name="order" select="@order"/>
<xsl:variable name="style">
<xsl:choose>
<xsl:when test="@style='italic'">italic</xsl:when>
<xsl:otherwise>bold</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:choose>
<xsl:when test="$order = 'strict'">
<xsl:apply-templates select="yb:item" mode="term">
<xsl:with-param name="style" select="$style"/>
</xsl:apply-templates>
</xsl:when>
<xsl:when test="$order = 'sort'">
<xsl:apply-templates select="yb:item" mode="term">
<xsl:sort data-type="text" select="@name"/>
<xsl:with-param name="style" select="$style"/>
</xsl:apply-templates>
</xsl:when>
<xsl:when test="$order = 'number'">
<xsl:apply-templates select="yb:item" mode="term">
<xsl:sort data-type="number" select="@name"/>
<xsl:with-param name="style" select="$style"/>
</xsl:apply-templates>
</xsl:when>
<xsl:when test="$order = '1'">
<xsl:apply-templates select="yb:item" mode="list">
<xsl:with-param name="style" select="$style"/>
</xsl:apply-templates>
</xsl:when>
<xsl:when test="$order = 'a'">
<xsl:apply-templates select="yb:item" mode="list">
<xsl:with-param name="style" select="$style"/>
</xsl:apply-templates>
</xsl:when>
<xsl:when test="$order = 'A'">
<xsl:apply-templates select="yb:item" mode="list">
<xsl:with-param name="style" select="$style"/>
</xsl:apply-templates>
</xsl:when>
<xsl:when test="$order = 'i'">
<xsl:apply-templates select="yb:item" mode="list">
<xsl:with-param name="style" select="$style"/>
</xsl:apply-templates>
</xsl:when>
<xsl:when test="$order = 'I'">
<xsl:apply-templates select="yb:item" mode="list">
<xsl:with-param name="style" select="$style"/>
</xsl:apply-templates>
</xsl:when>
<xsl:otherwise>
<!-- 'strict' is the default if not understood -->
<xsl:apply-templates select="yb:item" mode="list">
<xsl:with-param name="style" select="$style"/>
</xsl:apply-templates>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="yb:itemlist/yb:item" mode="term">
<xsl:param name="style" select="'bold'"/>
<xsl:variable name="weight">
<xsl:choose>
<xsl:when test="$style='bold'">bold</xsl:when>
<xsl:otherwise>normal</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="italic">
<xsl:choose>
<xsl:when test="$style='italic'">italic</xsl:when>
<xsl:otherwise>normal</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<fo:block font-size="{$font-medium}" space-after="{$font-medium}"
font-family="{$font-body}">
<fo:inline font-weight="{$weight}" font-style="{$italic}">
<xsl:value-of select="@name"/>:
</fo:inline>
<!-- <xsl:value-of select="."/> -->
<xsl:apply-templates/>
</fo:block>
</xsl:template>
<xsl:template match="yb:itemlist/yb:item" mode="list">
<xsl:param name="style" select="'bold'"/>
<xsl:variable name="weight">
<xsl:choose>
<xsl:when test="$style='bold'">bold</xsl:when>
<xsl:otherwise>normal</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="italic">
<xsl:choose>
<xsl:when test="$style='italic'">italic</xsl:when>
<xsl:otherwise>normal</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<fo:block font-size="{$font-medium}" space-after="{$font-medium}"
font-family="{$font-body}">
<fo:inline font-weight="{$weight}" font-style="{$italic}">
<xsl:value-of select="position()"/>.
</fo:inline>
<xsl:apply-templates/>
</fo:block>
</xsl:template>
<!-- Target list -->
<xsl:template name="targetlist" match="yb:targetlist">
<xsl:variable name="targetWidth">
<xsl:choose>
<xsl:when test="@width">
<xsl:value-of select="@width"/>
</xsl:when>
<xsl:otherwise>22</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="valueWidth" select="80-$targetWidth"/>
<xsl:variable name="align">
<xsl:choose>
<xsl:when test="@align">
<xsl:value-of select="@align"/>
</xsl:when>
<xsl:when test="@targetFirst='true'">left</xsl:when>
<xsl:otherwise>right</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<fo:table table-layout="fixed" width="80mm" space-after="{$font-medium}">
<xsl:choose>
<xsl:when test="@targetFirst='true'">
<fo:table-column column-width="3mm"/>
<fo:table-column column-width="{$targetWidth}mm"/>
<fo:table-column column-width="{$valueWidth}mm"/>
<fo:table-header font-size="{$font-medium}"
font-family="{$font-heading}">
<fo:table-row>
<fo:table-cell><fo:block/></fo:table-cell>
<fo:table-cell>
<fo:block color="white" background-color="black" text-align="{$align}">
<xsl:value-of select="yb:targetLabel"/>
</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block color="white" background-color="black">
<xsl:value-of select="yb:valueLabel"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-header>
</xsl:when>
<xsl:otherwise>
<fo:table-column column-width="3mm"/>
<fo:table-column column-width="{$valueWidth}mm"/>
<fo:table-column column-width="{$targetWidth}mm"/>
<fo:table-header font-size="{$font-medium}"
font-family="{$font-heading}">
<fo:table-row>
<fo:table-cell><fo:block/></fo:table-cell>
<fo:table-cell>
<fo:block color="white" background-color="black">
<xsl:value-of select="yb:valueLabel"/>
</fo:block>
</fo:table-cell>
<fo:table-cell text-align="right">
<fo:block color="white" background-color="black" text-align="{$align}">
<xsl:value-of select="yb:targetLabel"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-header>
</xsl:otherwise>
</xsl:choose>
<fo:table-body font-size="10pt" font-family="{$font-heading}">
<xsl:apply-templates select="yb:item"/>
</fo:table-body>
</fo:table>
</xsl:template>
<xsl:template match="yb:targetlist/yb:item">
<xsl:variable name="bgcolour">
<xsl:choose>
<xsl:when test="position() mod 2 = 1">
<xsl:value-of select="$darkcolour"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$lightcolour"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<fo:table-row background-color="{$bgcolour}" font-size="{$font-medium}">
<fo:table-cell background-color="white"><fo:block background-color="white"/></fo:table-cell>
<xsl:choose>
<xsl:when test="../@targetFirst='true'">
<xsl:apply-templates select="." mode="target"/>
<xsl:apply-templates select="." mode="value"/>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="." mode="value"/>
<xsl:apply-templates select="." mode="target"/>
</xsl:otherwise>
</xsl:choose>
</fo:table-row>
</xsl:template>
<xsl:template match="yb:targetlist/yb:item" mode="target">
<xsl:variable name="align">
<xsl:choose>
<xsl:when test="../@align">
<xsl:value-of select="../@align"/>
</xsl:when>
<xsl:when test="not(../@targetFirst='true')">right</xsl:when>
<xsl:otherwise>left</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<fo:table-cell text-align="{$align}">
<fo:block font-size="{$font-small}" font-family="{$font-body}">
<xsl:value-of select="@target"/>
</fo:block>
</fo:table-cell>
</xsl:template>
<xsl:template match="yb:targetlist/yb:item" mode="value">
<xsl:variable name="weight">
<xsl:choose>
<xsl:when test="../@bold='true'">bold</xsl:when>
<xsl:otherwise>normal</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<fo:table-cell>
<fo:block font-size="{$font-small}" font-family="{$font-body}">
<xsl:if test="@value">
<fo:inline font-weight="{$weight}">
<xsl:value-of select="@value"/>
</fo:inline>
</xsl:if>
<xsl:apply-templates/>
</fo:block>
</fo:table-cell>
</xsl:template>
</xsl:stylesheet>
| 40.858521 | 103 | 0.498229 |
806379b14b79c98935bade10bfb6ae2416860fe8 | 4,011 | xsl | XSLT | cfg/attrs/watson.voice-attr.xsl | jason-fox/fox.jason.audiobook | e5d0aced5242ac491c9b76a16d227b1dcf6be0e4 | [
"Apache-2.0"
] | 1 | 2020-01-27T05:25:18.000Z | 2020-01-27T05:25:18.000Z | cfg/attrs/watson.voice-attr.xsl | jason-fox/fox.jason.audiobook | e5d0aced5242ac491c9b76a16d227b1dcf6be0e4 | [
"Apache-2.0"
] | 2 | 2020-09-14T18:28:29.000Z | 2021-02-13T08:21:26.000Z | cfg/attrs/watson.voice-attr.xsl | jason-fox/fox.jason.audiobook | e5d0aced5242ac491c9b76a16d227b1dcf6be0e4 | [
"Apache-2.0"
] | null | null | null | <?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of the DITA-OT Audiobook Plug-in project.
See the accompanying LICENSE file for applicable licenses.
-->
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:rx="http://www.renderx.com/XSL/Extensions"
version="2.0"
>
<!--
Available voices on the IBM Cloud
see https://cloud.ibm.com/docs/services/text-to-speech?topic=text-to-speech-voices
-->
<!-- Voices speaking in English -->
<xsl:attribute-set name="__voice__en__male">
<xsl:attribute name="voice">en-US_MichaelVoice</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="__voice__en__female">
<xsl:attribute name="voice">en-US_AllisonVoice</xsl:attribute>
</xsl:attribute-set>
<!-- Voices speaking in Regional English -->
<xsl:attribute-set name="__voice__en-us__female">
<xsl:attribute name="voice">en-US_AllisonVoice</xsl:attribute>
</xsl:attribute-set>
<!--xsl:attribute-set name="__voice__en-us__female">
<xsl:attribute name="voice">en-US_AllisonV2Voice</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="__voice__en-us__female">
<xsl:attribute name="voice">en-US_LisaVoice</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="__voice__en-us__female">
<xsl:attribute name="voice">en-US_LisaV2Voice</xsl:attribute>
</xsl:attribute-set-->
<xsl:attribute-set name="__voice__en-us__male">
<xsl:attribute name="voice">en-US_MichaelVoice</xsl:attribute>
</xsl:attribute-set>
<!--xsl:attribute-set name="__voice__en-us">
<xsl:attribute name="voice">en-US_MichaelV2Voice</xsl:attribute>
</xsl:attribute-set-->
<xsl:attribute-set name="__voice__en-gb__female">
<xsl:attribute name="voice">en-GB_KateVoice</xsl:attribute>
</xsl:attribute-set>
<!-- Voice speaking in French -->
<xsl:attribute-set name="__voice__fr__female">
<xsl:attribute name="voice">fr-FR_ReneeVoice</xsl:attribute>
</xsl:attribute-set>
<!-- Voices speaking in German -->
<xsl:attribute-set name="__voice__de__female">
<xsl:attribute name="voice">de-DE_BirgitVoice</xsl:attribute>
</xsl:attribute-set>
<!--xsl:attribute-set name="__voice__de__female">
<xsl:attribute name="voice">de-DE_BirgitV2Voice</xsl:attribute>
</xsl:attribute-set-->
<xsl:attribute-set name="__voice__de__male">
<xsl:attribute name="voice">de-DE_DieterVoice</xsl:attribute>
</xsl:attribute-set>
<!-- Voices speaking in Italian -->
<xsl:attribute-set name="__voice__it__female">
<xsl:attribute name="voice">it-IT_FrancescaVoice</xsl:attribute>
</xsl:attribute-set>
<!--xsl:attribute-set name="__voice__it__female">
<xsl:attribute name="voice">it-IT_FrancescaV2Voice</xsl:attribute>
</xsl:attribute-set-->
<!-- Voices speaking in Japanese -->
<xsl:attribute-set name="__voice__ja__female">
<xsl:attribute name="voice">ja-JP_EmiVoice</xsl:attribute>
</xsl:attribute-set>
<!-- Voice speaking in Portuguese -->
<xsl:attribute-set name="__voice__pt__female">
<xsl:attribute name="voice">pt-BR_IsabelaVoice</xsl:attribute>
</xsl:attribute-set>
<!-- Voices speaking in Spanish -->
<xsl:attribute-set name="__voice__es__male">
<xsl:attribute name="voice">es-ES_EnriqueVoice</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="__voice__es__female">
<xsl:attribute name="voice">es-ES_LauraVoice</xsl:attribute>
</xsl:attribute-set>
<!-- Voices speaking in Regional Spanish -->
<xsl:attribute-set name="__voice__es-es__male">
<xsl:attribute name="voice">es-ES_EnriqueVoice</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="__voice__es-es__female">
<xsl:attribute name="voice">es-ES_LauraVoice</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="__voice__es-us__female">
<xsl:attribute name="voice">es-US_SofiaVoice</xsl:attribute>
</xsl:attribute-set>
<xsl:attribute-set name="__voice__es-la__female">
<xsl:attribute name="voice">es-LA_SofiaVoice</xsl:attribute>
</xsl:attribute-set>
</xsl:stylesheet>
| 36.463636 | 85 | 0.732735 |
083cfd6a9a028393b74ec20ef53815aa03d2983c | 4,015 | xsl | XSLT | components/camel-schematron/src/main/resources/iso-schematron-xslt2/iso_schematron_message_xslt2.xsl | erard22/camel | 13df4106a9e93c65391c540d330613ebf9053aff | [
"Apache-2.0"
] | 4,262 | 2015-01-01T15:28:37.000Z | 2022-03-31T04:46:41.000Z | components/camel-schematron/src/main/resources/iso-schematron-xslt2/iso_schematron_message_xslt2.xsl | erard22/camel | 13df4106a9e93c65391c540d330613ebf9053aff | [
"Apache-2.0"
] | 3,408 | 2015-01-03T02:11:17.000Z | 2022-03-31T20:07:56.000Z | components/camel-schematron/src/main/resources/iso-schematron-xslt2/iso_schematron_message_xslt2.xsl | erard22/camel | 13df4106a9e93c65391c540d330613ebf9053aff | [
"Apache-2.0"
] | 5,505 | 2015-01-02T14:58:12.000Z | 2022-03-30T19:23:41.000Z | <!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<?xml version="1.0" ?><?xar XSLT?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- Implementation for the Schematron XML Schema Language.
Generates simple text output messages using XSLT2 engine
-->
<!--
Open Source Initiative OSI - The MIT License:Licensing
[OSI Approved License]
This source code was previously available under the zlib/libpng license.
Attribution is polite.
The MIT License
Copyright (c) 2000-2010 Rick Jellife and Academia Sinica Computing Centre, Taiwan.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-->
<!-- Schematron message -->
<xsl:stylesheet
version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:axsl="http://www.w3.org/1999/XSL/TransformAlias">
<xsl:import href="iso_schematron_skeleton_for_saxon.xsl"/>
<xsl:template name="process-prolog">
<axsl:output method="text" />
</xsl:template>
<!-- use default rule for process-root: copy contens / ignore title -->
<!-- use default rule for process-pattern: ignore name and see -->
<!-- use default rule for process-name: output name -->
<!-- use default rule for process-assert and process-report:
call process-message -->
<xsl:template name="process-message">
<xsl:param name="pattern" />
<xsl:param name="role" />
<axsl:message>
<xsl:apply-templates mode="text"
/> (<xsl:value-of select="$pattern" />
<xsl:if test="$role"> / <xsl:value-of select="$role" />
</xsl:if>)</axsl:message>
</xsl:template>
</xsl:stylesheet> | 40.969388 | 83 | 0.7467 |
59448be0c024f8c1dd2fb84d72d4b805b1d2046f | 7,265 | xsl | XSLT | src/platforms/xilinx/pr_6smp/design/__xps/.dswkshop/MdtSvgBLKD_Dimensions.xsl | eugenecartwright/hthreads | 826c495dd855f8fcc1e12e1ac01845c2983ecf04 | [
"BSD-3-Clause"
] | 3 | 2018-02-14T23:24:45.000Z | 2022-03-30T18:48:06.000Z | src/platforms/xilinx/pr_6smp/design/__xps/.dswkshop/MdtSvgBLKD_Dimensions.xsl | eugenecartwright/hthreads | 826c495dd855f8fcc1e12e1ac01845c2983ecf04 | [
"BSD-3-Clause"
] | null | null | null | src/platforms/xilinx/pr_6smp/design/__xps/.dswkshop/MdtSvgBLKD_Dimensions.xsl | eugenecartwright/hthreads | 826c495dd855f8fcc1e12e1ac01845c2983ecf04 | [
"BSD-3-Clause"
] | null | null | null | <?ll version="1.0" standalone="no"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!--
<xsl:output method="xml"
version="1.0"
encoding="UTF-8" indent="yes"
doctype-public="-//W3C//DTD SVG Tiny 1.1//EN"
doctype-system="http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd"/>
-->
<!--
======================================================
BUS INTERFACE DIMENSIONS
======================================================
-->
<xsl:variable name="BLKD_BIF_H" select="16"/>
<xsl:variable name="BLKD_BIF_W" select="32"/>
<xsl:variable name="BLKD_BIFC_H" select="24"/>
<xsl:variable name="BLKD_BIFC_W" select="24"/>
<xsl:variable name="BLKD_BIFC_dx" select="ceiling($BLKD_BIFC_W div 5)"/>
<xsl:variable name="BLKD_BIFC_dy" select="ceiling($BLKD_BIFC_H div 5)"/>
<xsl:variable name="BLKD_BIFC_Hi" select="($BLKD_BIFC_H - ($BLKD_BIFC_dy * 2))"/>
<xsl:variable name="BLKD_BIFC_Wi" select="($BLKD_BIFC_W - ($BLKD_BIFC_dx * 2))"/>
<xsl:variable name="BLKD_BIF_TYPE_ONEWAY" select="'OneWay'"/>
<!--
======================================================
GLOLBAL BUS INTERFACE DIMENSIONS
(Define for global MdtSVG_BifShapes.xsl which is used across all
diagrams to define the shapes of bifs the same across all diagrams)
======================================================
-->
<xsl:variable name="BIF_H" select="$BLKD_BIF_H"/>
<xsl:variable name="BIF_W" select="$BLKD_BIF_W"/>
<xsl:variable name="BIFC_H" select="$BLKD_BIFC_H"/>
<xsl:variable name="BIFC_W" select="$BLKD_BIFC_W"/>
<xsl:variable name="BIFC_dx" select="$BLKD_BIFC_dx"/>
<xsl:variable name="BIFC_dy" select="$BLKD_BIFC_dy"/>
<xsl:variable name="BIFC_Hi" select="$BLKD_BIFC_Hi"/>
<xsl:variable name="BIFC_Wi" select="$BLKD_BIFC_Wi"/>
<!--
======================================================
BUS DIMENSIONS
======================================================
-->
<xsl:variable name="BLKD_P2P_BUS_W" select="($BLKD_BUS_ARROW_H - ($BLKD_BUS_ARROW_G * 2))"/>
<xsl:variable name="BLKD_SBS_LANE_H" select="($BLKD_MOD_H + ($BLKD_BIF_H * 2))"/>
<xsl:variable name="BLKD_BUS_LANE_W" select="($BLKD_BIF_W + ($BLKD_MOD_BIF_GAP_H * 2))"/>
<xsl:variable name="BLKD_BUS_ARROW_W" select="ceiling($BLKD_BIFC_W div 3)"/>
<xsl:variable name="BLKD_BUS_ARROW_H" select="ceiling($BLKD_BIFC_H div 2)"/>
<xsl:variable name="BLKD_BUS_ARROW_G" select="ceiling($BLKD_BIFC_W div 12)"/>
<!--
======================================================
IO PORT DIMENSIONS
======================================================
-->
<xsl:variable name="BLKD_IOP_H" select="16"/>
<xsl:variable name="BLKD_IOP_W" select="16"/>
<xsl:variable name="BLKD_IOP_SPC" select="12"/>
<!--
======================================================
INTERRUPT NOTATION DIMENSIONS
======================================================
-->
<xsl:variable name="BLKD_INTR_W" select="18"/>
<xsl:variable name="BLKD_INTR_H" select="18"/>
<!--
======================================================
MODULE DIMENSIONS
======================================================
-->
<xsl:variable name="BLKD_MOD_IO_GAP" select="8"/>
<xsl:variable name="BLKD_MOD_W" select="( ($BLKD_BIF_W * 2) + ($BLKD_MOD_BIF_GAP_H * 1) + ($BLKD_MOD_LANE_W * 2))"/>
<xsl:variable name="BLKD_MOD_H" select="($BLKD_MOD_LABEL_H + ($BLKD_BIF_H * 1) + ($BLKD_MOD_BIF_GAP_V * 1) + ($BLKD_MOD_LANE_H * 2))"/>
<xsl:variable name="BLKD_MOD_BIF_GAP_H" select="ceiling($BLKD_BIF_H div 4)"/>
<xsl:variable name="BLKD_MOD_BIF_GAP_V" select="ceiling($BLKD_BIFC_H div 2)"/>
<xsl:variable name="BLKD_MOD_LABEL_W" select="(($BLKD_BIF_W * 2) + $BLKD_MOD_BIF_GAP_H)"/>
<xsl:variable name="BLKD_MOD_LABEL_H" select="(($BLKD_BIF_H * 2) + ceiling($BLKD_BIF_H div 3))"/>
<xsl:variable name="BLKD_MOD_LANE_W" select="ceiling($BLKD_BIF_W div 3)"/>
<xsl:variable name="BLKD_MOD_LANE_H" select="ceiling($BLKD_BIF_H div 4)"/>
<xsl:variable name="BLKD_MOD_EDGE_W" select="ceiling($BLKD_MOD_LANE_W div 2)"/>
<xsl:variable name="BLKD_MOD_SHAPES_G" select="($BLKD_BIF_W + $BLKD_BIF_W)"/>
<xsl:variable name="BLKD_MOD_BKTLANE_H" select="$BLKD_BIF_H"/>
<xsl:variable name="BLKD_MOD_BKTLANE_W" select="$BLKD_BIF_H"/>
<xsl:variable name="BLKD_MOD_BUCKET_G" select="ceiling($BLKD_BIF_W div 2)"/>
<xsl:variable name="BLKD_MPMC_MOD_H" select="(($BLKD_BIF_H * 1) + ($BLKD_MOD_BIF_GAP_V * 2) + ($BLKD_MOD_LANE_H * 2))"/>
<!--
======================================================
GLOBAL DIAGRAM DIMENSIONS
======================================================
-->
<xsl:variable name="BLKD_IORCHAN_H" select="$BLKD_BIF_H"/>
<xsl:variable name="BLKD_IORCHAN_W" select="$BLKD_BIF_H"/>
<xsl:variable name="BLKD_PRTCHAN_H" select="($BLKD_BIF_H * 2) + ceiling($BLKD_BIF_H div 2)"/>
<xsl:variable name="BLKD_PRTCHAN_W" select="($BLKD_BIF_H * 2) + ceiling($BLKD_BIF_H div 2) + 8"/>
<xsl:variable name="BLKD_DRAWAREA_MIN_W" select="(($BLKD_MOD_BKTLANE_W * 2) + (($BLKD_MOD_W * 3) + ($BLKD_MOD_BUCKET_G * 2)))"/>
<xsl:variable name="BLKD_INNER_X" select="($BLKD_PRTCHAN_W + $BLKD_IORCHAN_W + $BLKD_INNER_GAP)"/>
<xsl:variable name="BLKD_INNER_Y" select="($BLKD_PRTCHAN_H + $BLKD_IORCHAN_H + $BLKD_INNER_GAP)"/>
<xsl:variable name="BLKD_INNER_GAP" select="ceiling($BLKD_MOD_W div 2)"/>
<xsl:variable name="BLKD_SBS2IP_GAP" select="$BLKD_MOD_H"/>
<xsl:variable name="BLKD_BRIDGE_GAP" select="($BLKD_BUS_LANE_W * 4)"/>
<xsl:variable name="BLKD_IP2UNK_GAP" select="$BLKD_MOD_H"/>
<xsl:variable name="BLKD_PROC2SBS_GAP" select="($BLKD_BIF_H * 2)"/>
<xsl:variable name="BLKD_IOR2PROC_GAP" select="$BLKD_BIF_W"/>
<xsl:variable name="BLKD_MPMC2PROC_GAP" select="($BLKD_BIF_H * 2)"/>
<xsl:variable name="BLKD_SPECS2KEY_GAP" select="$BLKD_BIF_W"/>
<xsl:variable name="BLKD_DRAWAREA2KEY_GAP" select="ceiling($BLKD_BIF_W div 3)"/>
<xsl:variable name="BLKD_KEY_H" select="250"/>
<xsl:variable name="BLKD_KEY_W" select="($BLKD_DRAWAREA_MIN_W + ceiling($BLKD_DRAWAREA_MIN_W div 2.5))"/>
<xsl:variable name="BLKD_SPECS_H" select="100"/>
<xsl:variable name="BLKD_SPECS_W" select="300"/>
<xsl:variable name="BLKD_BKT_MODS_PER_ROW" select="3"/>
<!--
<xsl:template name="Print_Dimensions">
<xsl:message>MOD_LABEL_W : <xsl:value-of select="$MOD_LABEL_W"/></xsl:message>
<xsl:message>MOD_LABEL_H : <xsl:value-of select="$MOD_LABEL_H"/></xsl:message>
<xsl:message>MOD_LANE_W : <xsl:value-of select="$MOD_LANE_W"/></xsl:message>
<xsl:message>MOD_LANE_H : <xsl:value-of select="$MOD_LANE_H"/></xsl:message>
<xsl:message>MOD_EDGE_W : <xsl:value-of select="$MOD_EDGE_W"/></xsl:message>
<xsl:message>MOD_SHAPES_G : <xsl:value-of select="$MOD_SHAPES_G"/></xsl:message>
<xsl:message>MOD_BKTLANE_W : <xsl:value-of select="$MOD_BKTLANE_W"/></xsl:message>
<xsl:message>MOD_BKTLANE_H : <xsl:value-of select="$MOD_BKTLANE_H"/></xsl:message>
<xsl:message>MOD_BUCKET_G : <xsl:value-of select="$MOD_BUCKET_G"/></xsl:message>
</xsl:template>
-->
</xsl:stylesheet>
| 41.514286 | 136 | 0.603992 |
b98e3827fc27a6b3c7f916eef421815243381fde | 4,950 | xsl | XSLT | validation/schematron/xslt/uniqueRules_docs.xsl | ism-dme/DIME-tools | d8536dff8f82fb47c67e25ef10ce040d1c8e22ab | [
"Apache-2.0"
] | 2 | 2020-09-01T07:23:15.000Z | 2021-07-29T11:16:57.000Z | validation/schematron/xslt/uniqueRules_docs.xsl | ism-dme/DIME-tools | d8536dff8f82fb47c67e25ef10ce040d1c8e22ab | [
"Apache-2.0"
] | null | null | null | validation/schematron/xslt/uniqueRules_docs.xsl | ism-dme/DIME-tools | d8536dff8f82fb47c67e25ef10ce040d1c8e22ab | [
"Apache-2.0"
] | 1 | 2020-11-05T10:28:45.000Z | 2020-11-05T10:28:45.000Z | <?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:mei="http://www.music-encoding.org/ns/mei" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:schematron="http://purl.oclc.org/dsdl/schematron" xmlns:sqf="http://www.schematron-quickfix.com/validator/process" xmlns:xd="http://www.oxygenxml.com/ns/doc/xsl" xmlns="http://www.w3.org/1999/xhtml" exclude-result-prefixes="xs xsl schematron sqf mei xd" version="3.0">
<xd:doc scope="stylesheet">
<xd:desc>
<xd:p><xd:b>Created on: </xd:b>July, 25 2018</xd:p>
<xd:p><xd:b>Author: </xd:b>Oleksii Sapov</xd:p>
<xd:p>
<xd:p>
<xd:b>Description:</xd:b>
<xd:i>Should be applied on unique-rules.sch.</xd:i>
</xd:p>
</xd:p>
</xd:desc>
</xd:doc>
<xsl:output method="html" indent="yes"/>
<!--reference Texts meiHead-->
<xsl:variable name="phase_refTexts_meiHead" select="
//schematron:phase[@id = 'refTexts_meiHead']/schematron:active/@pattern"/>
<xsl:variable name="refTexts_meiHead" select="
//schematron:pattern[@id =
$phase_refTexts_meiHead]//schematron:p"/>
<!--reference Texts music-->
<xsl:variable name="phase_refTexts_music" select="
//schematron:phase[@id =
'refTexts_music']/schematron:active/@pattern"/>
<xsl:variable name="refTexts_music" select="
//schematron:pattern[@id =
$phase_refTexts_music]//schematron:p"/>
<!--alternative Texts meiHead-->
<xsl:variable name="phase_altTexts_meiHead" select="
//schematron:phase[@id =
'altTexts_meiHead']/schematron:active/@pattern"/>
<xsl:variable name="altTexts_meiHead" select="
//schematron:pattern[@id =
$phase_altTexts_meiHead]//schematron:p"/>
<!--alternatice Texts music-->
<xsl:variable name="phase_altTexts_music" select="
//schematron:phase[@id =
'altTexts_music']/schematron:active/@pattern"/>
<xsl:variable name="altTexts_music" select="
//schematron:pattern[@id =
$phase_altTexts_music]//schematron:p"/>
<!--takes long Time-->
<xsl:variable name="phase_checkReferences" select="
//schematron:phase[@id =
'checkReferences']/schematron:active/@pattern"/>
<xsl:variable name="checkReferences" select="
//schematron:pattern[@id =
$phase_checkReferences]//schematron:p"/>
<xsl:template match="/">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>
<xsl:value-of select="'Schematron documentation'"/>
</title>
<link rel="stylesheet" href="schematron.css" type="text/css"/>
<!-- <meta charset="UTF-8"/>-->
</head>
<body>
<h1>
<xsl:value-of select="'Schematron documentation'"/>
</h1>
<h2>Content:</h2>
<ul>
<li>
<a href="#reference_texts">Reference Texts</a>
<ul>
<li>
<a href="#meiHead_ref">meiHead</a>
</li>
<li>
<a href="#music_ref">music</a>
</li>
</ul>
</li>
<li>
<a href="#alternative_texts">Alternative Texts</a>
<ul>
<li>
<a href="#meiHead_alt">meiHead</a>
</li>
<li>
<a href="#music_alt">music</a>
</li>
</ul>
</li>
<li>
<a href="#checkReferences">check references</a>
</li>
</ul>
<h2 id="refernce_texts">Reference Texts</h2>
<div>
<h4 id="meiHead_ref"><meiHead></h4>
<ol>
<xsl:apply-templates select="$refTexts_meiHead"/>
</ol>
<h4 id="music_ref"><music></h4>
<ol>
<xsl:apply-templates select="$refTexts_music"/>
</ol>
</div>
<h2 id="alternative_texts">Alternative Texts</h2>
<div>
<h4 id="meiHead_alt"><meiHead></h4>
<ol>
<xsl:apply-templates select="$altTexts_meiHead"/>
</ol>
<h4 id="music_alt"><music></h4>
<ol>
<xsl:apply-templates select="$altTexts_music"/>
</ol>
<h2 id="checkReferences">Check references</h2>
<ol>
<xsl:apply-templates select="$checkReferences"/>
</ol>
</div>
</body>
<footer>Contact: sapov@mozarteum.at</footer>
</html>
</xsl:template>
<xsl:template match="$refTexts_meiHead">
<li>
<xsl:apply-templates/>
</li>
</xsl:template>
<xsl:template match="$refTexts_music">
<li>
<xsl:apply-templates/>
</li>
</xsl:template>
<xsl:template match="$altTexts_meiHead">
<li>
<xsl:apply-templates/>
</li>
</xsl:template>
<xsl:template match="$altTexts_music">
<li>
<xsl:apply-templates/>
</li>
</xsl:template>
</xsl:stylesheet>
| 31.329114 | 432 | 0.558384 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.