xslt-1.0

How to process on values before sorting them?

旧街凉风 提交于 2019-12-25 05:10:00
问题 I previously posted this question on this portal for which I got a satisfactory solution. Now my problem has evolved a bit. What if my XML in the linked question is updated so that my numbers have a unit associated with them like cm , m , in , px etc. So that the new XML is: <root> <a> <b>12cm</b> <e>hello</e> </a> <a> <b>11m</b> <e>how</e> </a> <a> <c>13m</c> <f>are</f> </a> <a> <b>21cm</b> <f>you</f> </a> <a> <d>22cm</d> <e>hello</e> </a> <a> <c>14m</c> <f>hi</f> </a> Now I would first need

Strip encoded values between XML elements and namespaces in XSLT 1.0

末鹿安然 提交于 2019-12-25 05:05:29
问题 I have an XML with spaces between XML elements. I am transforming it to XSL FO with XSLT 1.0 template to print a pdf report. I would like to decode the values in XSLT to print in the PDF.Below is my XML and XSLT 1.0. Can anyone please guide me decoding the values between XML elements? XML <PdfPrinter> <Reports> <Report> <BranchID>SA-02</BranchID> <Trade_x0020_Date>2016-08-10T00:00:00</Trade_x0020_Date> <Account_x0020_No>ABCDE01384</Account_x0020_No> <CParty_x0020_ID/> <Reference_x0020_No>TS-N

Special characters in XSL

徘徊边缘 提交于 2019-12-25 04:30:23
问题 I'm working on a XSL 1.0 transformation to get HTML visualisation when displaying the XML in Firefox. In my original XML, I have characters like &eacute; &egrave; &lsquo;... I need to convert them into é, è, ‘... I have used this template : <xsl:template name="string-replace-all"> <xsl:param name="text" /> <xsl:param name="replace" /> <xsl:param name="by" /> <xsl:choose> <xsl:when test="contains($text, $replace)"> <xsl:value-of select="substring-before($text,$replace)" /> <xsl:value-of select

XSLT to avoid namespace

感情迁移 提交于 2019-12-25 04:13:59
问题 I have a input xml like..: <?xml version="1.0" encoding="UTF-8"?> <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ListResponse xmlns="urn:abcde:xyz:1"> <Gtins> <Gtin> <gtinID>11111</gtinID> <name>222222</name> <label>S11111 - EA</label> <description>XYZ</description> <value>11111</value> </Gtin> <Gtin> <gtinID>999999</gtinID> <name>999999</name> <label>asdfg</label> <description>ghgj</description> <value>999999</value> </Gtin> </Gtins> </ListResponse> </S:Body> </S

XSLT Mapping using foreach

我只是一个虾纸丫 提交于 2019-12-25 04:13:34
问题 This is the sample XML data that i am using and then i have to pass all the values to an additional properties tag.. <ns1:Quote> <ns1:QuoteVendor>123</ns1:QuoteVendor> <ns1:QuoteNumber>sai</ns1:QuoteNumber> <ns1:QuoteVersion>sri</ns1:QuoteVersion> <ns1:QuoteValue>sas</ns1:QuoteValue> <ns1:QuoteProperty>sandy</ns1:QuoteProperty> </ns1:Quote> After transformation using XSLT i am expecting the format as <AdditionalProperties> <ns1:Properties> <ns1:Propertyname>QuoteVendor</ns1:Propertyname> <ns1

Formatting dotted line inside a table using XSLT

我只是一个虾纸丫 提交于 2019-12-25 04:05:03
问题 I am converting XML file using XSL Transformation in a Microsoft Word file. I created this table: You can see that this is an index alphabetical in two column. The first column contains the city name; The second column contains ......... (serves only for layout); The third column contains number. You can see for example: ACCIAROLI.................... (a lot of blank space)|.............|2665.3 - 2666.5 In this case I would: ACCIAROLI......................................................|.....

Looping Element to Single Element in XSLT

大憨熊 提交于 2019-12-25 04:04:21
问题 I need to convert the following content <QTLS_ITEM> <ID>123</ID> <ID1>1345</ID1> <SERAIL_NUMBER>1026977­04257</SERAIL_NUMBER> <PROD_NAME>upgrade</PROD_NAME> </QTLS_ITEM> <QTLS_ITEM> <ID>123</ID> <ID1>1345</ID1> <SERAIL_NUMBER>1026977­04257</SERAIL_NUMBER> <PROD_NAME>Plug­in</PROD_NAME> </QTLS_ITEM> <QTLS_ITEM> <ID>123</ID> <ID1>1345</ID1> <SERAIL_NUMBER>1026977­04257</SERAIL_NUMBER> <PROD_NAME>License</PROD_NAME> </QTLS_ITEM> This is a looping element type. <QTLS_ITEM> is a repeating element.

Multiple rows using XSLT

守給你的承諾、 提交于 2019-12-25 04:02:05
问题 I appreciate if anyone could help me on this. I have an XML that looks like this: <root> <worker> <Primary_Key>12345</Primary_Key> <First_Name>ABC</First_Name> <Last_Name>DEF</Last_Name> <Multiple_Data> <Code>MO</Code> <Amount>35</Amount> </Multiple_Data> <Multiple_Data> <Code>PA</Code> <Amount>45</Amount> </Multiple_Data> </worker> <worker> <Primary_Key>67890</Primary_Key> <First_Name>GHI</First_Name> <Last_Name>JKL</Last_Name> <Multiple_Data> <Code>PA</Code> <Amount>25</Amount> </Multiple

Copy xml + remove some positional nodes

给你一囗甜甜゛ 提交于 2019-12-25 03:52:48
问题 I nee to do something in BizTalk. But it's only xslt so i tagged it as an xslt question. I have a "multipart" message on input (as you can see in the xml below "root & InputMessagePart_0" I have the following xml as input. <s0:Root xmlns:ns0="http://schemas.microsoft.com/BizTalk/2003/aggschema"> <InputMessagePart_0> <ns0:parentnode xmlns:ns0="http://schemas.microsoft.com/namespace1" > <ns0:childNode attribute1="test" attribute2="test"> <levelA xmlns="http://schemas.microsoft.com/namespace2"/>

Below condition is not working in xsl

老子叫甜甜 提交于 2019-12-25 03:44:29
问题 I have the below condition that I have wriiten in xsl below.. as i have getting an value in xml of fpml:tradeId now it can be there in xml or it can not be there for example as shown below.. <fpml:tradeId tradeIdScheme=""></fpml:tradeId> or it can contain value also <fpml:tradeId tradeIdScheme="">10381159400</fpml:tradeId> as advise i have change the implementation to but still not working .. <xsl:if test = "fpml:dataDocument/*/*/fpml:partyTradeIdentifier[2]/fpml:tradeId = ' '"> <xsl:value-of