in Education by
i need to merge shop products which contains size in name. As you can see i have to cut size from product name and put it to new element inside group-element "SIZES", the same thing with PARTNO and STOCK which are needed to identify product, his sizes and quantity. I created some xslt with template and foreach loop but i dont know how to verify if some node was created before. Its very important for me because xslt is my new resposibility in my job, im new with xslt so my code is very simple and ugly. here is example xml: <?xml version="1.0" encoding="Windows-1250"?> ZBRS180 CZERWONA BRAMKA PIŁKARSKA 167.01 5907695527654 177 NJ2117 A NIEBIESKO-RÓŻOWE SIZE. M (34-37) ŁYŻWOROLKI NILS EXTREME 113.01 5907695510333 158 NJ2117 A NIEBIESKO-RÓŻOWE SIZE. L (38-41) ŁYŻWOROLKI NILS EXTREME 113.01 5907695510334 35 **Output file should looks like that:** <?xml version="1.0" encoding="Windows-1250"?> ZBRS180 CZERWONA BRAMKA PIŁKARSKA 167.01 5907695527654 177 NJ2117 A NIEBIESKO-RÓŻOWE ŁYŻWOROLKI NILS EXTREME M (34-37) L (38-41) 5907695510333 5907695510334 158 35 113.01 Here is my xsl code: <!-- Creating variable with node name --> <!-- Looking for SIZES --> <!-- Looking for EANS --> <!-- Looking for external codes --> <!-- Looking for stocks --> <!-- Filling elements to no size item --> JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
You can try this: <!-- Looking for SIZES --> <!-- Looking for EANS --> <!-- Looking for stocks --> <!-- Looking for external codes --> http://xsltfiddle.liberty-development.net/gWvjQfg

Related questions

0 votes
    i need to merge shop products which contains size in name. As you can see i have to cut size ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 17, 2022 in Education by JackTerrance
0 votes
    I've got an extremely long XML file, like context1 test1 context1 context2 test2 context2 ........ ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 4, 2022 in Education by JackTerrance
0 votes
    Use in xml this query searchCategory1=" SELECT "$1" FROM "$2" GROUP BY "$1" ORDER BY "$1"" but ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 6, 2022 in Education by JackTerrance
0 votes
    Here is my test SQL: declare @Table table (strField nvarchar(6), xmlField xml) insert into @Table values ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 23, 2022 in Education by JackTerrance
0 votes
    I have an XML with Text elements that can include tagged text and depending on the elements attribute value ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 13, 2022 in Education by JackTerrance
0 votes
    This is my Xml document(small snippt). Table 11: Tanjavur NREGS activities CHAPTER IV: Findings and analysis ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 19, 2022 in Education by JackTerrance
0 votes
    In my XSLT stylesheet I extract the value of the current month using a month-from-dateTime like this . ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 17, 2022 in Education by JackTerrance
0 votes
    I have an XML and would like to : sort on employeeNumber, and for each bookingtime by year, month ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 29, 2022 in Education by JackTerrance
0 votes
    I have followed through some of the threads discussing ouput escaping in XSLT but none seesm to address the ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 19, 2022 in Education by JackTerrance
0 votes
    I have an XSLT like this: In the second template, which matches nodes in the fooDocument.xml which is ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 19, 2022 in Education by JackTerrance
0 votes
    I have followed through some of the threads discussing ouput escaping in XSLT but none seesm to address the ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 19, 2022 in Education by JackTerrance
0 votes
    I have an XSLT like this: In the second template, which matches nodes in the fooDocument.xml which is ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 13, 2022 in Education by JackTerrance
0 votes
    This question already has answers here: Pandas Merging 101 (6 answers) Closed 3 years ago. Sorry guys, ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 23, 2022 in Education by JackTerrance
0 votes
    This question already has answers here: Pandas Merging 101 (6 answers) Closed 3 years ago. Sorry guys, ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 14, 2022 in Education by JackTerrance
0 votes
    My question is a bit complicated and I wasted whole day without any good effect I get from one place ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 17, 2022 in Education by JackTerrance
...