xslt-1.0

Feeding output of <p:xslt> into <c:body> of HTTP PUT request in Xproc

你。 提交于 2019-12-11 12:44:32
问题 My goal for my Xproc pipeline below is to take in a source XML document, run 2 XSLT transforms with <p:xslt> steps, then feed the output XML after the 2nd <p:xslt> to the <c:body> of the <p:http-request> step: <p:declare-step xmlns:p="http://www.w3.org/ns/xproc" xmlns:c="http://www.w3.org/ns/xproc-step" version="1.0"> <p:input port="source" primary="true"/> <p:output port="result" primary="true"/> <p:serialization port="result" indent="false" method="xml" encoding="utf-8" omit-xml-declaration

XML Sorting Using XSL

余生长醉 提交于 2019-12-11 12:35:30
问题 I have an XML File <?xml version="1.0" encoding="UTF-8"?> <data> <contact-information> <full-name>Peter John</full-name> <address_line_1>some place</address_line_1> <address_line_2>some place2</address_line_2> <city>some city</city> <state>some state</state> <zip>54000</zip> <country>some country</country> <phone>2121314144</phone> <email>abc@xyz.com</email> </contact-information> <professional-experience-section> <section-name>PROFESSIONAL EXPERIENCE</section-name> <enabled>true</enabled>

HTML 5 with PHP XSL transformer

你。 提交于 2019-12-11 12:19:31
问题 I am trying to generate valid HTML 5 output using XSL transformer in PHP and I am having difficulty doing so. Here is the sample PHP code: <?php $xml_source = '<?xml version="1.0" encoding="utf-8"?><content/>'; $xsl_source = <<<EOD <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns="http://www.w3.org/1999/xhtml" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" omit-xml-declaration="yes" indent="yes" encoding="utf-8" /> <xsl:template match=

How to access or retrieve mets content of an item from another item?

老子叫甜甜 提交于 2019-12-11 12:14:57
问题 My use case is I have an item that has a link in another item. For example, item 123456789/152 has a metadata field dc.relation.hasversion=123456789/717 . Within the item view of 123456789/152 , how can I retrieve the values of the metadata of 123456789/717 ? For example, I want to retrieve the dc.language.iso value of 123456789/717 from 123456789/152 . I looked at the Related items feature in DSpace but I don't know how the metadata displayed in the Related items list were pulled from the

Generate a sequence number in xslt 1.0

我只是一个虾纸丫 提交于 2019-12-11 11:39:44
问题 I want to get a sequence number in the output of the xml using xslt 1.0. `<a> <b> <c> <d>text1</d> </c> <c> <d>text2</d> </c> </b> <b> <c> <d>text3</d> </c> <c> <d>text4</d> </c> </b> </a>` The output xml should be like ` <result> <seq>1</seq> <r>text1</r> <seq>2</seq> <r>text2</r> <seq>3</seq> <r>text3</r> <seq>4</seq> <r>text4</r> </result> `. Any suggestions please. 回答1: Use xsl:number level="any" : <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output

how to add disable-output-escaping=“yes” to my xsl document?

心已入冬 提交于 2019-12-11 11:32:27
问题 I have the following xsl document: http://jsfiddle.net/Abadi/92ndrnut/2/. I need to add : disable-output-escaping="yes". Because when it is applied on: <CARRIERNAME> <![CDATA[AT&T]]> </CARRIERNAME>. It is producing : AT&T . The applied template was: <xsl:value-of select="CARRIERNAME" /> . When I updated it to : <xsl:value-of select="CARRIERNAME" disable-output-escaping="yes" /> , it worked and the output was : AT&T . My problem is how to add disable-output-escaping="yes" to the xsl document

Grouping with no relation

喜欢而已 提交于 2019-12-11 11:26:32
问题 Xml: <items> <transaction> <header> <col1>H</col1> <col2>XXXX</col2> <col3>YYY12345</col3> <col4/> <col5>YYY12345A1234</col5> </header> </transaction> <item> <col1>D</col1> <col2>1</col2> <col3>5358478</col3> <col4>-1.0000</col4> <col5>CA</col5> </item> <item> <col1>D</col1> <col2>2</col2> <col3>9477498</col3> <col4>1.0000</col4> <col5>CA</col5> </item> <item> <col1>D</col1> <col2>2</col2> <col3>9477498</col3> <col4>1.0000</col4> <col5>CA</col5> </item> <transaction> <header> <col1>H</col1>

Find max value of a node using xpath in xslt version1.0

╄→гoц情女王★ 提交于 2019-12-11 11:24:16
问题 I am a new bee to xslt . can someone provide some guidance regarding the below issue I need to write a template which returns max and min value node EI from the below input <Data> <EI>110</EI> <EI>111</EI> <EI>112</EI> <EI>113</EI> <EI>114</EI> <EI>115</EI> </Data> 回答1: To find the minimum value: /Data/EI[not(. &gt; /Data/EI)][1] To find the maximum value: /Data/EI[not(. &lt; /Data/EI)][1] 来源: https://stackoverflow.com/questions/18759984/find-max-value-of-a-node-using-xpath-in-xslt-version1-0

Need General xslt for XML to JSONX [duplicate]

柔情痞子 提交于 2019-12-11 11:19:36
问题 This question already has an answer here : Closed 7 years ago . Possible Duplicate: convert xml to jsonx using xslt Can anyone help me out in getting the below with an array..I have to generate the generalised xsl.. Input XML: <accounts> <displayOrdinal>0</displayOrdinal> <name>String</name> <account> <accountNumber>String</accountNumber> <name>String</name> <balance> <balanceAmount>0.0</balanceAmount> </balance> <balance> <balanceAmount>0.0</balanceAmount> </balance> <properties>

Sort nodes in XML using XSLT

纵饮孤独 提交于 2019-12-11 11:14:56
问题 I have an XSL variable matchedNodes which holds XML data. Which means <xsl:copy-of select="$matchedNodes"/> will produce an XML like this <home name="f"> <standardpage> <id text="a1"></id> </standardpage> <searfchpage> <id text="a2"></id> </searfchpage> <searfchpage> <id text="a3"></id> </searfchpage> </home> I want to sort this XML so that searfchpage nodes always comes first..Is there any way to do this? 回答1: Simple ordering (move <searfchpage> to the top, keep the rest of the children in