Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need help for creating executable xml

 
subhash patil
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have foolowing input xml i ahve to fill values in xml and convert in executable xml This xml contais some conditioanl parameters like if else and for
Input is like this And desired Output is as ateeched

<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
<!DOCTYPE TRAVELLINEDOCUMENT [
<!ELEMENT TRAVELLINEDOCUMENT (TRAVELANDEXPENSE | TRAVELRESOURCE)+>

<!ELEMENT TRAVELANDEXPENSE (HEADER?, FOOTER?, DOCUMENTHEADER?, CONTENT)>
<!ATTLIST TRAVELANDEXPENSE
LANGUAGEID CDATA #REQUIRED
ORIENTATION (PORTRAIT | LANDSCAPE) #REQUIRED
PAGEBORDER (NONE | TOP | BOTTOM | TOPBOTTOM | ALL | BOX | COLBOTTOM | COLTOP | COLTOPBOTTOM | COLUMNS) #REQUIRED
MARGINLEFT CDATA #REQUIRED
MARGINRIGHT CDATA #REQUIRED
MARGINTOP CDATA #REQUIRED
MARGINBOTTOM CDATA #REQUIRED
MARGINHEADER CDATA #REQUIRED
MARGINFOOTER CDATA #REQUIRED
LINESPACING CDATA #REQUIRED
FONT CDATA #REQUIRED
FONTSIZE CDATA #REQUIRED
FONTBOLD (TRUE | FALSE) #REQUIRED
FONTITALIC (TRUE | FALSE) #REQUIRED
FONTUNDERLINE (TRUE | FALSE) #REQUIRED
TEXTCOLOR CDATA #REQUIRED
BACKCOLOR CDATA #REQUIRED
FORMATSHORTTIME (TRUE | FALSE) #REQUIRED
TABLEBORDER (NONE | TOP | BOTTOM | TOPBOTTOM | ALL | BOX | COLBOTTOM | COLUMNS) #REQUIRED
>

<!ELEMENT HEADER (LINE)>
<!ATTLIST HEADER>

<!ELEMENT FOOTER (LINE)>
<!ATTLIST FOOTER>

<!ELEMENT CONTENT (BARCODE | PICTURE | TABLE | LINE | LINECONDITION | NEWPAGE)*>
<!ATTLIST CONTENT>

<!ELEMENT DOCUMENTHEADER (PICTURE | LINE | BARCODE | LINECONDITION)*>
<!ATTLIST DOCUMENTHEADER>

<!ELEMENT BARCODE EMPTY>
<!ATTLIST BARCODE
TOP CDATA #REQUIRED
HEIGHT CDATA #REQUIRED
LEFT CDATA #REQUIRED
WIDTH CDATA #REQUIRED
ORIENTATION (HORIZONTAL | VERTICAL) #REQUIRED
TYPE (0 | 1 | 2) #REQUIRED
CONTENT CDATA #REQUIRED
>

<!ELEMENT PICTURE EMPTY>
<!ATTLIST PICTURE
TOP CDATA #REQUIRED
HEIGHT CDATA #REQUIRED
LEFT CDATA #REQUIRED
WIDTH CDATA #REQUIRED
SOURCE CDATA #REQUIRED
>
<!ELEMENT TABLE ((TABLEHEADER+) | (LINE+) | (TABLEHEADER+ , LINE+) | (TABLEHEADER+ , MULTILINE) | (MULTILINE))>
<!ATTLIST TABLE
TYPE CDATA #REQUIRED
SORT CDATA #IMPLIED
READNEW CDATA #IMPLIED
KINDOFCOST CDATA #IMPLIED
TABLEHEADERNEWPAGE CDATA #IMPLIED
>

<!ELEMENT TABLEHEADER (COLUMN+)>
<!ATTLIST TABLEHEADER
FONTSIZE CDATA #IMPLIED
FONTBOLD (TRUE | FALSE) #IMPLIED
FONTITALIC (TRUE | FALSE) #IMPLIED
FONTUNDERLINE (TRUE | FALSE) #IMPLIED
TABLEBORDER CDATA #IMPLIED
>

<!ELEMENT LINE (COLUMN+ | CONDITION)*>
<!ATTLIST LINE
FONTNAME CDATA #IMPLIED
FONTSIZE CDATA #IMPLIED
FONTBOLD (TRUE | FALSE) #IMPLIED
FONTITALIC (TRUE | FALSE) #IMPLIED
FONTUNDERLINE (TRUE | FALSE) #IMPLIED
TABLEBORDER CDATA #IMPLIED
>

<!ELEMENT LINECONDITION (TRUE | FALSE | (TRUE , FALSE) | TABLE | LINE+ | MULTILINE | COLUMN | EMPTY)>
<!ATTLIST LINECONDITION
VALUE CDATA #REQUIRED
>

<!ELEMENT COLUMN (#PCDATA | CONDITION | EXECUTE )*>
<!ATTLIST COLUMN
FONTSIZE CDATA #IMPLIED
FONTBOLD (TRUE | FALSE) #IMPLIED
FONTNAME CDATA #IMPLIED
BACKCOLOR CDATA #IMPLIED
TEXTCOLOR CDATA #IMPLIED
WIDTHINCHARS CDATA #IMPLIED
WIDTHINTWIPS CDATA #IMPLIED
ALIGN (LEFT | CENTER | RIGHT) #REQUIRED
DECIMALPLACES CDATA #IMPLIED
>

<!ELEMENT MULTILINE (LINE+ | LINECONDITION | TABLE)*>

<!ELEMENT CONDITION (TRUE | FALSE | (TRUE , FALSE) | EMPTY)>
<!ATTLIST CONDITION
VALUE CDATA #REQUIRED
>

<!ELEMENT TRUE (#PCDATA | COLUMN | LINE | CONDITION | EXECUTE | NEWPAGE | TABLE | LINECONDITION)*>

<!ELEMENT FALSE (#PCDATA | COLUMN | LINE | CONDITION | EXECUTE | NEWPAGE | TABLE | LINECONDITION)*>

<!ELEMENT EXECUTE (#PCDATA | EMPTY)*>
<!ATTLIST EXECUTE
VALUE CDATA #IMPLIED
>

<!ELEMENT NEWPAGE (#PCDATA)*>
<!ATTLIST NEWPAGE
ORIENTATION (PORTRAIT | LANDSCAPE) #REQUIRED
PAGEBORDER (NONE | TOP | BOTTOM | TOPBOTTOM | ALL | BOX | COLBOTTOM | COLTOP | COLTOPBOTTOM | COLUMNS) #REQUIRED
MARGINLEFT CDATA #REQUIRED
MARGINRIGHT CDATA #REQUIRED
MARGINTOP CDATA #REQUIRED
MARGINBOTTOM CDATA #REQUIRED
MARGINHEADER CDATA #REQUIRED
MARGINFOOTER CDATA #REQUIRED
LINESPACING CDATA #REQUIRED
FONT CDATA #REQUIRED
FONTSIZE CDATA #REQUIRED
FONTBOLD (TRUE | FALSE) #REQUIRED
FONTITALIC (TRUE | FALSE) #REQUIRED
FONTUNDERLINE (TRUE | FALSE) #REQUIRED
TABLEBORDER (NONE | TOP | BOTTOM | TOPBOTTOM | ALL | BOX | COLBOTTOM | COLUMNS) #REQUIRED
>
]>
<TRAVELLINEDOCUMENT>
<TRAVELANDEXPENSE LANGUAGEID="de" ORIENTATION="PORTRAIT" PAGEBORDER="NONE" MARGINLEFT="700" MARGINRIGHT="500" MARGINTOP="600" MARGINBOTTOM="800" MARGINHEADER="0" MARGINFOOTER="1200" LINESPACING="130" FONT="BMWTypeLight" FONTSIZE="10" FONTBOLD="FALSE" FONTITALIC="FALSE" FONTUNDERLINE="FALSE" TEXTCOLOR="BLACK" BACKCOLOR="WHITE" TABLEBORDER="NONE" FORMATSHORTTIME="TRUE">
<HEADER>
<LINE FONTSIZE="9" FONTBOLD="TRUE">
<COLUMN WIDTHINCHARS="" WIDTHINTWIPS="3500" ALIGN="LEFT"></COLUMN>
<COLUMN WIDTHINCHARS="" WIDTHINTWIPS="3000" ALIGN="CENTER"></COLUMN>
<COLUMN WIDTHINCHARS="" WIDTHINTWIPS="3500" ALIGN="RIGHT"></COLUMN>
</LINE>
</HEADER>
<FOOTER>
<LINE FONTSIZE="9" FONTBOLD="TRUE">
<COLUMN WIDTHINCHARS="" WIDTHINTWIPS="6000" ALIGN="LEFT">
<CONDITION VALUE="(== '#traveller.Title#' '')">
<TRUE>
<CONDITION VALUE="(== '#traveller.NameAffix#' '')">
<TRUE>#traveller.FirstName# #traveller.LastName# #COLUMNBREAK#Reise-Nr.: #travel.TravelNumber#</TRUE>
<FALSE>#traveller.NameAffix# #traveller.FirstName# #traveller.LastName# #COLUMNBREAK#Reise-Nr.: #travel.TravelNumber#</FALSE>
</CONDITION>
</TRUE>
<FALSE>
<CONDITION VALUE="(== '#traveller.NameAffix#' '')">
<TRUE>#traveller.Title# #traveller.FirstName# #traveller.LastName# #COLUMNBREAK#Reise-Nr.: #travel.TravelNumber#</TRUE>
<FALSE>#traveller.Title# #traveller.NameAffix# #traveller.NameAffix# #traveller.FirstName# #traveller.LastName# #COLUMNBREAK#Reise-Nr.: #travel.TravelNumber#</FALSE>
</CONDITION>
</FALSE>
</CONDITION>
</COLUMN>
<!--<COLUMN WIDTHINCHARS="" WIDTHINTWIPS="1000" ALIGN="CENTER"> </COLUMN>
cic 25.02.2008 Weiterleitung am bei Nachweis-->
<COLUMN WIDTHINCHARS="" WIDTHINTWIPS="3000" ALIGN="LEFT">
<CONDITION VALUE="(AND (== '#Travel.TypeId#' '2') (!= '#SubmitUser.SubmitDate#' ''))">
<TRUE>weitergeleitet am #SubmitUser.SubmitDate#</TRUE>
<FALSE>#System.SystemDate#</FALSE>
</CONDITION>
</COLUMN>
<COLUMN WIDTHINCHARS="" WIDTHINTWIPS="1500" ALIGN="RIGHT">#Seite -%d-#</COLUMN>
</LINE>
</FOOTER>
<DOCUMENTHEADER>
<LINE>
<COLUMN FONTSIZE="7" FONTBOLD="FALSE" WIDTHINCHARS="" WIDTHINTWIPS="10000" ALIGN="LEFT"> </COLUMN>
</LINE>
<PICTURE TOP="500" LEFT="8600" HEIGHT="5335" WIDTH="7150" SOURCE="BMW.gif"/>
<LINE>
<COLUMN FONTSIZE="14" FONTBOLD="TRUE" WIDTHINCHARS="" WIDTHINTWIPS="10000" ALIGN="LEFT">
<CONDITION VALUE="(== '#Travel.TypeId#' '1')">
<TRUE>Dienstreise - E-Mail-Information</TRUE>
<FALSE>Kostennachweis</FALSE>
</CONDITION>
</COLUMN>
</LINE>
<LINE>
<COLUMN FONTSIZE="12" FONTBOLD="TRUE" WIDTHINCHARS="" WIDTHINTWIPS="10000" ALIGN="LEFT">
<CONDITION VALUE="(== '#Travel.TypeId#' '1')">
<TRUE>#System.SystemDate#</TRUE>
<FALSE>#AccountingUser.AccountingDate#</FALSE>
</CONDITION>
</COLUMN>
</LINE>
<LINE>
<COLUMN FONTSIZE="7" FONTBOLD="FALSE" WIDTHINCHARS="" WIDTHINTWIPS="10500" ALIGN="LEFT"></COLUMN>
</LINE>
<LINE>
<COLUMN FONTSIZE="6" BACKCOLOR="LIGHTORANGE" TEXTCOLOR="LIGHTORANGE" WIDTHINCHARS="" WIDTHINTWIPS="10500" ALIGN="LEFT">M</COLUMN>
</LINE>
<LINE>
<COLUMN FONTSIZE="7" FONTBOLD="FALSE" WIDTHINCHARS="" WIDTHINTWIPS="10500" ALIGN="LEFT"></COLUMN>
</LINE>
<LINE>
<COLUMN FONTSIZE="10" WIDTHINCHARS="" WIDTHINTWIPS="10000" ALIGN="LEFT">#traveller.Salutation#</COLUMN>
</LINE>
<LINE>
<COLUMN FONTSIZE="10" WIDTHINCHARS="" WIDTHINTWIPS="10000" ALIGN="LEFT">
<CONDITION VALUE="(== '#traveller.Title#' '')">
<TRUE>
<CONDITION VALUE="(== '#traveller.NameAffix#' '')">
<TRUE>#traveller.FirstName# #traveller.LastName#</TRUE>
<FALSE>#traveller.NameAffix# #traveller.FirstName# #traveller.LastName#</FALSE>
</CONDITION>
</TRUE>
<FALSE>
<CONDITION VALUE="(== '#traveller.NameAffix#' '')">
<TRUE>#traveller.Title# #traveller.FirstName# #traveller.LastName#</TRUE>
<FALSE>#traveller.Title# #traveller.NameAffix# #traveller.NameAffix# #traveller.FirstName# #traveller.LastName#
</FALSE>
</CONDITION>
</FALSE>
</CONDITION>
</COLUMN>
</LINE>
<LINE>
<COLUMN FONTSIZE="14" FONTBOLD="FALSE" WIDTHINCHARS="" WIDTHINTWIPS="10500" ALIGN="LEFT"></COLUMN>
</LINE>
</DOCUMENTHEADER>
<CONTENT>
<LINE>
<COLUMN FONTSIZE="7" FONTBOLD="FALSE" WIDTHINCHARS="" WIDTHINTWIPS="10500" ALIGN="LEFT"></COLUMN>
</LINE>
<PICTURE TOP="1300" LEFT="9000" HEIGHT="5335" WIDTH="7150" SOURCE="BMW.gif"/>
<BARCODE TOP="500" HEIGHT="500" LEFT="1000" WIDTH="4200" ORIENTATION="HORIZONTAL" TYPE="2" CONTENT="#traveller.EmployeeNumber#"></BARCODE>
<BARCODE TOP="500" HEIGHT="500" LEFT="6000" WIDTH="4200" ORIENTATION="HORIZONTAL" TYPE="2" CONTENT="#travel.TravelNumber#"></BARCODE>
<LINE>
<COLUMN FONTSIZE="7" FONTBOLD="FALSE" WIDTHINCHARS="" WIDTHINTWIPS="10500" ALIGN="LEFT"> </COLUMN>
</LINE>
<LINE>
<COLUMN FONTSIZE="7" FONTBOLD="FALSE" WIDTHINCHARS="" WIDTHINTWIPS="10500" ALIGN="LEFT"> </COLUMN>
</LINE>
<LINE>
<COLUMN FONTSIZE="14" FONTBOLD="TRUE" WIDTHINCHARS="" WIDTHINTWIPS="10000" ALIGN="LEFT">
<CONDITION VALUE="(== '#Travel.TypeId#' '1')">
<TRUE>Dienstreise - E-Mail-Information</TRUE>
<FALSE>Kostennachweis</FALSE>
</CONDITION>
</COLUMN>
</LINE>
<LINE>
<COLUMN FONTSIZE="12" FONTBOLD="TRUE" WIDTHINCHARS="" WIDTHINTWIPS="10000" ALIGN="LEFT">
<CONDITION VALUE="(== '#Travel.TypeId#' '1')">
<TRUE>#System.SystemDate#</TRUE>
<FALSE>#AccountingUser.AccountingDate#</FALSE>
</CONDITION>
</COLUMN>
</LINE>
<LINE>
<COLUMN FONTSIZE="7" FONTBOLD="FALSE" WIDTHINCHARS="" WIDTHINTWIPS="10500" ALIGN="LEFT"> </COLUMN>
</LINE>
<LINE>
<COLUMN FONTSIZE="6" BACKCOLOR="LIGHTORANGE" TEXTCOLOR="LIGHTORANGE" WIDTHINCHARS="" WIDTHINTWIPS="10500" ALIGN="LEFT"> </COLUMN>
</LINE>
<LINE>
<COLUMN WIDTHINCHARS="" WIDTHINTWIPS="10500" ALIGN="LEFT"> </COLUMN>
</LINE>
<LINECONDITION VALUE="(== '#Travel.TypeId#' '1')">
<TRUE>
<LINE>
<COLUMN FONTSIZE="10" WIDTHINCHARS="" WIDTHINTWIPS="6000" ALIGN="LEFT">#traveller.Salutation#</COLUMN>
<COLUMN FONTSIZE="10" WIDTHINCHARS="" WIDTHINTWIPS="1600" ALIGN="LEFT"></COLUMN>
<COLUMN FONTSIZE="10" WIDTHINCHARS="" WIDTHINTWIPS="3400" ALIGN="LEFT"></COLUMN>
</LINE>
<LINE>
<COLUMN FONTSIZE="10" WIDTHINCHARS="" WIDTHINTWIPS="6000" ALIGN="LEFT">
<CONDITION VALUE="(== '#traveller.Title#' '')">
<TRUE>
<CONDITION VALUE="(== '#traveller.NameAffix#' '')">
<TRUE>#traveller.FirstName# #traveller.LastName#</TRUE>
<FALSE>#traveller.NameAffix# #traveller.FirstName# #traveller.LastName#</FALSE>
</CONDITION>
</TRUE>
<FALSE>
<CONDITION VALUE="(== '#traveller.NameAffix#' '')">
<TRUE>#traveller.Title# #traveller.FirstName# #traveller.LastName#</TRUE>
<FALSE>#traveller.Title# #traveller.NameAffix# #traveller.NameAffix# #traveller.FirstName# #traveller.LastName#
</FALSE>
</CONDITION>
</FALSE>
</CONDITION>
</COLUMN>
<COLUMN FONTSIZE="10" WIDTHINCHARS="" WIDTHINTWIPS="1600" ALIGN="LEFT"></COLUMN>
<COLUMN FONTSIZE="10" WIDTHINCHARS="" WIDTHINTWIPS="3400" ALIGN="LEFT"></COLUMN>
</LINE>
<LINE>
<COLUMN FONTSIZE="10" WIDTHINCHARS="" WIDTHINTWIPS="6000" ALIGN="LEFT"></COLUMN>
<COLUMN FONTSIZE="10" WIDTHINCHARS="" WIDTHINTWIPS="1600" ALIGN="LEFT"></COLUMN>
<COLUMN FONTSIZE="10" WIDTHINCHARS="" WIDTHINTWIPS="3400" ALIGN="LEFT"></COLUMN>
</LINE>
<LINE>
<COLUMN FONTSIZE="10" WIDTHINCHARS="" WIDTHINTWIPS="3000" ALIGN="LEFT">Abteilung:</COLUMN>
<COLUMN FONTSIZE="10" WIDTHINCHARS="" WIDTHINTWIPS="3000" ALIGN="LEFT">#traveller.OrganisationId15#</COLUMN>
<COLUMN FONTSIZE="10" WIDTHINCHARS="" WIDTHINTWIPS="1600" ALIGN="LEFT"></COLUMN>
<COLUMN FONTSIZE="10" WIDTHINCHARS="" WIDTHINTWIPS="3400" ALIGN="LEFT"></COLUMN>
</LINE>
<LINE>
<COLUMN FONTSIZE="10" WIDTHINCHARS="" WIDTHINTWIPS="3000" ALIGN="LEFT">Personalnummer:</COLUMN>
<COLUMN FONTSIZE="10" WIDTHINCHARS="" WIDTHINTWIPS="3000" ALIGN="LEFT">#traveller.EmployeeNumber#</COLUMN>
<COLUMN FONTSIZE="10" WIDTHINCHARS="" WIDTHINTWIPS="1600" ALIGN="LEFT"></COLUMN>
<COLUMN FONTSIZE="10" WIDTHINCHARS="" WIDTHINTWIPS="3400" ALIGN="LEFT"></COLUMN>
</LINE>
</TRUE>
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic