INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: XAlbum - Latest Progress  (Read 8540 times)

sraymond

  • Guest
XAlbum - Latest Progress
« on: October 23, 2003, 05:09:08 pm »

I've worked on making the javascript compliant with both IE6 and Moziilla (especially Firebird) - although there is still some problem with Firebird's internal XSLT processor.  Here's the latest screenshot of the XAlbum result:

Image Removed

If you're using IE6, you can load XAlbum.htm and get one-click transformation of your MPL.  Mozilla won't work - though I've been trying to fix that.  The files can be downloaded at http://pages.sbcglobal.net/scottraymond/XAlbum05.zip.

I have a question for folks:  How undesirable is it to use an application server component - say with Tomcat's servlet container (http://jakarta.apache.org/tomcat/) - to take an "application server" approach with presenting the MPL as HTML?  The obvious downside is the need to install Tomcat - though I, personally, found it quite easy to do.  Once Tomcat is successfully installed, you'd just need to unzip a single file and the servlet that takes care of all the back-end is up and running.

The upside to using a servlet to do the transformation is an ability to do server-side processing.  If you want to share your library presentation via the internet, this is pretty much a necessity.  You'd need to do things like paging (you can't very well send the *whole* html (which could be MBs for most of you) all at once.  It also makes it easier to pass parameters (for things like searching), etc.

Thoughts?  Ideas?

Scott-
Logged

nila

  • Guest
Re:XAlbum - Latest Progress
« Reply #1 on: October 24, 2003, 04:55:37 am »

For me it'd be a pain in the ass - I already have apache installed for doing web dev.
Installing a new web server would just cause problems.

What're you getting the JS problems with?
Expanding and hiding all those enteries??

Have you tried doing it with CSS and just doing:  Display: none, Display: block with JS to toggle between the two?
Logged

lOth

  • Citizen of the Universe
  • *****
  • Posts: 785
Re:XAlbum - Latest Progress
« Reply #2 on: October 24, 2003, 10:55:47 am »

Scoot,

I've tried to use it but I guess I'm doing something wrong: I have placed exporter my library to .xml, placed the .xml filed in the same folder as xalbum.html but I don't seem to be able to select it for transformation. Could you please tell me how I can do that, and how I can later open an .html that looks like your screenshots.
Logged

sraymond

  • Guest
Re:XAlbum - Latest Progress
« Reply #3 on: October 24, 2003, 02:02:57 pm »

Quote
For me it'd be a pain in the ass - I already have apache installed for doing web dev.
Installing a new web server would just cause problems.

Tomcat isn't a web server per se - it's a servlet container.  It can be made to work with HTTP servers (Apache  HTTP Server, IIS, etc.), but that's another topic - and I'm afraid I'd mix up the precise terminology.  Bottom line:  Tomcat shouldn't (I'd say wouldn't, but I guess you never know!) cause any problems with your web server.

Quote
What're you getting the JS problems with?
Expanding and hiding all those enteries??

I've got the JS working for the html's expand/collapse - it's the JS that applies the XSLT transformation that doesn't work well with Firebird.  I'll keep at it - 'cause I'm sure it's been done a thousand times before...  but it's a pain having to deal with varying XSLT processors.  In any event, everything works just fine with IE6.

Quote
Have you tried doing it with CSS and just doing:  Display: none, Display: block with JS to toggle between the two?

Yup...  that's what I'm doing:
myItem.style.visibility = 'visible';
myItem.style.display = 'block';

-or-

myItem.style.visibility = 'hidden';
myItem.style.display = 'none';


I've almost got a demo working that let's you do a search - I'll play a bit with paging and then show you all what it can do.

Scott-
Logged

sraymond

  • Guest
Re:XAlbum - Latest Progress
« Reply #4 on: October 24, 2003, 02:12:19 pm »

Scoot,

I've tried to use it but I guess I'm doing something wrong: I have placed exporter my library to .xml, placed the .xml filed in the same folder as xalbum.html but I don't seem to be able to select it for transformation. Could you please tell me how I can do that, and how I can later open an .html that looks like your screenshots.

It will only work for IE6.

You just need to fill the input boxes with the name of the XML (say audio.mpl or Export.xml or whatever you called it) and the name of the XSL (which, I should have changed to be AlbumGroup.xsl - 'cause that's the only one I included!).  Or, you can change the XAlbum.htm <input> types to "file" (vice "text"), and then you can browse for them.  The only reason I didn't do that was because you can't have a default when the type is "file".  Of course, that's better than putting in the *wrong* default, huh?  Sorry about the confusion.

Let me know if I need to explain better.

Scott-

P.S.  How big is your library?  5,000 tracks works pretty well - but 50,000 might not!
Logged

lOth

  • Citizen of the Universe
  • *****
  • Posts: 785
Re:XAlbum - Latest Progress
« Reply #5 on: October 24, 2003, 04:20:25 pm »

I do have IE6 but it still doesn't work. I have place my export.xml in the same folder as xalbum.htm but it doesn't seem to change anything to albumgroup.xsl when I click on 'transform'.

I've also tried changing the <input> type to "file", which worked, for I was able after words to browse for both the .xml and the .xsl files, but it still didn't do any change to the .xsl when I clicked transform.

Do I need to have any thing else installed on my computer beside IE6 for it to work? Sorry if my questions are really basic but although I don't know anything about xml or xls (my experience is limited to toying around with the hairstyle main.xml ...) I'm still interested in getting the cool looking html you've got here.
Logged

sraymond

  • Guest
Re:XAlbum - Latest Progress
« Reply #6 on: October 24, 2003, 05:58:24 pm »

10th,

The XAlbum.htm document lets you choose the XML and XSL documents.  Upon clicking "Transform", the javascript applies the XSL transform (specified in the XSL document) to the XML document and opens the result (which is HTML) in a new window.  For the XSL to work, the XML has to be in the form expected - in this case, the MPL format.

Are you seeing a new window open?  Are you seeing any Javascript errors?  You can download the latest MSXML parser from http://msdn.microsoft.com/library/default.asp?url=/downloads/list/xmlgeneral.asp.  I'm not sure if IE6 includes MSXML 3.0 or 4.0 - that may be the problem (I use a 4.0 ActiveX object in the JS).

Another easy way to test this is to add a line to the XML document
Quote
<?xml-stylesheet type="text/xsl" href="C:\Program Files\J River\Media Center\XMLDevelopment\AlbumGroup.xsl"?>
right after the first line:
Quote
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
so that it looks like:
Quote
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<?xml-stylesheet type="text/xsl" href="C:\Program Files\J River\Media Center\XMLDevelopment\AlbumGroup.xsl"?>
Make sure the path (either absolute or relative) to the XSL document is appropriate for your case.  Then just open the XML document in IE6 and the transform will be applied automatically (regardless of which version of MSXML you have installed).

How large is your XML document?  Very large documents take a very long time to transform.  Until (or unless) JRiver lets you choose the fields to export or someone makes a plugin that does an export of chosen fields, there's a simple way of "pruning" your XML to get rid of all fields you don't need. - but it requires an extra step.

Please let me know if this works - I'm curious to learn what the problem was.  If I were a betting man, I'd say that you just need to download MSXML 4.0 SP2.

Scott-
Logged

lOth

  • Citizen of the Universe
  • *****
  • Posts: 785
Re:XAlbum - Latest Progress
« Reply #7 on: October 24, 2003, 08:24:28 pm »

Quote
If I were a betting man, I'd say that you just need to download MSXML 4.0 SP2.

You should be a betting man then, installing MSXML did the trick. Thanks!  :D

The only problem I have now is that cover arts don't show up on the page. I have all my covers stored in mp3 tags, is this what causes the problem?
Logged

sraymond

  • Guest
Re:XAlbum - Latest Progress
« Reply #8 on: October 24, 2003, 10:44:36 pm »

Quote
The only problem I have now is that cover arts don't show up on the page. I have all my covers stored in mp3 tags, is this what causes the problem?

Yes.  I remember someone else asking about this - and there was some plugin that let you pull out the coverart with one-fell-swoop.  Maybe it was Rhino's Album View...

You're the second or third person to bring this up - maybe I need to figure out a way to pull out the coverart from the media file.  If anyone knows of a programmatic way to do this, I'm up for suggestions.

Scott-
Logged

scott_r

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 306
Re:XAlbum - Latest Progress
« Reply #9 on: October 30, 2003, 09:15:03 am »

Quote
You're the second or third person to bring this up - maybe I need to figure out a way to pull out the coverart from the media file.  If anyone knows of a programmatic way to do this, I'm up for suggestions.

I'm looking at a way to pull the coverart from the file and place it in an external file with a reference to it in my XML Export plugin... problem is exporting huge libraries is slow enough, and adding in functionality to extract coverart is going to make it a whole lot slower... but hey, it's all in the name of fun, right?

Scott.
Logged

sraymond

  • Guest
Re:XAlbum - Latest Progress
« Reply #10 on: October 30, 2003, 10:00:54 am »

Scott.,

I've been playing with using parameters within the XSLT to handle both searches and paging.  It turns out that the transformation happens pretty quickly - but the html takes a lot of time.

It might make more sense to pull out the cover art on an "as needed basis".  How about a JavaScript to do it only when the page is rendered - and then it'd only be for one album?    This would be a lot quicker than having to do it for each song!  In this case, the <Field[@Name='Image Filename'> would only need to enable recognition that the coverart is stored in the media file.

Or are you thinking of creating a coverart directory for *all* the coverart?  The one thing I haven't paid any attention to is how you'd make the coverart available for through IIS or Apache - I don't know if they let browsers see *any* file:// reference.  Maybe a new "coverart" directory would help that a lot.

Then I also wonder about things like making a link to the media file available - it's not streaming, but it'd let me access my library from school.

Scott-
Logged

scott_r

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 306
Re:XAlbum - Latest Progress
« Reply #11 on: October 30, 2003, 06:20:49 pm »

My idea was that when you create the XML file, it will create a "coverart" directory where you made the XML. Then, while it's creating the XML, it will either a) copy existing coverart to the coverart directory or b) extract the coverart from the file and save it to the coverart directory. This way the Image Filename can be set to a relative location, eg "coverart/Cover.jpg"

Scott.
Logged

MachineHead

  • Guest
Re:XAlbum - Latest Progress
« Reply #12 on: October 30, 2003, 09:08:20 pm »

Problem when albums are greatest hits. Note that there are also songs from S.R.V. and Sly and the Family Stone included in Lenny's greatest hits.


Logged

sraymond

  • Guest
Re:XAlbum - Latest Progress
« Reply #13 on: October 30, 2003, 11:21:34 pm »

Problem when albums are greatest hits. Note that there are also songs from S.R.V. and Sly and the Family Stone included in Lenny's greatest hits.




Yup...  I noticed that this morning.  I "forgot" about the problem of duplicate album names (with different artists).

I'll have an update in a few minutes.

Scott-
Logged

sraymond

  • Guest
Re:XAlbum - Latest Progress
« Reply #14 on: October 30, 2003, 11:33:09 pm »

Here's a screenshot of the search function using a Tomcat servlet:


The big advantage of using the Tomcat servlet is that URL parameters are added to the XML document - that let's you do things like restrict Artists on a search parameter, do paging, etc. without a lot of JavaScript to add parameters the "hard way".  This is especially important if you want to serve the HTML on the internet - you can't exactly expect someone to download a 100MB file all at once.  The only problem I've encounterd with Tomcat is that it runs out of memory when doing the Transform if the XML is quite large.  I've been trying to figure out how to give more memory to Tomcat without any luck so far.

I've provided the XSLT for use with the Tomcat servlet - if anyone's interested in installing it, let me know after you get Tomcat running and I'll give some basic instructions and a file to unzip.

As Machinehead pointed out, I previously had a problem with grouping.  It returned strange errors if the Artist or Album was blank and it got confused with duplicate Album names (across different Artists).  I think I've got it fixed - let me know if it's not the case.

Oh...  latest files can be downloaded here:  http://pages.sbcglobal.net/scottraymond/XAlbum060.zip

Scott-
Logged

MachineHead

  • Guest
Re:XAlbum - Latest Progress
« Reply #15 on: October 31, 2003, 07:07:30 am »

Can't seem to get this one (060) to work. It keeps telling me to Refresh. Playlist xml is in same folder as XAlbum. Using the XML Exporter from the other Scott.
Logged

sraymond

  • Guest
Re:XAlbum - Latest Progress
« Reply #16 on: October 31, 2003, 10:44:51 am »

Can't seem to get this one (060) to work. It keeps telling me to Refresh. Playlist xml is in same folder as XAlbum. Using the XML Exporter from the other Scott.

I'm not sure what "Refresh" indicates...

Assuming you're using IE6, how big is the XML document?  I had to use two-part keys (to tell duplicate album names apart) and maybe the increased size of the index is causing you some trouble.  You'd only want to export the fields needed for the XSLT:  
Code: [Select]
Field[@Name='Album'] |
Field[@Name='Date'] |
Field[@Name='Genre'] |
Field[@Name='Track #'] |
Field[@Name='Name'] |
Field[@Name='Duration'] |
Field[@Name='File Type'] |
Field[@Name='Bitrate'] |
Field[@Name='File Size'] |
Field[@Name='Image File'] |
Field[@Name='Rating']

Can you try it with a smaller export?  
Logged

MachineHead

  • Guest
Re:XAlbum - Latest Progress
« Reply #17 on: November 01, 2003, 07:40:23 am »

Scott,

Tried one album with minimal fields. And still get errors. Again using XML Export to save the generated file.

Maybe it's something obvious that I'm missing?
Logged

sraymond

  • Guest
Re:XAlbum - Latest Progress
« Reply #18 on: November 01, 2003, 12:20:12 pm »

Scott,

Tried one album with minimal fields. And still get errors. Again using XML Export to save the generated file.

Maybe it's something obvious that I'm missing?

I'd check the following:

Step 1 - Check that the xsl reference
Code: [Select]
<?xml-stylesheet type='text/xsl' href='AlbumGroupIE6.xsl'?>in the exported XML points to the right XSLT and verify that IE6 renders the transformation properly on its own (i.e. just open the XML in IE6).  Notice that MCXMLExport uses a relative reference, so you'll need to make sure the XSLT is in the same directory as the XML - or change the href to the absolute path.

Step 2 - Try XAlbum using the known working transformation from Step 1.  You also need to make sure that you have the "Scripts.xml" and "Styles.xml" document in the same directory as XAlbum.htm.  I've noticed that Firebird doesn't like the XSLT that brings in these two documents, but IE6 works fine (for me at least!).

If Step 1 fails, there might be a problem with MSXML - in which case, you can try doing the transformation with MSXSL.EXE on the command-line ("msxsl <input XML filename> <XSL transformation filename> -o<output html filename>" ...  e.g. "msxsl export.xml AlbumGroupIE6.xsl -o export.htm") and open the output in IE6.

And if all else fails, zip up your directory that contains XAlbum (and all its associated files) and the export from MCXMLExport, e-mail it to me at scottraymond@sbcglobal.net, and see what the problem is.

Question:  If you don't mind my asking, what do you want to do with XAlbum?  Print out your library, make it viewable via the internet, ?

Scott-
Logged

MachineHead

  • Guest
Re:XAlbum - Latest Progress
« Reply #19 on: November 01, 2003, 02:08:28 pm »

Quote
Print out your library, make it viewable via the internet,

Most likely use would be to get it to the internet, transformed as html though. I know this can be done, just haven't dug that deeply yet.

Get back to you on the other problem.

Logged

MachineHead

  • Guest
Re:XAlbum - Latest Progress
« Reply #20 on: November 01, 2003, 02:18:01 pm »

Scott,

That's what it was. Had to open offending docs in notepad change href, and now they display as they should.
Logged

sraymond

  • Guest
Re:XAlbum - Latest Progress
« Reply #21 on: November 01, 2003, 03:09:50 pm »

Quote
Most likely use would be to get it to the internet, transformed as html though. I know this can be done, just haven't dug that deeply yet.

This is why I wrote XAlbum...  because the result is an HTML document that you can save easy enough.  I was playing with the JavaScript to save automatically - but I couldn't get it to work without popping up a window.  I look forward to MCXMLExport doing the transformation itself and allowing you to save the resulting HTML.

How big is your library?  My concern with HTML is that it's unreasonable to expect someone to download more than a MB to see the library - so I was playing with the concept of restricting (search on Artist name) and paging.  This is real easy to do with a servlet that embeds URL parameters (for search string and page number) into the XML before applying a transformation.  This allows the client (on the internet) to get a much smaller HTML.

If you're interested in presenting your library to the internet, it's more than a MB, and you don't mind installing Tomcat, let me know and I'll help you out with setting it up.

Quote
That's what it was. Had to open offending docs in notepad change href, and now they display as they should.

It might be easier to just put the XSL in the same directory as the XML.  Or maybe Scott. would allow you to browse to the XSL and then insert the absolute path.

Scott-
Logged

MachineHead

  • Guest
Re:XAlbum - Latest Progress
« Reply #22 on: November 01, 2003, 03:17:40 pm »

Quote
It might be easier to just put the XSL in the same directory as the XML.  Or maybe Scott. would allow you to browse to the XSL and then insert the absolute path.

I just changed that from MC to include 'IE6'.

Quote
If you're interested in presenting your library to the internet, it's more than a MB, and you don't mind installing Tomcat, let me know and I'll help you out with setting it up.

Certainly. PM me if you would rather go into more details for test purposes. I'd like to see how this pans out.
Logged

sraymond

  • Guest
Re:XAlbum - Latest Progress
« Reply #23 on: November 03, 2003, 12:35:56 am »

If you want to use a Tomcat servlet, here's what needs to be done:

Step 1.  Download Tomcat.  The homepage is http://jakarta.apache.org/tomcat/ and the latest non-beta release can be downloaded at http://mirrors.midco.net/pub/apache.org/jakarta/tomcat-4/v4.1.29/bin/jakarta-tomcat-4.1.29.zip.

Step 2.  Install Tomcat.  You'll need to start Tomcat and make sure it's working by opening the URL http://localhost:8080.  If you've done everything right, you'll see the default Tomcat page.

Step 3.  Place the file "xsl.war" (http://pages.sbcglobal.net/scottraymond/xsl.war) in Tomcat's "webapps" folder.  Stop and restart Tomcat.  Point your browser to http://localhost:8080/xsl/xslapp - if all goes well, you should see a demo Online Address Book application that came with the XSL servlet.

Step 4.  Unzip the file "xsl.zip" (http://pages.sbcglobal.net/scottraymond/xsl.zip) into Tomcat's "webapps" folder.  It should unzip itself into a subdirectory called "xsl" - which is created the first time you run Tomcat after Step 3.  You should be able to overwrite all the files without any problem.

Step 5.  Point your browser to http://localhost:8080/xsl/xalbum - if all goes well, you should see the XAlbum HTML page rendered by AlbumGroup.xsl.

The only difficulty you might run into is with installing Tomcat.  It depends on the Java  Runtime, and if memory serves me correctly, when I last installed Tomcat it didn't like the version of the JDK I had.  I think I'm using 1.4.2 now and it works fine.

I'll explain tomorrow or the next day what exactly the servlet does and how it basically works.

Let me know if you run into trouble.

Scott-
Logged

MachineHead

  • Guest
Re:XAlbum - Latest Progress
« Reply #24 on: November 03, 2003, 03:41:07 am »

Quote
The only difficulty you might run into is with installing Tomcat.  It depends on the Java  Runtime, and if memory serves me correctly, when I last installed Tomcat it didn't like the version of the JDK I had.  I think I'm using 1.4.2 now and it works fine.

According to the Read Me file it is needed. At 88+ MB's it's a good thing I have broadband!  ;)

May not have enough time this morning to do it all. Finish up this evening.

OT - Have you tried their Download manager?
Logged

MachineHead

  • Guest
Re:XAlbum - Latest Progress
« Reply #25 on: November 03, 2003, 06:41:04 pm »

Scott,

I have Tomcat unzipped to a directory. Installed J2SE 1.4.2 with NetBeans 3.5.1.

Trying to launch Tomcat I get a DOS window momentarily then it closes.

Thoughts?

Something I missed perhaps? I cannot open local host as directed. So...I do not know if it is working or not.

Mike
Logged

sraymond

  • Guest
Re:XAlbum - Latest Progress
« Reply #26 on: November 03, 2003, 07:25:52 pm »

Quote
According to the Read Me file it is needed. At 88+ MB's it's a good thing I have broadband!

I think we're talking about two different things.  I get a bit confused with the different Java "technologies" - like the difference between SDK, JDK, J2SE.  I didn't think there was anything wrong with using a more complete technology (and at 88 MB, it'd have to be pretty darn complete!).  When I get home tonight, I'll look to see what I installed.

Scott-
Logged

sraymond

  • Guest
Re:XAlbum - Latest Progress
« Reply #27 on: November 03, 2003, 07:27:37 pm »

Trying to launch Tomcat I get a DOS window momentarily then it closes.

Thoughts?

Something I missed perhaps? I cannot open local host as directed. So...I do not know if it is working or not.

Mike

Well, I'd first manually run the start batch file from a DOS window (vice the Programs Menu's shortcut) - that way you can see what the error is.  Let me know and we can go from there.

Scott-
Logged

scott_r

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 306
Re:XAlbum - Latest Progress
« Reply #28 on: November 03, 2003, 09:54:08 pm »

Quote
The only difficulty you might run into is with installing Tomcat.  It depends on the Java  Runtime, and if memory serves me correctly, when I last installed Tomcat it didn't like the version of the JDK I had.  I think I'm using 1.4.2 now and it works fine.

The JDK is the Java Development Kit, which you only need if you're developing Java applications. This is large.
What you need to run Java programs is the Java Runtime Environment (JRE). This is much smaller.

Scott.
Logged

sraymond

  • Guest
Re:XAlbum - Latest Progress
« Reply #29 on: January 03, 2004, 01:22:30 am »

XAlbum has now been rolled into Scott_r.'s "MC XML Export" plugin.  Details of how to get the latest version are available here:  http://pages.sbcglobal.net/scottraymond/Presets.htm

Scott-
Logged
Pages: [1]   Go Up