xslt-1.0

how to change the tag name in xslt?

孤人 提交于 2019-12-12 03:48:50
问题 could you please tell me how to change the tag name xslt ? ?I want to change img tag to imp-img tag . here is my code http://xsltransform.net/bwdwsT/1 Expected out <!DOCTYPE html PUBLIC "XSLT-compat"> <hmtl> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>New Version!</title> </head> <aa> <div class="section1"> <div class="Normal"> <p> <imp-img height="260" alt="" hspace="6" width="310" align="left" vspace="6" src="/photo/a.cms"> ffff<br> <br> hh<br> <br>

Correlating Children elements with their parents given the ID values

纵饮孤独 提交于 2019-12-12 03:46:45
问题 I have to transform the input xml, <?xml version="1.0" encoding="UTF-8" ?> <queryResponse xmlns="urn:partner.soap.sforce.com"> <result xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="QueryResult"> <records xmlns:sf="urn:sobject.partner.soap.sforce.com" xsi:type="sf:sObject"> <sf:type>Course__c</sf:type> <sf:Id>a0c20000002Yu</sf:Id> <sf:Id>a0c20000002Yu</sf:Id> <sf:CurrencyIsoCode>USD</sf:CurrencyIsoCode> <sf:Course_End_Time__c>5 pm</sf:Course_End_Time__c> <sf:Course_Start_Time

how to show only two items in xslt?

流过昼夜 提交于 2019-12-12 03:40:56
问题 could yu please tell me how to show first two element is xslt ? here is my code http://xsltransform.net/ehVYZMp/6 <?xml version="1.0" encoding="UTF-8" ?> <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:exsl="http://exslt.org/common" extension-element-prefixes="exsl"> <xsl:output method="html" doctype-public="XSLT-compat" omit-xml-declaration="yes" encoding="UTF-8" indent="yes" /> <xsl:template match="a"> <hmtl> <head> <title>New Version!</title> </head>

XSL FO generate dynamics columns

…衆ロ難τιáo~ 提交于 2019-12-12 03:37:54
问题 I'm working on an XSL FO to generate PDF using FOP.NET. I've a requirement of generating the columns dynamically based on the XML i get from the DB. Below is the XML format i've and i need to generate the columns dynamically rather than hardcoding them in the xsl fo stylesheet. ANy help would be greatly appreciated. Edit: My goal is to build 20 types of reports and want to do it dynamically with 1 xsl fo. Is this possbile? or do I need to have 20 xsl fo files to generate the report? Please

How do i append input xml attribute into name of multiple output xml file using XSLT

风流意气都作罢 提交于 2019-12-12 03:34:54
问题 We have following input xml file in which we are trying XSLT processing instructions. ** Complete Input XML file :** It consist of Loop element as StockLineItem.for every single OrderHeader and OrderDetails we can have many StockineItems. Document tells single SalesforceOrderNumber element only. Hence We have to Output this element with xml Filename on each XML write. <?xml version="1.0" encoding="Windows-1252"?> <SalesOrders xmlns:xsd="http://www.w3.org/2001/XMLSchema-instance" xsd

Difference in template rule processing XSLT 1.0 vs 2.0

孤街醉人 提交于 2019-12-12 03:21:53
问题 Answering another XSLT question on this site, I stumbled on a difference between XSLT 1.0 and 2.0 that I don't understand. Who can explain what is happening here, and how the difference may be resolved? Note: I am using XML Spy version 2011 sp1 (x64). My input XML is <?xml version="1.0" encoding="UTF-8"?> <root> <Manager grade="10" id="26"> <Employee id="1" grade="9"/> <Employee id="2" grade="8"/> </Manager> <Manager grade="10" id="27"> <Employee id="3" grade="9"/> <Employee id="4" grade="8"/

xslt node-set use in key function - find children by parent attribute

雨燕双飞 提交于 2019-12-12 03:16:19
问题 I have an XML File. <?xml version="1.0" encoding="UTF-8"?> <XML> <Items> <ItemRef ID='answer'></ItemRef> <ItemRef ID='number'></ItemRef> <ItemRef ID='delete'></ItemRef> <ItemRef ID='remove'></ItemRef> </Items> <ItemDef ID='anwser'></ItemDef> <ItemDef ID='number'> <EnumItemRef EID = '1'></EnumItemRef> </ItemDef> <ItemDef ID='delete'> <EnumItemRef EID = '2'></EnumItemRef> </ItemDef> <ItemDef ID='remove'></ItemDef> <EnumItem EID="1"> <EnumItem Value = '1'></EnumItem> <EnumItem Value = '2'><

How to store value in XSL and syntax for-each?

旧巷老猫 提交于 2019-12-12 03:15:13
问题 My request XML is : <?xml version="1.0" encoding="utf-8"?> <test123 class="test" version="str1234"> <Header> <MYD>str1234</MYID> </Header> <Body> <Action method="Request" type="PROV"> <Approval> <Approval1>1234567890</Approval1> <Linked123> <XYZNumber>12345</XYZNumber> </Linked123> <Version>123</Version> <Country level="12" hasModified="true" isSelected="true"> <Year>1999</Year> <Month>Jan</MonthShortName> </Country> <Version>123</Version> <Country level="12" hasModified="true" isSelected=

Layer 7 XSLT1.0 and XSLT2.0 compatibility

倾然丶 夕夏残阳落幕 提交于 2019-12-12 03:09:42
问题 We are using Layer7 which is an ESB featuring XML transformation with the help of XSLT1 and XSLT2. They use XALAN and Saxon 9.4.0.4 but they enable the FEATURE_SECURE_PROCESSING flag. For my tests I use a dedicated TransformerFactory class like this : package company.transformer.factory; import javax.xml.XMLConstants; import javax.xml.transform.Source; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerConfigurationException; import net.sf.saxon

XSLT 1.0: search an attribute and add to parent element

纵饮孤独 提交于 2019-12-12 02:57:53
问题 XML Input 1: <wine grape="chardonnay"> <product>Carneros</product> <year>1997</year> <price>10.99</price> <Field attributes="gccxml(msgid=237)"/> <Field id="5" attributes=""/> <Field id="6" attributes=""/> <Field line="19"/> </wine> XML Input 2: <wine grape="chardonnay"> <product>Carneros</product> <year>1997</year> <price>10.99</price> <Method attributes="gccxml(msgid=237)"> <Argument location="f0:13"/> </Method> <Field line="19" attributes=""/> </wine> XML output: <wine grape="chardonnay"