xslt-2.0

XSLT String Wrap:How do I wrap words in a String at New line character(\n)

混江龙づ霸主 提交于 2019-12-02 17:02:13
问题 We want to write XSLT transformation for given XML. We are trying to text wrap for comment element at newline character on pressing of ENTER KEY. In that, <Comment> elements Splits across 6 different line items after applying XSLT Transformation. Note: Here "\n" is the linefeed character. It means end the present line and go to a new line. We tried following : Pattern observed in it: <StockCode> element is blank for all having comment substring at each line items. while StockCode element is

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

↘锁芯ラ 提交于 2019-12-02 16:50:20
问题 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=

XSLT Create a hierarchical structure from a flat structure by using certain level criteria

六月ゝ 毕业季﹏ 提交于 2019-12-02 15:58:57
问题 I want to create a XSD structure from an Excel output using XSLT. But my XSLT does not generate the hierarchical structure, correctly. It has some additional nodes in an element group, if these nodes with same matching parameters are defined in a later group, which has the same level in the hierarchy. The Excel XML output looks like following: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <nodes> <node typeTag="Test" nodeTag="GGG" minOccurs="0" segmentMaxOccurs="1" groupMaxOccurs=

match uncaught though declared in XSL

我怕爱的太早我们不能终老 提交于 2019-12-02 14:55:15
问题 I've the below XML. <para indent="no"> <star.page>18</star.page> Further to same. </para> and when i run the below XSLT. <xsl:template match="para"> <xsl:value-of select="./node()[1][self::star.page]|./label/node()[1][self::star.page]"/> <div> <xsl:choose> <xsl:when test="./@align"> <xsl:attribute name="class"><xsl:text>para align-</xsl:text><xsl:value-of select="./@align"/></xsl:attribute> </xsl:when> <xsl:otherwise> <xsl:attribute name="class"><xsl:text>para</xsl:text></xsl:attribute> </xsl

XSLT - regex select only one digit number from text() node

女生的网名这么多〃 提交于 2019-12-02 13:23:15
I've xml like this, <section> <para>height 4cm, width 5cm, weight 343</para> <para>height 2cm, width 6cm, weight 410</para> <para>height 3cm, width 1cm, weight 590</para> </section> here I need to doubled the single digit numbers of the para/text() . desired output should looks like, <section> <para>height 8cm, width 10cm, weight 343</para> <para>height 4cm, width 12cm, weight 410</para> <para>height 6cm, width 2cm, weight 590</para> </section> To do this I've a template like this, <xsl:template match="para/text()"> <xsl:analyze-string select="." regex="\d"> <xsl:matching-substring> <xsl:value

XSLT 2.0 or 3.0 for Node.js?

蓝咒 提交于 2019-12-02 13:16:05
I've been looking for a node module that supports XML to HTML/XSL version 2.0 transformations via XSLT. I'm confined to developing in a windows environment, and have researched many alternatives including Saxon/C (saxon-node), node_xslt, gulp-xslt, and some others. I haven't found a solution that satisfies our needs. Most solutions seem to require a linux or mac osx environment for development. Any ideas? I greatly appreciate the help in advance! Your best bet for XSLT in Node.js would be Saxon-JS , which is a XSLT 3.0 runtime in pure JavaScript 1 . Note that you'll need Saxon-EE , a

XSLT Create a hierarchical structure from a flat structure by using certain level criteria

自闭症网瘾萝莉.ら 提交于 2019-12-02 11:46:33
I want to create a XSD structure from an Excel output using XSLT. But my XSLT does not generate the hierarchical structure, correctly. It has some additional nodes in an element group, if these nodes with same matching parameters are defined in a later group, which has the same level in the hierarchy. The Excel XML output looks like following: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <nodes> <node typeTag="Test" nodeTag="GGG" minOccurs="0" segmentMaxOccurs="1" groupMaxOccurs="1000000"> <metaInfo><ID>40</ID><Level>1</Level></metaInfo> </node> <node typeTag="Test" nodeTag="BBB"

XSLT String Wrap:How do I wrap words in a String at New line character(\\n)

北城余情 提交于 2019-12-02 10:29:55
We want to write XSLT transformation for given XML. We are trying to text wrap for comment element at newline character on pressing of ENTER KEY. In that, <Comment> elements Splits across 6 different line items after applying XSLT Transformation. Note: Here "\n" is the linefeed character. It means end the present line and go to a new line. We tried following : Pattern observed in it: <StockCode> element is blank for all having comment substring at each line items. while StockCode element is having value for all those <comment> element is blank <OrderDetail> is repeating node here. Input XML :

Change XML element name using XSLT

我的未来我决定 提交于 2019-12-02 10:28:22
I am trying to change XML node name but it doesn't allow me to do so. In my below code I I have two templates 1. Change Node name 2.Create parent node for DocumentReference. Please see my XML and XSLT. My XML <?xml version="1.0" encoding="UTF-8" standalone="no"?> <DataArea> <PurchaseOrder> <PurchaseOrderLine> <DocumentReference> <DocumentID> <ID>23423</ID> </DocumentID> </DocumentReference> <DocumentReference> <DocumentID> <ID>23424</ID> </DocumentID> </DocumentReference> <Item> <CustomerItemID> <!-- ArtNr --> <ID>444</ID> </CustomerItemID> </Item> <Quantity unitCode="PCE">17.3</Quantity> <

grouping following-siblings with same name and same attributes causes exception in saxon

£可爱£侵袭症+ 提交于 2019-12-02 10:27:56
I have some xml documents (similar to docbook) that have to be transformed to xsl-fo. Some of the documents contains poems, and the lines of the poems are written in separate p tags. The verses are separated by br tags. There are "page" tags that are irrelevant and should be ignored. Typical code example: <h4>Headline</h4> <p>1st line of 1st verse</p> <p>2nd line of 1st verse</p> <br/> <p>1st line of 2nd verse</p> <p>2nd line of 2nd verse</p> <page n="100"/> <p>3rd line of 2nd verse</p> <h4>Other headline</h4> For the xsl-fo output, I would like to gather all the text of a verse into one