XML and HTML export configuration file

For the covers, just search in the *.xls files for cover.jpg and replace it.

Thanks dano! It worked like a charm.

If you have a sugesstion regarding the track sorting, I would appreciate it. I changed the code like I mention in my previous post. All it did was change the displayed track number, it didn't help with sorting the tracks correctly.

The tracks are sorted like this:

and so on...

It would seem that I would need to change another setting in the .xls files, but I am not sure where it would be.

Try to sort the tracks in MP3Tag window before exporting; also you may try this other xsl export iSquonk XSL stylesheet, you may adjust the sort order in the grid by clicking on the column header...

Hi squonk63,

I had already tried to sort the tracks prior to exporting. Sorry I didn't mention that. The same happens with the iSquonk sheet as well. However, as you said, I can sort the tracks by clicking on the header. Cool set up with that sheet, btw.

Wish I could figure out why it doesn't want to sort them properly from the get go.


What pattern do your filenames have?
Maybe replacing $loop(%_filename_ext%) with $loop(%track%) in the MTE file helps.


You're awesome! That did it. Just before I read your post, I tried to renumber my tracks (to 01, instead of just 1, and so forth) just to make sure it didn't have to do with those tags. That didn't work....the sorting was still 01, 10, 11, 12, 02, etc.

I never realized that it was actually using the filename, instead of the track numbers to sort. My tracks start with the track number (without leading 0's).

Thanks again for your help!

As a side note, it appears that there might be a bug in the iSquonk version. I opened my MP3List with both the MP3Tag_squonk.htm and the iSquonk.htm files. The iSquonk file would not give proper links to tracks if they have an apostrophe (') in the track title. However, the MP3Tag_squonk file does not have this problem. Also, in the iSquonk pages, it doesn't give me the headers for the columns, unless I click on them (then it sorts of course). Instead, the column headers look like horizontal scroll bars. This is in Firefox.

Thought I would pass this on.


I'll take a look for the apostrophe problem...

For the second point I've noticed a similar problem with the latest version of Firefox. Are you using Firefox 1.5?

Yes, the ActiveWidgets grid has some problems with firefox 1.5, but there is an updated version on their site; so I've updated the zip file with the new grid and the fix for the apostrophe problem.
I've added a call to escape in the function that put the href to the track file in the grid; let me know if this fix works well for you.

In the MP3Tag_squonk_moz.xsl file, is it possible to have a line that will show the Artist name, only if the track has an Album Artist tag.

What I want to edit is this portion:

<xsl:template match="track">

		<xsl:attribute name="href"><xsl:value-of select="filename" /></xsl:attribute>
		<xsl:value-of select="numtrack" /> - <xsl:value-of select="title" />

	<table width="100%">
			<b>Time:  </b><xsl:value-of select="time" />
			<b>Size:  </b><xsl:value-of select="size" />

		<td width="100"/>


I have it set to group songs by album artist or by artist, which means that I have a "Various Artists" group. I would like to have the list of tracks for each album show "Track number" - "Track Title" - "Artist", but only for the Various Artist CDs. Is this possible?

Thanks for the help!

Edit: Actually, after playing with it a bit, it would appear that I cannot get it to properly merge songs belonging to the same album in the scroll box on the right. It will merge songs properly into one album if there is no %album artist% tag (Various Artists). The following pic shows what I am talking about.

The list appears to group the songs by artist, even though it is displaying the %album artist% tag if it is available. Any idea what I can do to fix this?

What do you know....I figured it out! It just took a little time to understand exactly what is being done to sort with the .mte file.

I originally had this for the %artist% loop:

		<name>$if(%album artist%,%album artist%,%artist%)</name>

This would pull out the %album artist% tag to show "Various Artist", but it was still sorting by the %artist% tag.

I can't believe that all I had to do was do this:

$loop(%album artist%)
		<name>$if(%album artist%,%album artist%,%artist%)</name>

EDIT: Disregard this....it still isn't working properly. Either way will show the %album artist% tag, but it doesn't group or sort properly. If I use $loop(%artist%), the songs that have the %album artist% tag are sorted by the %artist%, but it displays "Various Artist" in the scroll window on the right and each song within a compilation is separated from the others. If I use $loop(%album artist%), the songs with %album artist% tags are sorted properly, but the songs without the %album artist% tag are grouped together. The appear under the same Artist, which is the first in the list to not have an %album artist% tag, then the albums are sorted by year within the group.

It also seems that scripting functions have no affect within the $loop() function. I have tried using "$if(%album artist%,%album artist%,%artist%)", "if2(%album artist%,%artist%), "$if($and(%artist,%album artist%),%album artist%,%artist%)", and other strings, none of which will do anything to sort properly.

Any thoughts on what I should try next?

I think the album artist tag you are using for the compilation is not in my xml data, maybe because I've never used it in my tags.

If I've well understood you have %album_artist% which is 'Various artists' and an %artist% tag for the track artist...

Is %album_artist% tag always present, or you use it only for compilations?

Could you post a sample of your xml file?

Let me know, and I'll try to update all this stuff...


You can't script inside $loop() function.
There's 2 workarounds (since v2.35a) for the album artist issue ATM:
Copy all ARTIST tags to BAND and for compilations do BAND=VA and use $loop(%band%)
or if you have a foler structure like
$loop(%_parent_directory%) can be used

I had been putting together my reply to squonk63's post, and while previewing the post, I saw dano's reply. Thanks dano! Your %_parent_directory% idea worked.....that is after I changed from 2.35 to 2.35a. I had tried using the other directory fieldnames but couldn't get anything to work with 2.35.

I suppose I could have used the %band% tag just for this purpose, but I figure why create a tag in the file for just this purpose.

It is too bad that you can't script in the $loop(), that would have been nice.

I apologize for being a pain, but I have found two problems that seem to relate to punctuation marks--specifically & and #.

This problem occurs regardless of using $loop(%artist%), or $loop(%_parent_directory%) as discussed in the above posts. Here is a picture of the problem I am seeing:

On the left half, the red circles show where a problem occurs with the "&" symbol. I had to manually delete the "&" from the entry in the XML file so that it would create the view in Firefox. If the "&" is present it gives the following error :

"XML Parsing Error: not well-formed Location: file:///E:/Music/MP3TAG%20List/MP3List.xml Line Number 19, Column 14: Sly & The Family Stone ---------------------------^"

I can also prevent the error by pulling out the Parent Directory or Artist by using $replace(%fieldname%,&,And). This would then give me "Sly And The Family Stone" instead of "Sly & The Family Stone". However, if you look at the blue circle, the "&" is there. This %artist% tag comes from the "$loop(%track%)" (I changed it from the original for sorting purposes mentioned earlier in thread). It would seem that there is an inconsistency in allowing the "&" symbol. Here is the XML file that was used to generate the attached picture.
MP3List.xml (26.5 KB)

The right half of the picture shows a problem that occurs with the hyperlinks. It is having problems with the "#" symbol. The album does have the appropriately named JPG in the folder, and when you hover over the area where the pic should be, it does show the proper link to the folder and file. The problem is that the link in Firefox in the Page Info is the following:


If I type in the path myself into the address bar, it will show the picture, but the link is displayed as :


The bold text is the only difference between the two links. The same applies to the M3U link when you click on that section. My problem is that I don't know where to make a change in the CSS or SCRIPT files to correct this.

Any thoughts? And sorry for the long post....hope I am clear about what is happening.

MP3List.xml (26.5 KB)

For the first problem: you have removed the CData section from the artist name; be sure to have this in your mte file:


instead of


For the second problem try to remove the quote character from the path instead of the # char.

Let me know...

First problem solved. Didn't even realize I removed some of that info from the MTE file. Thanks!

For the second problem, it didn't work when I removed the single quote mark ('). I copied the entire folder, but removed the ' from the folder name. The JPG doesn't show in the export in Firefox, and the link doesn't point to the M3U file in the folder. It will only do it when I change the "#" in the address to "%23" as mentioned in my previous post. This seems to be the only punctuation mark that has a problem.

This is to add to the above comment about the second issue, which is with the "#" when linking to files.

I have created exports for the same album using this export config, as well as tested it with the "html_nickless_color_schemes_albumcover" and the "html_dano_albumcover" export configs. I see the exact same issue with the config from nickless, but not with the one from dano.

Edit: I figured out a way to get it to work when there is a '#' in the filepath.

Instead of using




in the album and track (originally filename) loops I used these:


I can't reproduce this with folder.jpg-s, but links to files are fixed now :smiley:


Many thanks for the fix, I'll update the zip file asap...

Do you have the same problem with Internet Explorer too?

No problem...glad I could help.

As far as IE goes (which I don't really use), it won't open the file. It gives this error:

However, I can get it to work if I make a change to the first line in my MP3List.xml file.

The first line in my XML file says:

<?xml version="1.0" encoding="ISO-8859-1"?>

To get the file to open properly in IE, I need to change it to:

<?xml version="1.0" encoding="UTF-8"?>

I haven't tested this on my whole MP3 directory, just the albums that had the problems with the "#" and "&" characters. Seems to work fine when I make that small change.