JavaScript how i can have a dynamically title in a book with XSLT and jQuery?

I have this xml :

<quran>
    <row>
        <WID>10</WID>
        <word>بسم</word>
        <SID>1</SID>
        <Ayeh>0</Ayeh>
        <Joze>1</Joze>
        <Hezb>1</Hezb>
        <ParentID>4556</ParentID>
        <Page>1</Page>
        <Joint>1</Joint>
        <SName>فاتحه</SName>
    </row>
    <row>
        <WID>11</WID>
        <word>الله</word>
        <SID>1</SID>
        <Ayeh>0</Ayeh>
        <Joze>1</Joze>
        <Hezb>1</Hezb>
        <ParentID>3565</ParentID>
        <Page>1</Page>
        <Joint>1</Joint>
        <SName>فاتحه</SName>
    </row>
    <row>
        <WID>12</WID>
        <word>الرحمن</word>
        <SID>1</SID>
        <Ayeh>0</Ayeh>
        <Joze>1</Joze>
        <Hezb>1</Hezb>
        <ParentID>2876</ParentID>
        <Page>1</Page>
        <Joint>1</Joint>
        <SName>فاتحه</SName>
    </row>
    <row>
        <WID>14</WID>
        <word>الْحَمْدُ</word>
        <SID>1</SID>
        <Ayeh>2</Ayeh>
        <Joze>1</Joze>
        <Hezb>1</Hezb>
        <ParentID>2732</ParentID>
        <Page>1</Page>
        <Joint>1</Joint>
        <SName>فاتحه</SName>
    </row>
    <row>
        <WID>15</WID>
        <word>للّهِ</word>
        <SID>1</SID>
        <Ayeh>2</Ayeh>
        <Joze>1</Joze>
        <Hezb>1</Hezb>
        <ParentID>12105</ParentID>
        <Page>1</Page>
        <Joint>1</Joint>
        <SName>فاتحه</SName>
    </row>
    <row>
        <WID>5618</WID>
        <word>بسم</word>
        <SID>2</SID>
        <Ayeh>0</Ayeh>
        <Joze>1</Joze>
        <Hezb>1</Hezb>
        <ParentID>4556</ParentID>
        <Page>2</Page>
        <Joint>2</Joint>
        <SName>بقره</SName>
    </row>
    <row>
        <WID>5619</WID>
        <word>الله</word>
        <SID>2</SID>
        <Ayeh>0</Ayeh>
        <Joze>1</Joze>
        <Hezb>1</Hezb>
        <ParentID>3565</ParentID>
        <Page>2</Page>
        <Joint>2</Joint>
        <SName>بقره</SName>
    </row>
    <row>
        <WID>5620</WID>
        <word>الرحمن</word>
        <SID>2</SID>
        <Ayeh>0</Ayeh>
        <Joze>1</Joze>
        <Hezb>1</Hezb>
        <ParentID>2876</ParentID>
        <Page>2</Page>
        <Joint>2</Joint>
        <SName>بقره</SName>
    </row>
    <row>
        <WID>4784</WID>
        <word>الم</word>
        <SID>2</SID>
        <Ayeh>1</Ayeh>
        <Joze>1</Joze>
        <Hezb>1</Hezb>
        <ParentID>3567</ParentID>
        <Page>2</Page>
        <Joint>2</Joint>
        <SName>بقره</SName>
    </row>
    <row>
        <WID>5105</WID>
        <word>ذَلِكَ</word>
        <SID>2</SID>
        <Ayeh>2</Ayeh>
        <Joze>1</Joze>
        <Hezb>1</Hezb>
        <ParentID>7234</ParentID>
        <Page>2</Page>
        <Joint>2</Joint>
        <SName>بقره</SName>
    </row>
    <quran>

I need insert the <SName> before tags <Ayeh> that is <Ayeh>0</Ayeh> . i write a jquery code but i dont know how i use xslt in jquery ?(below code Dont work)

$('.quranText .ayaNumber').each(function(){
    if($.trim($(this).text())=='﴿0﴾')
       $(this).closest('.aya').prepend('<div class="suraHeaderFrame">'
                    +'<div class="suraHeaderText">'+ 

                                        <xsl:for-each-group select="//row[./Page/text()=$page]" group-by="Page">
                                            <xsl:for-each-group select="current-group()" group-by="SID">
                                                <xsl:for-each-group select="current-group()" group-by="concat(Page,SID)">
                                                <xsl:choose > 
                                                     <xsl:when test = "./Ayeh = 1 or ./Ayeh = 0" >  
                                                    <xsl:value-of select="SName"/>
                                                        </xsl:when>
                                                  </xsl:choose>
                                                </xsl:for-each-group>
                                            </xsl:for-each-group>
                                        </xsl:for-each-group>

 +'</div>'
                +'</div>');
});

I should say that often in a one page is alot of <Ayeh>0</Ayeh>. I am writing a site same this : http://tanzil.net/#109:1 .

Answer:1

I am using JQuery Mobile version 1.4.2 and at some point in one of my templates I would like to use irs filterable select menu. However there is one problem: That particular element has a specific ...

I am using JQuery Mobile version 1.4.2 and at some point in one of my templates I would like to use irs filterable select menu. However there is one problem: That particular element has a specific ...

  1. filterable multiple select with checkboxes

I'm a bit of a beginner to JavaScript and I've been trying to figure this out for at least two hours. If someone could explain to me why this is happening, it'll be great! function slowDouble(x, ...

I'm a bit of a beginner to JavaScript and I've been trying to figure this out for at least two hours. If someone could explain to me why this is happening, it'll be great! function slowDouble(x, ...

  1. javascript settimeout loop variable

I have the following code: //Marks all users which are reading the book with the bookId var markAsReading = function (bookId,cb) { User.find({}, function (err,users) { if(err) ...

I have the following code: //Marks all users which are reading the book with the bookId var markAsReading = function (bookId,cb) { User.find({}, function (err,users) { if(err) ...

  1. nodejs loop wait
  2. nodejs loop wait for callback
  3. nodejs while loop wait
  4. node js for loop wait for promise

In my web app, running in an android WebView, whenever I click on something, or navigate somewhere, that container div is highlighted blue. Sometimes only for a moment, but sometimes until you click ...

In my web app, running in an android WebView, whenever I click on something, or navigate somewhere, that container div is highlighted blue. Sometimes only for a moment, but sometimes until you click ...

  1. android highlight webview
  2. android webview highlight text
  3. android webview highlight search text
  4. android webview highlight selected text
  5. android webview highlight color