xslt

Need instream-foreign-object and text to both align to the bottom in XSL-FO

别说谁变了你拦得住时间么 提交于 2020-02-25 11:53:13
问题 I have an XSL-FO stylesheet that is used for generating a barcode with a piece of description text immediately after it. When I run it through the Ibex FO application, the text properly lines up with the bottom of the barcode. When I run it through Apache FOP (it's an older version 0.3x... I CAN'T change this), the text lines up with the TOP of the barcode (I need it to work the same in both). I'm really hoping there is some workaround here. This is what I have: <xsl:template match="barcode">

How to access global variable value in multiple template tags

非 Y 不嫁゛ 提交于 2020-02-25 06:27:47
问题 I have created a global variable and its been used in two templates I am able to access i first template, not able to get the value in second template . Below are my workings <xsl:variable name="currentValue"></xsl:variable> //global variable declaration <xsl:template match="/"> <xsl:variable name="unique-accounts" select="/*/*/*/accountId/text()generate-id()=generate-id(key('account-by-id', .)[1])]"/> <xsl:for-each select="$unique-accounts"> <xsl:variable name="currentValue" select="current(

How to access global variable value in multiple template tags

限于喜欢 提交于 2020-02-25 06:25:09
问题 I have created a global variable and its been used in two templates I am able to access i first template, not able to get the value in second template . Below are my workings <xsl:variable name="currentValue"></xsl:variable> //global variable declaration <xsl:template match="/"> <xsl:variable name="unique-accounts" select="/*/*/*/accountId/text()generate-id()=generate-id(key('account-by-id', .)[1])]"/> <xsl:for-each select="$unique-accounts"> <xsl:variable name="currentValue" select="current(

Generating UUID in XSLT 1.0

别等时光非礼了梦想. 提交于 2020-02-24 16:52:05
问题 In our legacy project we are using libxslt which is based on xslt 1.0 version. Now there is a need to generate UUID using the xslt file so that our output xml file contains the UUID. As per https://stackoverflow.com/a/8127174/3747770 I am out of luck. Also as per this https://gist.github.com/azinneera/778f69ae6b0049b5edcd69da70072405 we can generate UUID, but using xslt 2.0. I am new to xslt, and is there any way to convert the https://gist.github.com/azinneera

How to call XSLT from XSLT?

末鹿安然 提交于 2020-02-24 07:10:53
问题 I'm looking for a possibility of calling a second XSLT from first XSLT. My XML input looks like <xml> <Subject name ="A1" type="a"> <Subject name ="B2" type="b"> <Subject name ="C1" type="c"> <Subject name ="A2" type="a"> <Subject name ="B1" type="b"> <Subject name ="C2" type="c"> <Subject name ="A3" type="a"> </xml> What I want to do is something like <xsl> if type = "a" call "XSL_A" with above XML-Input if type = "b" call "XSL_B" with above XML-Input if type = "c" call "XSL_C" with above

xsl multiply using a key

醉酒当歌 提交于 2020-02-23 07:54:08
问题 Sorry, I don't know how to ask the question. I have 3 xml doc. I have an xsl that is working except for I can't figure out how the total of the price times the quantity. I'm running out of time. Please help... Here is the xsl--- <?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet version="2.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:variable name = "custIn" select = "document(

Generate PDF from JSON object containing content from TinyMCE (html)

ε祈祈猫儿з 提交于 2020-02-23 06:51:27
问题 TL;DR How do you create a PDF from a JSON object that contains a String written in HTML. Example JSON: { dimensions: { height: 297, width: 210 }, boxes: [ { dimensions: { height: 10, width: 190 }, position: { x: 10, y: 10 }, content: "<h1>Hello StackOverflow</h1>, I think you are <strong></strong>! I hope someone can answer this!" } ] } Tech used in front-end: AngularJS 1.4.9, ui.tinymce, ment.io Back-end: whatever works. I want to be able to create templates for PDFs. The user writes some

XSL combining values of siblings if values of an attribute is same

試著忘記壹切 提交于 2020-02-15 06:45:47
问题 This is how my XML looks like <?xml version="1.0"?> <Nodes> <NodeA NodeAattr="123"> <NodeB NodeBattr="456"></NodeB> <NodeC> <NodeD NodeDAttr="ValueD"> <NodeE Name="ValueABC"> "555" </NodeE > <NodeE Name="ValueABC"> "666" </NodeE> </NodeD> </NodeC> </NodeA> </Nodes> If the values of the Name attribute of NodeE are same, concatenate the values of NodeE. And my final output xml has to look like <NodeA NodeAattr="123"> <NodeB NodeBattr="456"></NodeB> <NodeC> <NodeD="ValueD"> <NodeE Name="ValueABC

XSL combining values of siblings if values of an attribute is same

微笑、不失礼 提交于 2020-02-15 06:40:22
问题 This is how my XML looks like <?xml version="1.0"?> <Nodes> <NodeA NodeAattr="123"> <NodeB NodeBattr="456"></NodeB> <NodeC> <NodeD NodeDAttr="ValueD"> <NodeE Name="ValueABC"> "555" </NodeE > <NodeE Name="ValueABC"> "666" </NodeE> </NodeD> </NodeC> </NodeA> </Nodes> If the values of the Name attribute of NodeE are same, concatenate the values of NodeE. And my final output xml has to look like <NodeA NodeAattr="123"> <NodeB NodeBattr="456"></NodeB> <NodeC> <NodeD="ValueD"> <NodeE Name="ValueABC

xsl: how to split strings?

半城伤御伤魂 提交于 2020-02-09 01:09:06
问题 I want to split an address on semicolons ( ; ) into rows separated by <br /> : e.g. if address = 123 Elm Street , I want to output 123 Elm Street , but if address = 123 Elm Street;PO Box 222 , I want to output 123 Elm Street<br />PO Box 222 and if address = 123 Elm Street;PO Box 222;c/o James Jones , I want to output 123 Elm Street<br />PO Box 222<br />c/o James Jones Is there a way to do this? (probably easy but I'm not that familiar with XSLT) The plain XSL selector is <xsl:value-of select=