xslt-1.0

xsl key not passing through variables

梦想与她 提交于 2019-12-13 04:51:47
问题 I've got the following xml: <section> <templateId root="2.16.840.1.113883.10.20.22.2.4" /> <text> <list listType="ordered"> <item>9/18/2013 - Weight - 125 lbs</item> <item>9/18/2013 - Blood Pressure - 120/80 mm Hg</item> <item>9/18/2013 - BMI - 19 98</item> </list> </text> </section> I need to have the html output appear as the following: <table> <tr> <td>9/18/2013</td> <td>Blood Pressure - 120/80</td> <td>Weight - 125lbs</td> <td>BMI - 19</td> </tr> </table> I have the following key set up

Handling < > in XSLT 1.0

十年热恋 提交于 2019-12-13 04:48:47
问题 I have a problem, when trying to read a structure having < > in source XML. Input Structure - <?xml version="1.0" encoding="UTF-8"?> <RecordsData> <RecordsData> <UID><RecordsData xmlns=""><RecordsData><UID>200</UID><RID>Test-1</RID><Date>20142812</Date><Status>N</Status></RecordsData></RecordsData></UID> </RecordsData> </RecordsData> Expected Output Structure (there are two requirements) - One is just conversion of < > into well formed XML tags. <?xml version="1.0" encoding="UTF-8"?>

Best way to “fix” malformed html for use in an xsl transform

拟墨画扇 提交于 2019-12-13 04:37:51
问题 I have an input xml document that contains mal-formed html which has been xml encoded. i.e. the xml document itself is technically valid. Now I am applying an xsl transform to the xml which output well-formed xhtml5 but contains the mal-formed html. Examples of the bad html: html, head and body tags in html fragments. font tags mismatched quotes unclosed tags extra close tags with no matching open close tags in the wrong order (e.g. <b><u>text</b></u> ) Now in my situation I actually don't

merge parent and child attributes using xslt based on attribute values

笑着哭i 提交于 2019-12-13 04:37:07
问题 I have an xml file which contains the following markup, I know the format of this file is not correct but that's how the file is. <?xml version="1.0" encoding="UTF-8"?> <mbean code="org.book.mybooks" name="mycompany.props.jndi:name=mybookprops"> <attribute name="CombineProps" serialDataType="jbxb"> <jndi:bindings xmlns:jndi="urn:jboss:jndi-binding-service:1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:schemaLocation="urn:jboss:jndi-binding-service:1.0 resource:jndi-binding

Convert XML List to HTML Table Using XSL

久未见 提交于 2019-12-13 04:36:37
问题 Hello I was struggling with this for the past days and I could not find a good answer nor solution. I have an XML file with a list of objects like this: <?xml version="1.0" encoding="UTF-8"?> <LineItems> <TableName>Lines</TableName> <TableTerm>Lines</TableTerm> <LineItems> <Class>A Class</Class> </LineItems> <LineItems> <Number>1234</Number> </LineItems> <LineItems> <Description>G</Description> </LineItems> <LineItems> <Class>B Class</Class> </LineItems> <LineItems> <Number>5678</Number> <

Constructing, not selecting, XSL node set variable

帅比萌擦擦* 提交于 2019-12-13 04:32:30
问题 I wish to construct an XSL node set variable using a contained for-each loop. It is important that the constructed node set is the original (a selected) node set, not a copy. Here is a much simplified version of my problem (which could of course be solved with a select, but that's not the point of the question). I've used the <name> node to test that the constructed node set variable is in fact in the original tree and not a copy. XSL version 1.0, processor is msxsl. Non-working XSL: <?xml

Grouping of xml nodes in xslt 1.0

拥有回忆 提交于 2019-12-13 04:28:27
问题 Input : Enter XML <Root> <Number>1</Number> <Reference>100</Reference> <Number>2</Number> <Reference>101</Reference> <Number>3</Number> <Reference>100</Reference> <Number>4</Number> <Reference>102</Reference> <Number>5</Number> <Reference>100</Reference> </Root> Expected Output : <Root> <Number>1</Number> <Reference>100</Reference> <RefNumber>1</RefNumber> <Number>2</Number> <Reference>101</Reference> <RefNumber>1</RefNumber> <Number>3</Number> <Reference>100</Reference> <RefNumber>2<

How to add extra root nodes for not well formed XML structure?

我们两清 提交于 2019-12-13 03:48:19
问题 We have the below not well formed input XML which is coming from source system. <?xml version="1.0" encoding="UTF-8"?> <ns0:invoiceOrder xmlns:ns0="http://cts.com" type="ABCD" businessDivision="X0" salesOrganization="XYZ10" Channel="Y0"> <ns0:references> <ns0:key type="Source System">ABC</ns0:key> <ns0:relationship scheme="Customer" schemeAgency="APAC" role="Sell to">703760000</ns0:relationship> <ns0:document type="Purchase Order">AB123</ns0:document> </ns0:references> <ns0:notes> <ns0:note

Grouping values with same attributes using xslt-1.0

末鹿安然 提交于 2019-12-13 03:46:50
问题 Given this input XML: <?xml version="1.0" encoding="ISO-8859-1" ?> <agrisResources xmlns:ags="http://purl.org/agmes/1.1/" xmlns:dc="http://purl.org/dc/elements/1.1/"> <agrisResource bibliographicLevel="AM" ags:ARN="^aSF17^b00003"> <dc:subject xml:lang="en">Penaeidae</dc:subject> <dc:subject xml:lang="en">Vibrio harveyi</dc:subject> <dc:subject xml:lang="en">Vibrio parahaemolyticus</dc:subject> <dc:subject> <ags:subjectClassification scheme="ags:ASC">ASFA-1</ags:subjectClassification> <ags

if condition inside data attribute of html using xsl

混江龙づ霸主 提交于 2019-12-13 03:40:46
问题 I am trying to write an if condition inside my data attribute... right now I am receiving the xsml vaue but dont know how to put if there... when i use if outside html it works fine.. providing my code below... http://xsltransform.net/bFukv8i/16 <xsl:if test="//Devices//SideMenu//NavTitleCheckBox='SideMenu'"> Data_Nav_Title="<xsl:value-of select='//Devices//SideMenu//NavTitle'/>" </xsl:if> <article class="banner-hero banner-hero--blocks" data-nav-title="{//Devices//SideMenu//NavTitle}"><