xslt-2.0

Excel VBA Coding for xls transformation along with Paramters

丶灬走出姿态 提交于 2019-12-08 05:48:12
问题 I need to parse xsl along with its parameters using VBA code. I can use VBA code from the below link(for your reference) but only thing is I need to pass XSLT Parameters through VBA code. VBA code : Hperlink My (ds_test.xsl) file <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="xml" indent="yes" /> <xsl:param name="job" /> <xsl:param name="src" /> <xsl:param name="spath" /> <xsl:template match="/">

trim mixed content to max number of characters with xslt

孤街醉人 提交于 2019-12-08 05:25:04
问题 I have the following xml: <p>Lorem ipsum dolor sit amet, <b>consectetur adipisicing</b> elit, <i>sed do<sup>2</sup></i> eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p> And I want to show the first 200 characters only, but it may not cut off in the middle of a word, and I want to keep the formatting elements. So above fragment after transformation becomes: <p>Lorem ipsum

using xsl:for-each-group

≡放荡痞女 提交于 2019-12-08 04:31:09
问题 Here is my requirement. My sample input document is like below. (I have added white lines to make it clear) <body> <p name="h-title" other="main">Introduction</p> <p name="h-titledesc " other="other-desc">XSLT and XQuery</p> <p name=""> XSLT is used to write stylesheets.</p> <p name="section-title" other=" other-section">XSLT</p> <p name="section-desc" other=" other-sectionsdesc">XSLT</p> <p name=""> Some text.</p> <p name=""> <p1 name="bold"> XQuery is used to query XML databases.</p1> </p>

How to find all numbers in a string

半城伤御伤魂 提交于 2019-12-08 04:16:27
问题 Ich versuche mit einer Funktion sämtliche Zahlen aus einem Element oder String zu ermitteln. Dabei soll die Anzahl der Zahlen und ihre Stelligkeit egal sein. Folgende Funktion habe ich bislang geschrieben: <xsl:function name="itp:find_num"> <xsl:param name="tmp"/> <xsl:if test="matches($tmp,'\d+')"> <xsl:analyze-string select="$tmp" regex="{'\d+'}"> <xsl:matching-substring> <xsl:sequence select="."/> </xsl:matching-substring> <xsl:non-matching-substring> <xsl:value-of select="''"/> </xsl:non

The entity “nbsp” was referenced, but not declared

£可爱£侵袭症+ 提交于 2019-12-08 04:12:51
问题 I have written one XSLT to transform xml to xml. Input XML: <test>The Spanish word for "Spain" is "Espa a" Dagon his Name, Sea Monster</test> OutputXML: <test>The Spanish word for "Spain" is "Espa a" Dagon his Name, Sea Monster</test> XSL FILE: i have added the code for entity nbsp declaration under doctype at and replace with entity but still are same error The entity "nbsp" was referenced, but not declared. <xsl:template match="test"> <test> <xsl:apply-templates/> </test> 回答1: You need to

The entity “nbsp” was referenced, but not declared

♀尐吖头ヾ 提交于 2019-12-08 04:09:24
I have written one XSLT to transform xml to xml. Input XML: <test>The Spanish word for "Spain" is "Espa a" Dagon his Name, Sea Monster</test> OutputXML: <test>The Spanish word for "Spain" is "Espa a" Dagon his Name, Sea Monster</test> XSL FILE: i have added the code for entity nbsp declaration under doctype at and replace with entity but still are same error The entity "nbsp" was referenced, but not declared. <xsl:template match="test"> <test> <xsl:apply-templates/> </test> You need to have the input declare the entities it uses, as done in http://xsltransform.net/gVhD8QR with e.g. <!DOCTYPE

Float image in PDF using xsl:fo

孤街醉人 提交于 2019-12-08 03:51:35
问题 I have been trying hard to find a solution to this but no luck till now. I'm generating a PDF from xml and I want to float the images inside the pdf. Like for example if I have image floating left in the xml, same should get applied into the pdf. <p> <img width="127" height="190" src="/images/241729.jpg" style="float: left;"> Globally transition high standards in technology via ubiquitous partnerships. Distinctively pursue worldwide paradigms vis-a-vis business e-business. </p> and the XSL

Need to add sublist in between closing para and item and footnote inside closing para

为君一笑 提交于 2019-12-08 03:45:15
问题 I want to add the sublist inside item and footnote text inside list para: My source xml: <body> <p>blahblah</p> <ul outputclass="l1"> <li outputclass="lt1">blahblah</li> <li outputclass="lt1">blahblah</li> <li outputclass="lt1">blahblah <ul outputclass="l2"> <li outputclass="lt2">blahblah</li> <li outputclass="lt2">blahblah<fn><p>blah</p></fn></li> <li outputclass="lt2">blahblah <ul outputclass="l3"> <li outputclass="lt3">blahblah<fn><p>blah</p></fn></li> <li outputclass="lt3">blah<fn><p>blah

split an element into two or more elements depending on its children

最后都变了- 提交于 2019-12-08 03:31:19
问题 EDIT: for those that come to this in the future, this was a poorly written question. It was not what I was after. This Question may also be of use to you. So, I have been trying to brush up on my XSLT the past few days. I am very unfamiliar with it, spending most of my past using XQuery to transform my XML. I am stuck on a rather simple problem, but looking around I have not found a clear solution. Simply, I want to split some elements into two depending on its children. For example, if my

Access attribute from within current-grouping-key() xslt

て烟熏妆下的殇ゞ 提交于 2019-12-08 03:00:28
I have some xml with thousands of movie elements which can all have 1 or MORE director and writer elements, if a director or writer has the same name as another, as seen here, I add an @differentiator of birthyear, if they are NOT the same person <mediaList> <movie id="1603934" dateCreated="2014-08-11"> <title>Night at the Museum</title> <director>Shawn Levy</director> <LCSpecialTopics>Comedy</LCSpecialTopics> <writer>Robert Ben Garant</writer> <writer differentiator="1970">Thomas Lennon</writer> <language>English</language> <year>2006</year> </movie> <movie lastModified="2014-08-30" id=