xslt-2.0

XSLT 2.0: Transform notation in plain text to svg

强颜欢笑 提交于 2019-12-29 08:59:05
问题 I am new to transformations between different formats. My goal is to transfer a notation from a toolkit which is in a plain text format to svg. An easy example would be that I have an orange ellipse and the notation would be like this (x and y is the coordinate system so 0 and 0 means the ellipse is in the middle): GRAPHREP PEN color:$000000 w:2pt FILL color:$ff7f00 ELLIPSE x:0pt y:0pt rx:114pt ry:70pt and my desired output would be an svg code something like this(the cx and cy coordinate are

Merge different products belong to each standard - V2 [duplicate]

∥☆過路亽.° 提交于 2019-12-25 19:05:44
问题 This question already has an answer here : Merge different products belong to each standard (1 answer) Closed 3 years ago . I have to transform the following xml content, <Standards xmlns="http://ws.wso2.org/dataservice"> <Standard> <ProductID>200057</ProductID> <Prefix>ISO</Prefix> <SNumber>1001</SNumber> <DraftProducts> <RelatedProduct> <ProductID>1500163</ProductID> </RelatedProduct> </DraftProducts> <ReferenceProducts> <RelatedProduct> <ProductID>263973</ProductID> <RelationId>708519<

Merge different products belong to each standard - V2 [duplicate]

≡放荡痞女 提交于 2019-12-25 19:05:35
问题 This question already has an answer here : Merge different products belong to each standard (1 answer) Closed 3 years ago . I have to transform the following xml content, <Standards xmlns="http://ws.wso2.org/dataservice"> <Standard> <ProductID>200057</ProductID> <Prefix>ISO</Prefix> <SNumber>1001</SNumber> <DraftProducts> <RelatedProduct> <ProductID>1500163</ProductID> </RelatedProduct> </DraftProducts> <ReferenceProducts> <RelatedProduct> <ProductID>263973</ProductID> <RelationId>708519<

How do i derive the total cost in XSLT?

北战南征 提交于 2019-12-25 18:44:34
问题 I need your guidance is solving this xslt question. As always, thank you for your help. This is an extension to my earlier question where I was asked to provide the end result. However, since the format has changed and there is some really good information and responses in the other post, I did not want to change that post. However, the input xml file has changed. Sorry for a long post. I thought it might be useful to provide additional information. XML Input <Output> <Transaction> <TID>T01<

In XSLT, I have a requirement like adding all MSPFEE amount under invoice element

微笑、不失礼 提交于 2019-12-25 17:00:23
问题 I have a requirement like below: In XSLT, I have a requirement like adding all MSPFEE amount under Invoice element based on FieldglassInvoiceId element, means if FieldglassInvoiceId is same then i need to consider only one the first MSP . Input: <Invoices xmlns="http://TargetNamespace.com/Invoices_FTP"> <Invoice> <ConsolidatedInvoiceID>ONE</ConsolidatedInvoiceID> <FieldglassInvoiceID>123</FieldglassInvoiceID> <GrossInvoiceAmount>1600.00</GrossInvoiceAmount> <NetInvoiceAmount>1600.00<

Unable to get the XSLT select id() function to work successfully

守給你的承諾、 提交于 2019-12-25 10:02:37
问题 I'm having trouble getting the id() function to work in my xslt transformation per the example code below and I'm not sure why. When I load data.xml into a browser I'm expecting to see just the name & size values of the 'BC' item per the stylesheet/transformation. Any suggestions? FYI: I've adapted the example from another site. File: transform.xslt <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html"

Unable to get the XSLT select id() function to work successfully

懵懂的女人 提交于 2019-12-25 10:02:04
问题 I'm having trouble getting the id() function to work in my xslt transformation per the example code below and I'm not sure why. When I load data.xml into a browser I'm expecting to see just the name & size values of the 'BC' item per the stylesheet/transformation. Any suggestions? FYI: I've adapted the example from another site. File: transform.xslt <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html"

XSLT transformation to group similar tags

落花浮王杯 提交于 2019-12-25 08:08:43
问题 I have this XML with players and citizens sections. Each section has multiple person tags. <?xml version="1.0" encoding="UTF-8"?> <test> <players> <person> <name>joe</name> <age>20</age> </person> <person> <name>sam</name> <age>23</age> </person> </players> <citizens> <person> <name>joe</name> <city>ny</city> </person> <person> <name>sam</name> <city>london</city> </person> </citizens> </test> Now I want to transform this so that person tags of, players and citizens sections are merged

Nesting flat XML siblings

心已入冬 提交于 2019-12-25 07:47:59
问题 Attemping to transform XML with XSLT 2.0. Flat Source XML: <body> <R1/> <R1/> <R2/> <R2/> <R2/> <R3/> <R3/> <R3/> <R1/> <R1/> <R2/> <R2/> <R1/> </body> Desired Output: <body> <R1/> <R1> <R2/> <R2/> <R2> <R3/> <R3/> <R3/> </R2> </R1> <R1/> <R1> <R2/> <R2/> </R1> <R1/> </body> Basically these R1 - R3 elements signify sect-1, sect-2, sect-3 type elements. R2's are nested within their previous sibling R1 and R3's are nested within their previous sibling R2. Elements that are the same are on the

Sum of similar elements in XSLT

梦想与她 提交于 2019-12-25 06:58:11
问题 I get input xml as : <root> <SalesOrderLine> <Item><ID>1056365</ID></Item> <Quantity>1.00</Quantity> <UnitPrice><UnitAmount>4.4</UnitAmount></UnitPrice> </SalesOrderLine> <SalesOrderLine> <Item><ID>1056365</ID></Item> <Quantity>1.00</Quantity> <UnitPrice><UnitAmount>8.4</UnitAmount></UnitPrice> </SalesOrderLine> <SalesOrderLine> <Item><ID>1056366</ID></Item> <Quantity>1.00</Quantity> <UnitPrice><UnitAmount>0.00</UnitAmount></UnitPrice> </SalesOrderLine> </root> The expected output xml is :