Hide Clipart | Topics | Search
Log Out | Register | Edit Profile
Last 30 mins | 1 | 2

Calling XSLT experts

Chalanachithram.com DB » New TF Industry Related » Archive through November 09, 2014 » Calling XSLT experts « Previous Next »

Author Message
Top of pagePrevious messageNext messageBottom of page Link to this message

Cocanada
Legend
Username: Cocanada

Post Number: 48167
Registered: 01-2008
Posted From: 173.186.242.11

Rating: N/A
Votes: 0 (Vote!)

Posted on Friday, November 07, 2014 - 02:38 pm:   Insert Quote Edit PostDelete PostView Post/Check IPPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Just4fun:

bpel lo


ilaati kiska miska constraintlu naaku teliyavu

sadharanam ga ayite nee req ki asalu position() function akkarledu
Top of pagePrevious messageNext messageBottom of page Link to this message

Just4fun
Legend
Username: Just4fun

Post Number: 30901
Registered: 10-2007
Posted From: 75.181.155.41

Rating: N/A
Votes: 0 (Vote!)

Posted on Friday, November 07, 2014 - 02:22 pm:   Insert Quote Edit PostDelete PostView Post/Check IPPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Cocanada:

indulo for-each paina, if lopala enduku pettaav ani


Good question Cokesh.. evarikanna aa doubt vastadi anukunna nuvvu adigesav. bpel lo 1 for each unnapudu andulo inko element add cheyali ante inko for each vaadi add cheyali. other ways unnai emo theliyadu std gaa ee procedure follow avutuntam
Top of pagePrevious messageNext messageBottom of page Link to this message

Cocanada
Legend
Username: Cocanada

Post Number: 48161
Registered: 01-2008
Posted From: 173.186.242.11

Rating: N/A
Votes: 0 (Vote!)

Posted on Friday, November 07, 2014 - 02:17 pm:   Insert Quote Edit PostDelete PostView Post/Check IPPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Just4fun:


vuncl.. db automatically blocking some code. my kochen is
xsl:for-each select **/DepositCode"
xsl:if test='**/Books/Seq = "1"'

indulo for-each paina, if lopala enduku pettaav ani
Top of pagePrevious messageNext messageBottom of page Link to this message

Just4fun
Legend
Username: Just4fun

Post Number: 30899
Registered: 10-2007
Posted From: 75.181.155.41

Rating: N/A
Votes: 0 (Vote!)

Posted on Friday, November 07, 2014 - 02:15 pm:   Insert Quote Edit PostDelete PostView Post/Check IPPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Cocanada:

<xsl:for-each> ee line first enduku pettaavu?


to iterate over books nodes .. If anedi just add on to books/book/codes. If base chesukoni extra deposit code add cheyadaniki
Top of pagePrevious messageNext messageBottom of page Link to this message

Cocanada
Legend
Username: Cocanada

Post Number: 48157
Registered: 01-2008
Posted From: 173.186.242.11

Rating: N/A
Votes: 0 (Vote!)

Posted on Friday, November 07, 2014 - 02:03 pm:   Insert Quote Edit PostDelete PostView Post/Check IPPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Just4fun:



<xsl:for-each> ee line first enduku pettaavu?

this should be inside the if
Top of pagePrevious messageNext messageBottom of page Link to this message

Just4fun
Legend
Username: Just4fun

Post Number: 30898
Registered: 10-2007
Posted From: 75.181.155.41

Rating: N/A
Votes: 0 (Vote!)

Posted on Friday, November 07, 2014 - 01:31 pm:   Insert Quote Edit PostDelete PostView Post/Check IPPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Emc2:



Cocanada:


Top of pagePrevious messageNext messageBottom of page Link to this message

Just4fun
Legend
Username: Just4fun

Post Number: 30897
Registered: 10-2007
Posted From: 75.181.155.41

Rating: N/A
Votes: 0 (Vote!)

Posted on Friday, November 07, 2014 - 01:31 pm:   Insert Quote Edit PostDelete PostView Post/Check IPPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Emc2:

http://stackoverflow.com/questions/9608432/incrementing-and- checking-the-counter-variable-in-xslt


Uncle nenu try cheyaledu naa case ki suit avvadu but little bit tweak chesa if condition using Position() function use cheste work avutondi.

very first for each appudu variable(varPos) declare chesi position() value ni assign chesa

xsl:if test='../Books/Seq[$varPos] = "1"' petta if condition lo enni sarlu loop repeat aina seq=1 unnapude add avotondi.
Top of pagePrevious messageNext messageBottom of page Link to this message

Emc2
Legend
Username: Emc2

Post Number: 36655
Registered: 03-2008
Posted From: 108.48.4.211

Rating: N/A
Votes: 0 (Vote!)

Posted on Friday, November 07, 2014 - 01:11 pm:   Insert Quote Edit PostDelete PostView Post/Check IPPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Just4fun:



http://stackoverflow.com/questions/9608432/incrementing-and- checking-the-counter-variable-in-xslt
Top of pagePrevious messageNext messageBottom of page Link to this message

Just4fun
Legend
Username: Just4fun

Post Number: 30896
Registered: 10-2007
Posted From: 75.181.155.41

Rating: N/A
Votes: 0 (Vote!)

Posted on Friday, November 07, 2014 - 12:58 pm:   Insert Quote Edit PostDelete PostView Post/Check IPPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

Cokesh, Try chesa same results as in post#30893

Reason: 1 text '1' text kadu if condition work avutondi perfect ga but very beging lo unde for each loop run avutunnadu every time if condition pass avutondi as this if condition is looking entire nodes with seq=1.

If condition ni entire nodes chudakunda current node ki matrame restrict cheste problem solve avuddi but how ?
Top of pagePrevious messageNext messageBottom of page Link to this message

Just4fun
Legend
Username: Just4fun

Post Number: 30895
Registered: 10-2007
Posted From: 75.181.155.41

Rating: N/A
Votes: 0 (Vote!)

Posted on Friday, November 07, 2014 - 12:33 pm:   Insert Quote Edit PostDelete PostView Post/Check IPPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Cocanada:

xsl:if test="normalize-space(../../seq/text()="'1'")


let me test wit this..work avvadu anukuntunna.
Top of pagePrevious messageNext messageBottom of page Link to this message

Cocanada
Legend
Username: Cocanada

Post Number: 48155
Registered: 01-2008
Posted From: 173.186.242.11

Rating: N/A
Votes: 0 (Vote!)

Posted on Friday, November 07, 2014 - 12:23 pm:   Insert Quote Edit PostDelete PostView Post/Check IPPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Just4fun:


1 is text
put it in single quotes '1'
Top of pagePrevious messageNext messageBottom of page Link to this message

Just4fun
Legend
Username: Just4fun

Post Number: 30894
Registered: 10-2007
Posted From: 75.181.155.41

Rating: N/A
Votes: 0 (Vote!)

Posted on Friday, November 07, 2014 - 12:23 pm:   Insert Quote Edit PostDelete PostView Post/Check IPPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Emc2:

create one more variable and add for first time in the loop and turn off the flag


EMC raja, xslt lo variable increment option ledu ..each variable is like constant so adi kudaraledu.
Top of pagePrevious messageNext messageBottom of page Link to this message

Just4fun
Legend
Username: Just4fun

Post Number: 30893
Registered: 10-2007
Posted From: 75.181.155.41

Rating: N/A
Votes: 0 (Vote!)

Posted on Friday, November 07, 2014 - 12:21 pm:   Insert Quote Edit PostDelete PostView Post/Check IPPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Cocanada:

nee xsl copy paste cheyyi.




https://drive.google.com/file/d/0BxqjphPlJAC-ZHdjZjFROUpmOEk /view?usp=sharing

above xslt giving below results

<output>
<bookinstances>
<instcode>B1</instcode>
<instcode>B2</instcode>
<instcode>EZ</instcode>
</bookinstances>

<bookinstances>
<instcode>B3</instcode>
<instcode>B4</instcode>
<instcode>EZ</instcode>
</bookinstances>

<bookinstances>
<instcode>B5</instcode>
<instcode>EZ</instcode>
</bookinstances>
</output>
Top of pagePrevious messageNext messageBottom of page Link to this message

Cocanada
Legend
Username: Cocanada

Post Number: 48152
Registered: 01-2008
Posted From: 173.186.242.11

Rating: N/A
Votes: 0 (Vote!)

Posted on Friday, November 07, 2014 - 12:13 pm:   Insert Quote Edit PostDelete PostView Post/Check IPPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Just4fun:


xsl:if test="normalize-space(../../seq/text()="'1'")
Top of pagePrevious messageNext messageBottom of page Link to this message

Emc2
Legend
Username: Emc2

Post Number: 36654
Registered: 03-2008
Posted From: 128.229.4.22

Rating: N/A
Votes: 0 (Vote!)

Posted on Friday, November 07, 2014 - 12:10 pm:   Insert Quote Edit PostDelete PostView Post/Check IPPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Just4fun:




ohh that aa nee problem

create one more variable and add for first time in the loop and turn off the flag

check for that flag every time when you are adding the EZ

it gaurantee to add once only
Top of pagePrevious messageNext messageBottom of page Link to this message

Just4fun
Legend
Username: Just4fun

Post Number: 30892
Registered: 10-2007
Posted From: 75.181.155.41

Rating: N/A
Votes: 0 (Vote!)

Posted on Friday, November 07, 2014 - 12:01 pm:   Insert Quote Edit PostDelete PostView Post/Check IPPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)


Emc2:

xsl if use chesi seq 1 ayithe out pur EZ set cheyi


ide chestunna..kaani <instcode>EZ</instcode> anedi prati <bookinstances> ki add avutondi

output ila vastondi


<output>
<bookinstances>
<instcode>B1</instcode>
<instcode>B2</instcode>
<instcode>EZ</instcode>
</bookinstances>

<bookinstances>
<instcode>B3</instcode>
<instcode>B4</instcode>
<instcode>EZ</instcode>
</bookinstances>

<bookinstances>
<instcode>B5</instcode>
<instcode>EZ</instcode>
</bookinstances>
</output>



If check appudu edanna current node squ = 1 aite matrame add cheyu ani pettchocha? Current node imp
Top of pagePrevious messageNext messageBottom of page Link to this message

Cocanada
Legend
Username: Cocanada

Post Number: 48151
Registered: 01-2008
Posted From: 173.186.242.11

Rating: N/A
Votes: 0 (Vote!)

Posted on Friday, November 07, 2014 - 11:58 am:   Insert Quote Edit PostDelete PostView Post/Check IPPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

db formatting deleted my test condition.

admin vuncl..nee lo ee talent kudaa undaa?
Top of pagePrevious messageNext messageBottom of page Link to this message

Cocanada
Legend
Username: Cocanada

Post Number: 48150
Registered: 01-2008
Posted From: 173.186.242.11

Rating: N/A
Votes: 0 (Vote!)

Posted on Friday, November 07, 2014 - 11:58 am:   Insert Quote Edit PostDelete PostView Post/Check IPPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

are you using apply template? or for-each?

whatever you use, when you are composing <instcode> elements, add
<xsl:if>
<xsl:element><xsl:value-of></xsl:element>
</xsl:if>
Top of pagePrevious messageNext messageBottom of page Link to this message

Cocanada
Legend
Username: Cocanada

Post Number: 48149
Registered: 01-2008
Posted From: 173.186.242.11

Rating: N/A
Votes: 0 (Vote!)

Posted on Friday, November 07, 2014 - 11:50 am:   Insert Quote Edit PostDelete PostView Post/Check IPPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

emundi akkada thokka. nee xsl copy paste cheyyi. mistake ekkada undo cheptaa
Top of pagePrevious messageNext messageBottom of page Link to this message

Emc2
Legend
Username: Emc2

Post Number: 36653
Registered: 03-2008
Posted From: 128.229.4.22

Rating: N/A
Votes: 0 (Vote!)

Posted on Friday, November 07, 2014 - 11:49 am:   Insert Quote Edit PostDelete PostView Post/Check IPPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

xsl if use chesi seq 1 ayithe out pur EZ set cheyi

xpath use chesi seq ki var create cheyyi, or write a finction to check for seq and hold the variable for seq 1 tru false

easy rajaa
Top of pagePrevious messageNext messageBottom of page Link to this message

Cocanada
Legend
Username: Cocanada

Post Number: 48148
Registered: 01-2008
Posted From: 173.186.242.11

Rating: N/A
Votes: 0 (Vote!)

Posted on Friday, November 07, 2014 - 11:48 am:   Insert Quote Edit PostDelete PostView Post/Check IPPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

gimme 5 mins
Top of pagePrevious messageNext messageBottom of page Link to this message

Just4fun
Legend
Username: Just4fun

Post Number: 30891
Registered: 10-2007
Posted From: 75.181.155.41

Rating: N/A
Votes: 0 (Vote!)

Posted on Friday, November 07, 2014 - 11:44 am:   Insert Quote Edit PostDelete PostView Post/Check IPPrint Post   Move Post (Moderator/Admin Only)Ban Poster IP (Moderator/Admin only)

Input XML:
<input>
<depositcode>EZ</depositcode>
<books>
<seq>1</seq>
<book>
<bookcode>B1</bookcode>
<bookcode>B2</bookcode>
</book>
</books>

<books>
<seq>2</seq>
<book>
<bookcode>B3</bookcode>
<bookcode>B4</bookcode>
</book>
</books>

<books>
<seq>3</seq>
<book>
<bookcode>B5</bookcode>
</book>
</books>
</input>

OutputXML:
<output>
<bookinstances>
<instcode>B1</instcode>
<instcode>B2</instcode>
<instcode>EZ</instcode>
</bookinstances>

<bookinstances>
<instcode>B3</instcode>
<instcode>B4</instcode>
</bookinstances>

<bookinstances>
<instcode>B5</instcode>
</bookinstances>
</output>

XSLT use chesi input xml ni output xml ga convert cheyali..catch is EZ code target (output) side input side seq 1 unte matrame add avvali. ninnat nunchi try chestunna kadam ledu.

Add Your Message Here
Post:
Bold text Italics Underline Create a hyperlink Insert a clipart image HASH(0x97ac3bc){Movie Clipart}
Show / hide regular icons selection options

Click on following links to open cliparts by Alphabetical Order

 A   B   C   D   E   F   G   H   I   J   K   L   M  

 N   O   P   Q   R   S   T   U   V   W   X   Y   Z  

Show / Hide Filmy icons selection options

Click on following links to open cliparts by Alphabetical Order

 A   B   C   D   E   F   G   H   I   J   K   L   M  

 N   O   P   Q   R   S   T   U   V   W   X   Y   Z  

Username: Posting Information:
This is a public posting area. Enter your username and password if you have an account. Otherwise, enter your full name as your username and leave the password blank. Your e-mail address is optional.
Password:
E-mail:
Options: Enable HTML code in message
Automatically activate URLs in message
Action: