xslt-1.0

replace namespace uri using XSLT in SOAP message

大兔子大兔子 提交于 2019-12-02 11:51:54
问题 i have an input soap message, trying to replace part of namespace uri with a different string. I am able to replace entire URI with a different URI, but not able to modify the existing URI. I need to look for 'OLDSTRING' and replace with 'NEWSTRING'. The string VARIABLESTRING varies in in every input xml, so I should keep as it is in the output xml Input XML: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:schemas-OLDSTRING-com:VARIABLESTRING">

Change values in XML based to those referenced in another XML file based on multiple match criteria

五迷三道 提交于 2019-12-02 11:35:33
I have a large XML file and need to change certain values to those in another XML document based on multiple matching criteria. My large XML file 'file1.xml' is in the following format: <institution> <ukprn>1234</ukprn> <course> <courseID>1</courseID> <courseaim>X99</courseaim> </course> <student> <birthdate>30/10/1985</birthdate> <instance> <OWNINST>1558310|1</OWNINST> <FC>1</FC> <STULOAD>100</STULOAD> <elq>4</elq> <MODE>31</MODE> <StudentOnModule> <MODID>08|29400</MODID> <MODOUT>4</MODOUT> </StudentOnModule> <StudentOnModule> <MODID>08|29091</MODID> <MODOUT>4</MODOUT> </StudentOnModule> <

merge two elements using xslt based on attribute values

帅比萌擦擦* 提交于 2019-12-02 10:03:58
问题 This is how my source file looks like: <?xml version="1.0" encoding="UTF-8" standalone="no"?> <book> <mbean code="org.book.mybooks" name="mycompany.props.jndi:name=mybookprops"> <attribute name="bookprops"> abc.mybook.onebook=@Value@ def.mybook.twobook=@Value@ ghi.myebook.threebook=@Value@ </attribute> </mbean> <book> <mbean code="org.book.mybooks" name="mycompany.props.jndi:name=mybookprops"> <attribute name="bookprops"> abc.mybook.onebook=@New_Value@ def.mybook.twobook=@New_Value@ ghi

How to convert a negative decimal into hexadecimal using xslt 1

ぐ巨炮叔叔 提交于 2019-12-02 09:38:54
I would like to convert negative and positive decimal into hexadecimal using xslt 1.0. There's already a topic related to this question here but the answer is given using xslt 2.0. I tried to reproduce the template using xslt 1.0 but it always returns an empty value. <xsl:template name="convertDecToHex"> <xsl:param name="pInt" /> <xsl:variable name="vMinusOneHex64"><xsl:number>18446744073709551615</xsl:number></xsl:variable> <xsl:variable name="vCompl"> <xsl:choose> <xsl:when test="$pInt > 0"> <xsl:value-of select="$pInt" /> </xsl:when> <xsl:otherwise> <xsl:value-of select="$vMinusOneHex64 +

check condition in xslt

大憨熊 提交于 2019-12-02 08:35:31
问题 Below is the input XML (Little Big) sorry for the bigger input XML and as well as output xml <tutorial> <lessons> <lesson> chapter unit 1 page </lesson> <lesson> chapter unit 10~ page </lesson> <lesson> chapter unit page </lesson> <lesson> note lesson </lesson> <lessons1> <lesson> chapter unit 1 page </lesson> <lesson> description page </lesson> <lesson> chapter unit page </lesson> </lessons1> </lessons> </tutorial> Below is my Output Xml <?xml version="1.0" encoding="ISO-8859-1"?> <Geography

Grouping flat xml using xslt (muenchian grouping), can't get it to group

冷暖自知 提交于 2019-12-02 08:19:49
I spent quite some time trying to get muenchian grouping of the below xml to work but I can't get it to work. I tried a number of different ways so posting the most recent attempt probably just confuses anyone trying to help me. :-) Xslt needs to be 1.0 Input file is invoice lines where "invoice header info" is duplicated for each line belonging to a particular invoice. Grouping should be made in field _id, i e value in RESULTSET/ROW"/COL[12]/DATA (e. g. 'C82F1B47-9758-4D18-ABD7-80386385F6AD') COL[21] through COL[27] are the different invoice lines for the invoice and as such should be listed

XSLT: Remove excess whitespace characters preserving nodes

为君一笑 提交于 2019-12-02 08:17:05
问题 So my problem is this. I have a transform document which is used in many places, and generically handles a lot of small formatting transforms. In one specific case, I need to remove whitespace from the result. The output looks something like: '\n <I>Something</I>Very Significant With A Superscript Note<SUP>1</SUP>\n ' I've tried variations on: <xsl:template match="no_whitespace"> <xsl:variable name="result"> <xsl:apply-templates/> </xsl:variable> <xsl:copy-of select="normalize-space($result)"

xslt to remove duplicates entries using Muenchian grouping

∥☆過路亽.° 提交于 2019-12-02 08:04:20
问题 I am trying to display all <department> s of <company> node. But I don't want to display duplicate entries of department from the same company . XML: <employee_data> <employeedetails id="1"> <company id="1"> <companyname>AOL</companyname> <department>IT</department> </company> <employeename>Patrick</employeename> <employeedesg>Software Engineer</employeedesg> <employeesalary>18000</employeesalary> <employeedoj>10/03/2015</employeedoj> </employeedetails> ..... similar sets...... ..... similar

How to transform string equation to number?

假装没事ソ 提交于 2019-12-02 07:57:29
I generated by a for each the following field: 214.2+428.4+end I have used substring-before(prices,'+end') but this is a string. Any ideas how I can take the 214.2+428.4 and sum it up? input: xml: <items> <item> <price>12.50</price> <quantity>2</quantity> </item> <item> <price>13.20</price> <quantity>3</quantity> </item> </items> xsl: <xsl:variable name="total"><xsl:for-each select="item"><xsl:value-of select="price*quantity"></xsl:value-of><xsl:text>+</xsl:text></xsl:for-each>end </xsl:variable> output: 25,39.6 Thank you in advanced. I would suggest you try it this way: XSLT 1.0 <xsl

Determining Last page position in xsl-fo

北战南征 提交于 2019-12-02 07:42:37
Can we somehow determine the position of the last-page in XSL-FO? If I want to place my footer only on the last page, then how it could be done? As Input data varies and is not static. So any number of pages can come depending on the data. Hope, it's not too late. But anyway, for all interested people: Create a page master <fo:simple-page-master master-name="my-last-page">...</fo:simple-page-master> and put your footer as a "region-after" into that master. Add this to your repeatable-page-master-alternatives <fo:conditional-page-master-reference page-position="last" master-reference="my-last