skip to Main Content

JSON to XML using XSLT with changing the content

I want to convert existing json file to xml file and some values: json file: { "Code": "111", "UnitCode": "XYZ", "valueCond": { "ir": "#001", "nk": "portal" }, "property": "AFB139" } desire xml file: <map> <Code>111</Code> <UnitCode>XYZ</UnitCode> <valueCond> <ir>#001_1234</ir> <nk>portal:zeo</nk> <valueCond>…

VIEW QUESTION

XSLT3 set json output to array of string without key

I am new to xslt, I have a xml containing those elements <cbl:ShippingAddress> <cbl:AddressLine AddressLineNumber="1"> <cbl:Line>line1</cbl:Line> </cbl:AddressLine> <cbl:AddressLine AddressLineNumber="2"> <cbl:Line>line2</cbl:Line> </cbl:AddressLine> </cbl:ShippingAddress> using this code <map key="address"> <array key="lines"> <xsl:for-each select="/cbl:ShippingAddress/cbl:AddressLine/cbl:Line"> <map> <string key="line">{.}</string> </map> </xsl:for-each> </array> </map> I get…

VIEW QUESTION

Looking up key-value pairs in JSON objects from XSLT

I have an XSLT implementation that hyphenates strings following latex patterns, i.e. inserts soft hyphens in strings. I call this function like this: <xsl:template match="p[lang('en')]/text()"> <xsl:analyze-string select="." regex="w+"> <xsl:matching-substring> <xsl:value-of select="fn:hyphenate(., '­', 'en')"/> <xsl:non-matching-substring> <xsl:value-of select="."/> </xsl:non-matching-substring> </xsl:analyze-string> </xsl:template> Now,…

VIEW QUESTION
Back To Top
Search