xslt-2.0

Xsl-fo How to render whole report but also single elements

怎甘沉沦 提交于 2019-12-11 18:04:28
问题 I have a document that consists of about 40 pages. It consists of nested report elements like sections, chapters, pictures, paragraphs, tables and charts. Each element has an attribute "layout" and an attribute "pagemaster". "pagemaster" should be responsible for which page-master-reference is used and "layout" for the appearance on the page. (like font styles etc) My goal is that each element has its own render information based on these attributes, so that the complete document as well as

How to have the same XSLT namespace with different URIs?

為{幸葍}努か 提交于 2019-12-11 17:14:47
问题 I am building an RSS parser that takes in the media namespace's items. Example 1: <rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/"> <channel> <title>Some channel</title> <item> <guid>234wwerwe</guid> <title>Some title</title> <media:description>test description 1</media:description> <pubDate>Tue, 30 Jul 2019 19:24:00 +0000</pubDate> </item> </channel> </rss> Example 2: <rss version="2.0" xmlns:media="http://www.rssboard.org/media-rss"> <channel> <title>Some second channel</title

Tagging words in XSLT regardless of case

流过昼夜 提交于 2019-12-11 16:57:53
问题 I need to tag words regardless of case. I found this nicely working answer which does the job with matched case. I've made some changes to illustrate better the case insensitivity issue... XML: <?xml version="1.0" encoding="UTF-8"?> <file> <text> <sentence>The safety of the bank’s safe is insured by Safeco.</sentence> <sentence>A safe place to shelter during a storm is the cellar.</sentence> </text> </file> XSLT: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3

XSL transformation - XML data to different HTML tables

爱⌒轻易说出口 提交于 2019-12-11 16:35:11
问题 Hello how would looks XSL stylesheet for example for this XML code? I tried something according to this question (below) but my output did not look as I want below. XSL transformation - XML data to HTML table XML code <?xml version="1.0" encoding="utf-8" ?> <root> <sample time="14" label="Test1:cpu_2:usage_high"> <value>96</value> </sample> <sample time="14" label="Test1:cpu_2:usage_low"> <value>1</value> </sample> <sample time="1" label="Test1:cpu_1:usage_high"> <value>97</value> </sample>

Unable to put href links to expand results in xml using xslt file

孤街醉人 提交于 2019-12-11 16:31:40
问题 I designed a xslt file for a list view of house names from xml. And when a house name is clicked from the list, it should show full detail of the house which is in same xml file. But in my case it's redirecting to another place. Can someone help me? <Houses> <search> <id>1</id> <name>horror</name> <address>09, west Road</address> <city>London</city> <pcode>se4 7jk</pcode> <contact>020574110832</contact> </search> </Houses> And the problem part of xslt file <xsl:template match="name"> <xsl

Convert dd/mm/yy to dd-MM-YYYY format in xsl

泄露秘密 提交于 2019-12-11 15:48:38
问题 Thanks in advance for your support. I have the date formats as dd/MMM/YY and need to be converted into the another format dd-MM-YYYY using XSL . The problem here is, year is in short format need to be converted into long format. How can the year be determined ? Here are few examples, dd/MMM/YY - dd-MM-YYYY 01/FEB/91 - 01-02-1991. 13/APR/13 - 13-04-2013. Using string manipulations, XSL it can be converted to long format but actual year cannot be determined. For example 01/FEB/91 can be

find xpath to pick following sibling not after another tag same as current in xsl

会有一股神秘感。 提交于 2019-12-11 15:47:09
问题 I would like to get the following sibling C when I'm matching A or A1 template in the following, for the second A or A1 only: <root> <A/> <!-- first A --> <B/> <A/> <!-- second A --> <C/> <A1/> <B/> <A1/> <B/> <C/> </root> If I'm matching the first A, I have not to retrieve anything as there is another A before my C tag. If I'm matching the second A, I have to retrieve the C tag. I tried the following without success: <xsl:template match="A|A1"> <xsl:if test="following-sibling::C[preceding

XSLT: analyze-string on text with children nodes

依然范特西╮ 提交于 2019-12-11 15:44:01
问题 I am trying to use analyze-string on elements that possibly contain children nodes. Here is a snippet of a source file: <year> 1975 music </year> <year> 1985<genre>rock</genre>music </year> <year> 2005 music </year> And here is what I would like to get: <year> 70's music </year> <year> 80's<genre>rock</genre> music </year> The following code correctly matches the 3 cases, but I am missing something to copy both the text and the possible children nodes under the year element: <xsl:template

xslt date format change (dd-mmm-yyyy)

你说的曾经没有我的故事 提交于 2019-12-11 15:32:30
问题 I am using the below code to show the current date in xslt program.It's working fine With the date format yyyy-mm-dd. But i need the format dd-mmm-yyyy. Please help me to do this. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl" xmlns:cs="urn:cs" > <xsl:value-of select="cs:datenow()"></xsl:value-of> 回答1: You have tagged your question as XSLT 2.0 so I would expect you to simply get the

Table header is not getting repeated, if table content extended to next page in PDF using XSLT

时光怂恿深爱的人放手 提交于 2019-12-11 14:24:10
问题 Table header is not added to next page, if table content is extended to next page. Header is getting displayed for multiple tables, but if table content extends to next page then header is not coming and its staring the table row in next page. Need to append header before starting next page, if table content extends. Sample XML: <NewDataSet> <DefaultView> <Department>2222</Department> <Title>Manish</Title> </DefaultView> <DefaultView> <Department>2222</Department> <Title>Santosh</Title> <