Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

How to make XSLT

  Asked By: Trupti    Date: Oct 30    Category: Java    Views: 640
  

This is my input XML.
==============================

<ORDERS05>
<IDOC>
<E1EDP01 SEGMENT="1">
<E1EDP19 SEGMENT="1">
<KTEXT>K text1</KTEXT>
<IDTNR>Idt nr1</IDTNR>
<MFRPN>Mfr nr1</MFRPN>
</E1EDP19>
</E1EDP01>
</IDOC>
</ORDERS05>


Plz help in making a XSLT..which can solve this problem:-
========================================================

My problem related to the point where i want ..if
this <E1EDP01> exists in source document..write
correcponding TAGS in the output xml..like..<KTEXT>K text1</KTEXT>
<IDTNR>Idt nr1</IDTNR>
<MFRPN>Mfr nr1</MFRPN>
if this <E1EDP01> does'nt exist in the source document..
write these correcponding TAGS in the output xml as EMPTY value
tags..

AND DO MIND IT THAT I LL HAVE ONLY AND ONLY ONE <IDOC> IN MY SOURCE
XML...NOT LOT MANY.
AS IS BEING SHOWN IN THIS UPPER DOCUMENT.

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Luki Fischer     Answered On: Oct 30

I think this will help  u.
you can do so by using xsl:if tag

<xsl:if test="E1EDP01">
.....
....
....
</xsl:if>

 
Didn't find what you were looking for? Find more on How to make XSLT Or get search suggestion and latest updates.




Tagged: