Jump to content

xander85

Members
  • Content Count

    52
  • Joined

  • Last visited

Everything posted by xander85

  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">
  16. xander85

    XInclude

    i also noticed that the code above is not showing ie the stats etc, you can see them here -> http://acousticmushroom.com/library/library-date.xml
  17. xander85

    XInclude

    mad!! everything is loading perfectly, there was a </xsl:choose> missing in the xsl file, wich was the parsing error i was getting, fixed that and now its all loading fine.now to FINISH HIM! how do i add links to the table headers to sort by that colum (artist/album/source/kind/date) and to do it in both ascending and descending, once thats done its perfect. all i have to do is change the library.xml file when i update it. copy and paste is all i have to do for that one!!!i cant thank you enough, you have been an absolute champ!!! *applause* :)here is the libray.xsl file code (im guessin
  18. xander85

    XInclude

    i just tried it and it got an error, im guessing there is something wrong wid the stylesheet.php?
  19. xander85

    XInclude

    ah awsome, it loaded the xml, but only the raw xmldo i need this at the top of the library.xml file?? <?xml-stylesheet type="text/xsl" href="library.xsl"?>
  20. xander85

    XInclude

    ive made all the files, changed a few things to make it work some of the modified data in the xml, but im still not sure what i have to do to make it sort?atm i cant even get it to display it in the browser.... all the files are here http://www.acousticmushroom.com/testdo i need a different library.php file for each way i sort it? is it as simple as making clickable links in the headers of the table? if so how? i know im being a pain... sorry
  21. xander85

    XInclude

    THIS IS EXACTLY WHAT I WANT TO DO hahahits the same data, just sorted by artist/album/source/kind/date prefferably with links to sort in the table headers! :)ok just to claify, lets start from the beginningi will need (from what you have here) 4 fileslibrary.xsl for the style sheetlibrary.xml for the XML datastylesheet.php for loading the different style sheetslibrary.php - wich im guessing is the url you open to view the page?i will create the files based on your example, as i know little about all 3 of those file types, it would be very helpful if you could explain how it works.cheers
  22. xander85

    XInclude

    i really do appreciate your help, as i am new to this im finding it a little hard to follow, it does seem pretty simple.here are the orginal files i want to include into the one. i want to do this to make editing and updating easy.http://www.acousticmushroom.com/library/test/music.xmlhttp://www.acousticmushroom.com/library/test/stats.xmlas you can probably recall i had 3 files for my site, all with the same XML but different style sheets to sort it differently (if there is an easy way please tell me)all i want to do is load them into one xml doc, library.xmland i can copy that load code into o
  23. xander85

    XInclude

    ok still not working.. :)here is exactly what i have now, including the suggestion you made.. i renamed a few of the files to for testing purposes.hehe your probably sick of me by nowfile - library.php - http://www.acousticmushroom.com/library/test/library.php <?php//View the result as an XML fileheader('Content-type: application/xml');//Initiate the DOMDocument class$dom = new DOMDocument;//Load library.xml$dom->load('library.xml');//Perform XIncludes$dom->xinclude();//View the result$dom->saveXML();?> file - library.xml - http://www.acousticmushroom.com/library/test/library.
  24. xander85

    XInclude

    this was in a previous topic i started, thought i would start it fresh, im not having luck in the Query2XML part atm, so for a temp solution i thought id use this...I recently upgraded the server to PHP5 so im hoping this will now work.From what the previous topic had, im guessing i need the following filesinclude.php <?php//View the result as an XML fileheader('Content-type: application/xml');//Initiate the DOMDocument class$dom = new DOMDocument;//Load library-album.xml$dom->load('library-date.xml');//Perform XIncludes$dom->xinclude();//View the result$dom->saveXML();?> does
  25. xander85

    sql and xml

    throw new XML_Query2XML_ConfigException( 'The column "' . $columnStr . '" used in the option ' . '"' . $optionName . '" does not exist in the result set.', $parentOptionName
×
×
  • Create New...