xslt-1.0

How can I capture current or active locale in DSpace XMLUI?

£可爱£侵袭症+ 提交于 2019-12-08 03:24:14
问题 I have this setting in dspace.cfg webui.supported.locales = en, fr, zh . I wonder why I can't get the active or current locale if I use: <xsl:value-of select="/dri:document/dri:meta/dri:pageMeta/dri:metadata[@element='page'][@qualifier='currentLocale']"/> in my item-view.xsl ? Viewing the page eg http://localhost:8080/DRI/handle/123456789/10476?locale-attribute=fr , it is obviously there in: <metadata element="page" qualifier="currentLocale">fr</metadata> Am I missing something? 回答1:

How to get only business days between two dates in xslt 1.0

爱⌒轻易说出口 提交于 2019-12-08 02:56:37
问题 I need help to count only business days (i.e excluding Saturday and Sunday ) between two dates in xslt 1.0 回答1: count only business days (i.e excluding Saturday and Sunday ) between two dates in xslt 1.0 If it can be assumed that the two given dates will not fall on Saturday or Sunday, you could use the method shown in the following example: XSLT 1.0 <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=

Conditionally wrap content with XSL 1.0

半城伤御伤魂 提交于 2019-12-07 22:49:46
问题 I am looking for a way to wrap content with xsl. This is a simplified example of what I am doing. Lot's of content ... is a significant amount of content, and the anchor tag is only used as an example. It could be a div or anything else. XML: <root> <attribution>John Smith</attribution> <attributionUrl>http://www.johnsmith.com</attributionUrl> </root> XSL: How I am currently doing it. This is adding a significant amount of xsl and I am sure there is a way to simplify. <xsl:stylesheet xmlns

I would like to implement a `split function/template` which takes as input a string and a delimiter and returns a split array of the string

不想你离开。 提交于 2019-12-07 21:49:02
问题 I would like to implement a split function/template in XSLT which takes as input a string and a delimiter and returns a split array of the string.. Or rather I'd like the ability to do something along the lines of: <xsl:call-template name="F"> <xsl:with-param name="input" select="'a,b,c,d,e'"/> <xsl:with-param name="replacement"> <option value='$x'>$x</option> </xsl:with-param> </xsl:call-template> which will give me <option value='a'>a</option><option value='b'>b</option><option value='c'>c<

XSLT: find duplicates within each child

送分小仙女□ 提交于 2019-12-07 17:20:33
问题 I'm new to XSLT/XML. I have an XML file similar to this: <event> <division name="Div1"> <team name="Team1"> <player firstname="A" lastname="F" /> <player firstname="B" lastname="G" /> <player firstname="C" lastname="H" /> <player firstname="D" lastname="G" /> </team> <team name="Team2"> <player firstname="A" lastname="F" /> <player firstname="B" lastname="G" /> <player firstname="C" lastname="H" /> <player firstname="D" lastname="I" /> </team> </division> </event> I'm trying to write a XSL

xslt counting different content of the same content

你说的曾经没有我的故事 提交于 2019-12-07 15:48:26
问题 just started studying xslt.just want to know how would count the number of international based players? Another thing is the average height of he international players? <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="soccer.xslt"?> <footballclub> <player> <based>international</based> <height>5.5</height > <build>medium</build> <age>24</age> </player> <player> <based>local</based> <height>5.5</height > <build>medium</build> <age>24</age> </player> <player> <based

How “to fold recursively by a tag” a group of selected (neighbor) tags with XSLT1?

南楼画角 提交于 2019-12-07 12:36:24
I was comment the present problem at this other one : the present is more complex because needs a recurrence. Detailing by example: <root> <c>cccc</c> <a gr="g1_1">aaaa</a> <b gr="g1_1">1111</b> <a gr="g2_1" into="g1_1">bbbb</a> <b gr="g2_1" into="g1_1">56565</b> <a gr="g3_1" into="g2_1">BB</a> <b gr="g3_1" into="g2_1">55</b> <a gr="g1_2">xxxx</a> <b gr="g1_2">2222</b> <a gr="g2_2" into="g1_2">wwww</a> <b gr="g2_2" into="g1_2">3433</b> </root> that must be enclosed by fold tags, resulting (after XSLT) in: <root> <c>cccc</c> <fold> <a gr="g1_1">aaaa</a> <b gr="g1_1">1111</b> <fold><a gr="g2_1"

Disparate IE XML/XSL behavior in same view and browser version, but with different Domain User accounts

主宰稳场 提交于 2019-12-07 12:02:57
问题 A user of ours has an issue when trying to access one of our web application's views (IE9; behavior appears consistent across 6, 8, and 9, but not across domain accounts). For this specific user's Windows domain account, regardless of which credentials are used to access our application, or which machine's browser is used; an attempt to access certain views results in IE displaying the error message "The stylesheet does not contain a document element. The stylesheet may be empty, or it may

Distinct values with XSLT 1.0 when XPath has multiple criteria

核能气质少年 提交于 2019-12-07 10:53:06
问题 Yet another question about getting distinct values using XSLT 1.0. Here's a stupid, made-up example that should illustrate my problem. <?xml version="1.0" encoding="UTF-8"?> <moviesByYear> <year1994> <movie> <genre>Action</genre> <director>A</director> </movie> </year1994> <year1994> <movie> <genre>Comedy</genre> <director>A</director> </movie> </year1994> <year1994> <movie> <genre>Drama</genre> <director>B</director> </movie> </year1994> <year1994> <movie> <genre>Thriller</genre> <director>C

XSLT - Get file name from URL

£可爱£侵袭症+ 提交于 2019-12-07 07:53:19
问题 I need to obtain the filename from a URL, the URL is dynamic and the amount of slashes can be different amounts. Im using xslt 1.0 so looking for something that will take: http://DevSite/sites/name/Lists/note/Attachments/3/image.jpg and give me: image.jpg IS this possible in XSLT 1.0? 回答1: if you are using xslt 2.0, you can use subsequence() and create a function: Declare your function in xsl:stylesheet root: xmlns:myNameSpace="http://www.myNameSpace.com/myfunctions" Create the function: <xsl