428 Topics
I want to merge 2 XMLs based on a particular condition. e.g: Sample1.xml: <rootNode> <header> <title agg="sum">1</title> <records agg="sum">10</records> <number agg="min">5</number> <header> </rootNode> Sample2.xml <rootNode> <header> <title agg="sum">2</title> <records agg="sum">20</records> <number agg="min">15</number> <header> </rootNode> I want that these two xml files should be merged based on the attribute specified within …
Hi sorry to bother you. I have another problem with XSL file. I have to sort out the codes in numerical order the codes have four characters and four numerals for example, COMP2100 COMP2400 COMP3410 LAWS2202 LAWS2250 when I just do <xsl:sort select="code" order="ascending" /> it displays above result. However, …
Hello Guys, Just wanted to ask on how to get the author names in the given xml sample below and put an attribut of eq="yes". EQ means Equal Contributors. This is the XML. <ArticleFootnote Type="Misc"> <Para>John Doe and Jane Doe are equal contributors.</Para> </ArticleFootnote> This should be the output in …
Hi Buddy, I have a requirement which is explained as below: 1. My input xml file is as shown: <input> <historicalObservation> <observationDate>20110111</observationDate> <observedRate>14.74</observedRate> <observationWeight>1</observationWeight> <observationType>fixing</observationType> </historicalObservation> <historicalObservation> <observationDate>20110111</observationDate> <observedRate>10.28</observedRate> <observationWeight>2</observationWeight> <observationType>fixing</observationType> </historicalObservation> <historicalObservation> <observationDate>20110111</observationDate> <observedRate>27.96</observedRate> <observationWeight>3</observationWeight> <observationType>fixing</observationType> </historicalObservation> <historicalObservation> <observationDate>20110111</observationDate> <observedRate>4.94</observedRate> <observationWeight>4</observationWeight> <observationType>fixing</observationType> </historicalObservation> <historicalObservation> <observationDate>20110225</observationDate> <observedRate>14.18</observedRate> <observationWeight>1</observationWeight> <observationType>fixing</observationType> </historicalObservation> …
this is my code:: <!--school.xml--> <?xml version="1.0" encoding="ISO-8859-1"?> <?xml-stylesheet type="text/xsl" href="school.xsl"?> <UCSC> <student> <name>Isuru ilangakoon</name> <age>21</age> <contct_no>0714234672</contct_no> <degree>computer science</degree> <school>DVharmapala college</school> </student> <student> <name>randika malinga</name> <age>22</age> <contact_no>0713567134</contact_no> <degree>computer science</degree> <school>Nalanda college</school> </student> <student> <name>vinod kawinda</name> <age>22</age> <contct_no>0783451024</contct_no> <degree>computer science</degree> <school>maliyadewa college</school> </student> <student> <name>Inshaf mahatt</name> <age>21</age> <contct_no>0777234151</contct_no> <degree>ICT</degree> <school>D.S.Senanayaka college</school> …
I have a java application that reads csv file and displays the data on a text area. the idea is to transform this data(source data) into a target data, this involves rearranging it and transforming some elements in each field. now i intend to transform this displayed csv data into …
i have a set of xml data from a database, i want to transform these data into a form that would conform to the target data. in the sense that the elements node would change and the text nodes will also be rearranged something like source <?xml version="1.0" encoding="UTF-8"?> <XMLCreators> …
I have a project where I need to get and count distinct values in tags in an XML document. If you look at the XML, I am specifically trying to count the distinct number of WorkOrderNumbers for Tuesday. Later I will do Monday and so on. I have tried the …
Hi Buddy, I have a requirement to convert the below shown input.xml into result.xml and the XSLT which I am trying with is shown at the end. input.xml: <match> <FieldMatcherResult> <FieldPair> <Context>A</Context> <Field1>A1</Field1> <Field2>A2</Field2> </FieldPair> <FieldPair> <Context>B</Context> <Field1>B1</Field1> <Field2>B2</Field2> </FieldPair> </FieldMatcherResult> </match> result.xml: <result> <FieldMatcherResult> <FieldPair> <Context>A</Context> <Field1>A1</Field1> <Field2>A2</Field2> </FieldPair> …
Hi i am using XSLT transformation to transform one xmi file to uml file. In my xml files i have two different nodes: **First node:** <ownedAttribute xmi:type="uml:Property" xmi:id="EAID_9D13F3CF_4FDB_46bc_B47F_8B4DC9C6DADD" name="Part2" visibility="public" aggregation="composite"/> **Second node:** <Profile:AND base_Part="EAID_9D13F3CF_4FDB_46bc_B47F_8B4DC9C6DADD"/> what i am trying to do is that every time the xmi:id of the uml:property …
hi i have my xml code below: [CODE]<?xml-stylesheet type="text/xsl" href="book.xsl" version="1.0"?> <books xmlns:xsd = "http://www.w3.org/2001/XMLSchema-instance" xsd:noNamespaceSchemaLocation = "book.xsd"> <book id="001"> <isbn>0465044050</isbn> <title>Birth of the Mind</title> <author> <firstname>Gary</firstname> <lastname>Marcus</lastname> </author> <publisher>Basic Books</publisher> <year>2004</year> <price>17.68</price> <picture>0465044050.gif</picture> <description>write your desc.</description> </book> </books> [/CODE] and here my xsl code: [CODE]<?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet version="1.0" …
Hi, I have a requirement in XSLT where in I have a xml as below, <Process> <name></name> <duration></duration> <time></time> <name></name> <duration></duration> <time></time> <name></name> <duration></duration> <time></time> . . . . </Process> <The first <name> node we get we create a Process_INfo and copy <name> in it and all other node following …
Hi, I've got an XML file that I need to make changes to before creating an output XML file. I've got an XSLT Transform file which does part of the job fine, but I'm needing to go one step further which is where I'm struggling. In C# I'm using an …
Hi All, I am kind of find it difficult to build my (xslt 1) template: I have this following XML input: <Ticket> <ItineraryItem> <Flight ArrivalDateTime="2012-08-31T09:40:00" DepartureDateTime="2012-08-31T06:00:00" DirectionInd="Outbound"> <DepartureAirport LocationCode="BRN"/> <ArrivalAirport LocationCode="ZTH"/> <OperatingAirline Code="2L" FlightNumber="5320"/> </Flight> </ItineraryItem> <ItineraryItem> <Flight ArrivalDateTime="2012-09-14T11:00:00" DepartureDateTime="2012-09-14T10:15:00" DirectionInd="Inbound"> <DepartureAirport LocationCode="ZTH"/> <ArrivalAirport LocationCode="CFU"/> <OperatingAirline Code="2L" FlightNumber="5321"/> </Flight> </ItineraryItem> …
Hi, I am totally new to XSL and this is my first time coding it with it. I have HTML and CSS experience and trying to figure out how to integrate it all together for a SharePoint view. Basically I have an XML file with about 3 records, each having …
I'm trying to write a transform to parse an html document and create another html document but I can't seem to use the html tags in the xslt. My html source that I want to apply the transform on looks like this: <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> </head> <body class="3-column"> <div …
Need an xslt to convert xml into json. I have a xml file which is having 3 attributes. The value in the 3rd attribute is another xml file. I need an xslt which can read the value of the 3rd attribute as another xml (not just a value) and can …
Hello guys I have an xslt file I want to extract data from. I am new to xslt but at the moment I can perform basic operations like looping through the nodes and creating element and attributes. My problem is that I want to select a particular value from a …
Hello guys, I have a problem convrting to an int in xslt. My xslt is: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:tem="http://tempuri.org/"> <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/> <xsl:template match="/"> <xsl:call-template name="ConnectConsumer"/> </xsl:template> <xsl:template name="ConnectConsumer"> <tem:callRule> <xsl:for-each select="/"> <xsl:for-each select="ConsumerDetails"> <xsl:for-each select="Score"> <xsl:element name="tem:arg0"> <xsl:value-of select='format-number(Score,"#" )'/> </xsl:element> </xsl:for-each> </xsl:for-each> </xsl:for-each> </tem:callRule> </xsl:template> </xsl:stylesheet> …
Hi I am new to XSLT and I need help on following XML conversion. I have following xml input and need to convert to another XML structure using XSLT . Please can somebody provide me the XSLT for this conversion. <?xml version = "1.0" encoding = "UTF-8"?> <Inputs xmlns = …
xslt Hello guys, I hope everyone is well. I didnt know where to post this particular problem so I just put it under general, I apologize if its the wrong place. this is one of my first few attempts to get the xml data to a specific xml format. Its …
|Input :::: <gtdt> <name>Construction 2012</name> <edition>120</edition> <ISSN>1473-0065</ISSN> <jurisdictions> <jurisdiction name="Albania"> <topics> <topic> <name>All Questions</name> <questions> <question> <number>1</number> <title>Joint ventures</title> <full>Must foreign designers or contractors enter into a joint venture with a local contractor to design, build and be paid for their work? Does the law require that the local contractor …
I have the following xslt which copies selected element of xml but omits the root node how do i get the root node output as well? <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > <xsl:output method="xml" indent="yes" version="1.0" encoding="iso-8859-1" /> <xsl:template match="/"> <!--<xsl:copy-of select="itemList" />--> <xsl:for-each select="itemList/saleItem"> <xsl:variable name="status"> <xsl:value-of select="status"/> …
Hi, I have a problem with a nestled "for-each". I want information from every orditem. Every orderitem have one "orderitem id" and could have several "job id". The sample belove do not work,any suggestions? XML <order orderid="20"> <workflows> <workflow id="97" <items> <orderitem id="1"> <jobs> <job id="150"/> <job id="151"/> </jobs> </orderitem> …
I'm trying to do an XSLT transformation that requires that I copy certain parts of the document multiple times and concatenate it to other individual parts. I'm working with xsl:copy and wildcards characters and coming up short on the output (I'm really trying to limit how many elements/attributes I have …
Hi , I am totally new to XSLs, trying to write an xsl(JDeveloper) to validate XML against a given schema. I have been trying with the following but getting a syntax not supported error for "instance of schema-element" Can someone provide a sample xsl to validate xml against the schema? …
> Quoted Text Here <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet xmlns:x="http://www.w3.org/2001/XMLSchema" xmlns:d="http://schemas.microsoft.com/sharepoint/dsp" version="1.0" exclude-result-prefixes="xsl msxsl ddwrt" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:SharePoint="Microsoft.SharePoint.WebControls" xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema"> <xsl:output method="html" indent="no"/> <xsl:template match="//xml"> <span style="border:solid 1px black"> -<xsl:value-of select="@query"/>- </span> <xsl:for-each select="//z:row"> <div> <xsl:value-of select="@ows_LinkTitle"/> </div> <div> <xsl:value-of select="@ows_Body"/> </div> </xsl:for-each> </xsl:template> </xsl:stylesheet> Gave me the …
Hello Does anyone know how to disable the current link in a breadcrumb trail. All that i know in XSLT has failed Please help here is the XSLT code: [code] <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="html" omit-xml-declaration="yes" /> <!-- Variable to determine if the current open page is displayed as a …
Hi there, I'm new to this web site and new to xml and xslt. I have the following document that I would like to transform using xml: [CODE]<?xml version="1.0" encoding="iso-8859-1" ?> - <Report Name="Conway"> - <table1> - <table1_JobNumber_Collection> - <table1_JobNumber JobNumber="3401"> - <Detail_Collection> <Detail ItemNumber="10" ItemSorCode="H0101" ItemSorName="Take up 305mm x …
Firstly I will say im a complete and total novice when it comes to XSLT and XML so this could be a very obvious mistake on my behalf. [CODE] <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="node()"> <xsl:copy> <xsl:copy-of select="@*"/> <xsl:apply-templates/> </xsl:copy> </xsl:template> <xsl:template match="TestNode"> <RenamedNode> <xsl:copy-of select="."/> </RenamedNode> </xsl:template> </xsl:stylesheet> [/CODE] When …
Hi all, I need to transform xml --><xslt> -->xml I have flat xml file(source file) , Need to code Xslt file to get target file. (Files are given below) [B]This is source file(flat)[/B] [CODE] <CV:Hot> <CV:Aaa style="Title"> <b type="Aaa">Curriculum Vitae</b> </CV:Aaa> <CV:Aaa style="Subtitle"> <b>Personal Details</b> </CV:Aaa> <CV:Aaa style="Name">Tom Hack</CV:Aaa> <CV:Aaa …
Hi Everybody, I have this: XML: [code] <?xml version="1.0" encoding="utf-8" ?> <FORM ID="1" Formtitle="Form Builder"> <FIELDS> <!--Label Form--> <FIELDSET Legend ="Form for contact" > <PAGE title="Page Title" id="page_1"> <!--end label--> <Field type ="formTitle1" Label ="Title"/> <Button type ="Button" Label ="btnSave" Text="Save" Required ="0"/> <!--TEXTFIELD EMAIL--> <FIELD type="TextBox" label="Email:" required="true"> <PROPERTIES> …
[B]I need to convert this xml into another one to send a soap message[/B] [CODE] <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:Magento" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body> <ns1:customerCustomerListResponse> <storeView SOAP-ENC:arrayType="ns1:customerCustomerEntity[2]" xsi:type="ns1:customerCustomerEntityArray"> <item xsi:type="ns1:customerCustomerEntity"> <customer_id xsi:type="xsd:int">1</customer_id> <created_at xsi:type="xsd:string">2007-08-30 23:23:13</created_at> <updated_at xsi:type="xsd:string">2008-08-08 12:28:24</updated_at> <increment_id xsi:type="xsd:string">000000001</increment_id> <store_id xsi:type="xsd:int">1</store_id> <website_id xsi:type="xsd:int">1</website_id> <email xsi:type="xsd:string">[email protected]</email> <firstname xsi:type="xsd:string">John</firstname> …
Hello, I try to make a website with xml and xslt 1.0. Now I wonder if and how this can be done. One page looks like this : [URL="http://www.tamarawobben.nl"]http://www.tamarawobben.nl[/URL] But on another page the image is on a whole other place. A example can be seen here : [url]http://www.tamarawobben.nl/?month=2005-12&pg=1[/url] Is …
hi, I am trying to wrap all the information inside <description> in CDATA [CODE]<xsl:output method="xml" indent="yes" version="1.0" encoding="UTF-16" standalone="yes" cdata-section-elements="description" />[/CODE] [CODE] <xsl:template match="produseXML/produs"> <item> <title><xsl:value-of select="nume_produs" /></title> <link><xsl:value-of select="url_produs" /></link> <description> <xsl:value-of select="descriere" /> <xsl:value-of select="pret" /> </description> <category><xsl:value-of select="categorie" /></category> <guid><xsl:value-of select="link_afiliat" /></guid> </item> </xsl:template>[/CODE] this is what …
Hi there, I have a very simple schema where each node requiring HTML output contains 7 possible numerical variables (all within nodes N1 - N13). I need to output text and image content according to the number within each node. Below is a sample of my schema: [CODE] <?xml version="1.0" …
Hi folks, i need some help generating some simple xslt script for the following problem: TRH room code TT room code ABCD PABCD aBCD AABCD AbCD BABCD abCD CABCD ABcD DABCD aBcD EABCD AbcD FABCD abcD GABCD ABCd HABCD aBCd IABCD AbCd JABCD abCd KABCD ABcd LABCD aBcd MABCD Abcd …
Write the XSLT that does the reverse of the XSLT(below), i.e. it converts the attributes in Personsout.xml into elements. (<xsl:copy> should be used for this as well ) Can someone help me how to do this.am still a beginner. Personsout.xml [CODE] <?xml version=”1.0” encoding=”UTF-8”?> <Persons> <Person FirstName=”Jill” LastName=”Harper”/> <Person FirstName=”Claire” …
Hi all, I've got my xml displaying correctly using php and the xsl template below, but I only want to display properties with a type of either apartment or unit, and have more than 2 bedrooms. I can't for the life of me work this out. I've tried using <xsl:choose>, …
Hi all, I'm having trouble coming up with the correct XSLT code and was wondering if anyone could point me in the right direction. This is what I need to do... I've got an xml tree with pages like so: [CODE] <page> <title>A<title> <subtitle>I</subtitle> <item>1</item> </page> <page> <title>D<title> <subtitle>V</subtitle> <item>7</item> …
I am new to xslt so please excuse my naive question. I have an xml file with DTD, when I try to convert this xml file to html using xslt, I get errors. When i remove the DTD and repeat the process i get no errors. Please advice me on …
Hi All I am referring an xml file(document.xml), through document function. Based on the input xml id value, I am taking the corresponding value from document.xml. The output will have this corresponding value and the position in input, as shown in the actualoutput.xml. However, would like to generate an output …
Hi, I am applying transform to a input xml file using the following code. [CODE]//Applying transform for the input word xml file. XslTransform myXslTransform; myXslTransform = new XslTransform(); myXslTransform.Load(openFileDialogz_Xslt.FileName); myXslTransform.Transform("C://Target.xml", targetpath);[/CODE] In the XSLT file, wrote for displaying attributes as [CODE]<xsl:attribute name="label"> <xsl:value-of select="$level"/> </xsl:attribute> <xsl:attribute name="externalid"> <xsl:value-of select="$externalid"/> </xsl:attribute> …
Hi Folks, I am using XSLT 1.0, and stuck in a situation where I am having decimal rounding problem. Let me give you an example: My generated XML is: [CODE] <?xml version="1.0" encoding="UTF-8"?> <CostSummary> <CostingItems> <CostingItem CostBasis="7" Description="Per Person" PassengerRPH="1"> <UnitCost Amount="3.333333" CurrencyCode="EUR"/> </CostingItem> <CostingItem CostBasis="7" Description="Per Person" PassengerRPH="2"> <UnitCost …
Could you please help me in replacing the namespaces in the output. my input is <soapenv:Body> <abc:requestDocumentRequest> <abc:brand>brand</util:brand> <abc:portal>port</util:portal> <abc:userId>userid</abc:userId> <abc:folderName>folder</abc:folderName> </abc:requestDocumentRequest> </soapenv:Body> I need the soap body with different namespaces <soapenv:Body> <xyz:requestDocumentRequest> <xyz:brand>brand</util:brand> <xyz:portal>port</util:portal> <xyz:userId>userid</xyz:userId> <xyz:folderName>folder</xyz:folderName> </xyz:requestDocumentRequest> </soapenv:Body>
Hi Friends, I am new to this XML & XSL. I want to write a template which takes two arguements and it should take the node name and node value. in template i want to format the input value. Please share if any one can guide me on this. The …
I have the following source xml file. <root> <child1></child1> <child2></child2> </root> I need to convert it to <MYOWNTAG1> <TEST1>CurrentDate</TEST1> <TEST2>CurrentTime</TEST2> </MYOWNTAG1> <MYOWNTAG2> <XML> <![CDATA[<root><child1></child1><child2></child2></root>]]> <XML> </MYOWNTAG2> I'm having problem in inserting the CDATA section.Please help.
Hi, I have this xml file, in my XSLT file I want to process <Parcel .../> element first then the <DeliveryAdress ../> and then the <Consignment .../> element. I would be very grateful if someone could suggest a solution please. Thanks in advance. <xml version="1.0" ?> <MR23030B> <Header RECORD_TYPE="HD" METER_NO="10800" …
Hi, I have a large complex XML and I need to change certain elements values in it. So output of the XML has to remain exactly same except those value be changed. Name of the file, preferably remain same. Element Name & Values that will be changed will come from …
I have this XML: <p> <span>Foo</span> <br/> </p> <p> <span>Foo</span> <br/> <span>Foo</span> <span>Foo</span> <br/> </p> <p> <span>Foo</span> <span>Foo</span> <br/> <span>Foo</span> <span>Foo</span> <span>Foo</span> <br/> </p> I would like to be able to select the <br/> tag first and then loop through the spans above them. The reason for this is to …
The End.