# XML and HTML export configuration file

**URL:** https://community.mp3tag.de/t/xml-and-html-export-configuration-file/1712
**Category:** Export
**Created:** [February 18, 2005, 5:24pm UTC](https://community.mp3tag.de/t/xml-and-html-export-configuration-file/1712 "2005-02-18T17:24:28Z")
**Posts on this page:** 1
**Showing post:** 44

<div class="post-metadata">

### Author: ![kockroach](https://community.mp3tag.de/user_avatar/community.mp3tag.de/kockroach/32/101_2.png) [@kockroach](https://community.mp3tag.de/u/kockroach)
#### Post date: [February 8, 2006, 2:23pm UTC](https://community.mp3tag.de/t/xml-and-html-export-configuration-file/1712/44 "2006-02-08T14:23:04Z")

</div>

That would be cool to see scripting within the $loop() function. 😃

I have uploaded a file that contains the changes I made to the MTE, HTM and XSL files. You will notice that there are two sets of HTM/MTE files: one for MP3, and one for FLAC. I did this so that I can pull out and store information for my two directory paths.

I know I could have done it differently, such that there is only one MTE file, but there would still need to be a separate HTM file for each codec. So I just made paired files.

Here is the ZIP: [XSL\_Squonk\_mod.zip](https://community.mp3tag.de/uploads/default/original/2X/3/302e5f02fc0c89f38d0879e8dd2a94913fbcbe76.zip) (8.89 KB)

Some changes that I made:

-I modified the $loop(%artist%) to account for my %album artist% tag.--I use x:/music/mp3/artist(album artist)/album/track.mp3 for my directory structure. This allows me to use "Various Artist" for compilations, otherwise, it would not keep all the tracks from a compilation together. It will sort artists while ignoring "The " in the artist name, however it will still display the "The ". For example, "The Beatles" will be in the B's, not the T's.  
-Under the album loop, I made the change to correct of the problem with the "#" symbol.  
-I also added a line, which is now used in the XSL to store the average bitrate from the entire album. (courtesy of dano 🙂 )  
-I changed the $loop(%\_filename\_ext%) to $loop($num(%track%,2)). I did this because it kept wanting to sort tracks alphabetically...rather than numerically.  
-There is also a new line in the loop (beginning with "$puts"), which is the second half of the code from dano. This is what actually creates the average bitrate for all of the tracks in the album loop.  
-I added a $replace function to shorten the codec. Just thought it would help clean up the actual page in Firefox and IE.  
-I also added the which is the compression ratio and %. The actual bitrate and compression for the individual tracks now appear beneath the time and size in Firefox and IE.  
-To clean up the web page, I also converted the samplerate to KHz. I also added a $replace function to add in the "&" between ID3V1 ID3V2 for MP3 files.  
-For the filename and filenamepath, I added in the fix for the "#" symbol.

I think that is it. Some of these are just personal preference for the layout. Hope everyone likes it.

Edit: As dano noted [above](https://community.mp3tag.de/t/1712/32), the use of %\_parent\_directory% means you have to have 2.35a installed.

Edit 2: ZIP file updated on 2/11.

~Kockroach

[XSL\_Squonk\_mod.zip](https://community.mp3tag.de/uploads/default/original/2X/3/302e5f02fc0c89f38d0879e8dd2a94913fbcbe76.zip) (8.89 KB)

---

_[View the full topic](https://community.mp3tag.de/t/xml-and-html-export-configuration-file/1712)._
