Jump to content

xander85

Members
  • Content Count

    52
  • Joined

  • Last visited

Community Reputation

0 Neutral

About xander85

  • Rank
    Newbie
  1. xander85

    XInclude

    yeah tried that, it sorted ascending for artist, then when i clicked it again it changed back to its default....but mate... i think you have done more than enough!! i have achieved what i wanted, having one xml doc load dynamically into several different style sheets using php!and using dreamweaver if i need to replace anything in the xslt files i just use find replace in current local folder works an absolute treat! hehethanks again mate!leave a comment on my blog page if u wish
  2. xander85

    XInclude

    ok i would like to thank you soo much for your help...i have taken a different approach, wich works fine for me reallythen main thing i wanted was to have one xml file, and i dojust have different php's and xsl's coz that content doesnt change, its just the xml...if you want to get the way you made up working please feel free, and let me know when you do..here is a little shout out to yourself on my site http://www.acousticmushroom.com/blog/if you ever do get the other way working in firefox, please let me know!!! you can post a comment on my site if u wish!cheers mate, have a good one!
  3. xander85

    XInclude

    sorts in ie but not in firefox.... i hate cross platform web design, its a biatch!!!so maybe i wasnt so drunk afterall, and that was after i was sleeping, haha i woke up at 8am still drunk! lol
  4. xander85

    XInclude

    OMG that worked a treat!!!!!!!!!!! haha sorry i think im still drunk, my footy team won last nite and were in the finals, the match b4 the grand final!!!haha i dunno why i told you that but anyways! ?(like i said im still drunk)ok, the only thing now is its only sorting descending. when i click the link it doesnt switch, even tho the url says ascending its sorting descendinghmmm....im guessing its this? <xsl:attribute name="href">?sortBy=<xsl:value-of select="$header"/>&sortOrder=<xsl:choose> <xsl:when test="$sortOrder = 'descending'">ascending</xsl:when&g
  5. xander85

    XInclude

    tried the edit you gave, still not sorting, i might use a different approach, the links in the headers.... if i was to say link it to another page (source.php) what would i use?? im guessing it would go here? <tr> <xsl:call-template name="th"> <xsl:with-param name="header">artist</xsl:with-param> </xsl:call-template> <xsl:call-template name="th"> <xsl:with-param name="header">album</xsl:with-param> </xsl:call-template> <xsl:call-template name="th"> <xsl:with-param name="header">source</xsl:with-param> <
  6. xander85

    XInclude

    hahah yeah i see what IVE done :)i got the code you gave me, but for some reason i was playin wid it, editing it to see if i could get it working, this was before the last few edits you gave me.... i guess i just forgot to change it back :)ill try that out later at work now hehe
  7. xander85

    XInclude

    ok the break; thing added the suffix backstill not sorting grrr....look if we cant get it working or rather you cant get it working i could just use what you have given me to take a different approach
  8. xander85

    XInclude

    changing <xsl:param name="sortBy" select="'added'"/><xsl:param name="sortOrder" select="'descending'"/> to <xsl:param name="sortBy"/><xsl:param name="sortOrder"/> removed the suffix at the end of the url fromlibrary.php?sortBy=added&sortOrder=descendingtolibrary.php?sortBy=added&sortOrder=and changing the stylesheet.php also did nothing....
  9. xander85

    XInclude

    yeah as far as i can see its all correct spelling &amp and case wise.here are the 3files anywaysstylesheet.php <?php//This file will always return an XSLT stylesheet, so we specify that with this MIME typeheader('Content-type: application/xslt+xml');/*If any of the two parameters gets a value that is not whitelisted (in the first argument of the ereg()), the default value will be used */$sortBy = (!ereg('added',$_GET['sortBy']) ? 'added' : $_GET['sortBy']);$sortOrder = (!ereg('descending|ascending',$_GET['sortOrder']) ? 'descending' : $_GET['sortOrder']);//Load the XSLT stylesheet$dom
  10. xander85

    XInclude

    ok its working in IE nowwhat you gave me was good, however it refused to load the data table, checked ALL files for spelling etc and now it works.but with this it still refuses to sort <tr> <xsl:call-template name="th"> <xsl:with-param name="header">artist</xsl:with-param> </xsl:call-template> <xsl:call-template name="th"> <xsl:with-param name="header">album</xsl:with-param> </xsl:call-template> <xsl:call-template name="th"> <xsl:with-param name="header">source</xsl:with-param> </xsl:call-template>
  11. xander85

    XInclude

    added this <xsl:choose><!--artist--> <xsl:when test="$sortBy = 'artist' and $sortOrder = 'descending'"> <xsl:apply-templates select="music"> <xsl:sort select="artist" order="descending" /> </xsl:apply-templates> </xsl:when> <xsl:when test="$sortBy = 'artist' and $sortOrder = 'ascending'"> <xsl:apply-templates select="music"> <xsl:sort select="artist" order="ascending" /> </xsl:apply-templates> </xsl:when><!--album--> <xsl:when test="$sortBy = 'album' and $sortOrder = 'descending'"> <xs
  12. xander85

    XInclude

    headers are now showing, but it still only sorts by 'added' there must me somtin thats overwriting the "onclick" sorting
  13. xander85

    XInclude

    almost there, almost......i added in the code as u mentioned, but its not displaying the table headers? i noticed a typo?? maybe im wrong im not surethe sort...... didnt have a $ as a prefix, it wouldnt load, had a xsl transorm error in firefox, i changed it to $sortOrder and $sortByand it loaded in firefox just fine, but missing the table headers <xsl:template name="th"> <xsl:param name="header"/> <th> <a> <xsl:attribute name="href">?sortBy=<xsl:value-of select="$header"/>&sortOrder=<xsl:choose> <xsl:when test="$sortOrder = 'descending
  14. xander85

    XInclude

    im not exaclty sure where this template goes in the document?? <xsl:template name="th"> does it replace this sorting sting? <xsl:choose> <xsl:when test="$sortBy = 'added' and $sortOrder = 'descending'"> <xsl:apply-templates select="music"> <xsl:sort select="added" order="descending" /> </xsl:apply-templates> </xsl:when> <xsl:when test="$sortBy = 'added' and $sortOrder = 'accending'"> <xsl:apply-templates select="music"> <xsl:sort select="added" order="accending" /> </xsl:apply-templates> </xsl:when> &
  15. xander85

    XInclude

    SCRAP THAT haha!fixed it, i should look harder at the code before i make a post haha, sorry bout thatthe<xsl:for-each select="library/stats"> was missing the / before library, replaced with <xsl:for-each select="/library/stats">
×
×
  • Create New...