Add attribute xsl:nil=true on empty elements using XSLT
- Category: XML Stylesheet Language Transformations
- Hits: 15639
An article on how to declare an XML element as NULL using the attribute "xsi:nil". I'm going to use a very short example by providing a blank date of birth value:
-- What I have: <DATE_OF_BIRTH /> <DATE_OF_BIRTH_EUROPEANFORMAT>//</DATE_OF_BIRTH_EUROPEANFORMAT> -- What I want: <DATE_OF_BIRTH xsi:nil="true" /> <DATE_OF_BIRTH_EUROPEANFORMAT xsi:nil="true" />
Why?
Outputting from SITS:Vision to our staging environment, the application would only output blank values using single tags so we had to find a place to introduce it. On strings this has little worth, but on dates which could be NULL, this was necessary (unless we interpreted dates as strings which we don't want to do):
FTP on Mac: Failed to retrieve directory listing
- Category: File Transfer Protocol
- Hits: 6232
- FileZilla for Mac
- macOS High Sierra
A quick note to remind me how to enable FTP directory listing as it was working on my Windows PC but not on my Mac. The error I was getting was
Error: Failed to retrieve directory listingthough I could access the folders if I browsed the existing folders by entering it in the remote directory field. Still no files or folders would show.
List last modified files using FTP Command-line
- Category: File Transfer Protocol
- Hits: 8632
So let's say my FTP client is not the most expensive (was FREE), nor the most advanced client out there, and I want to know what were the most recent files I modified and uploaded to a site, how do I do it using just Microsoft Windows?
How?
I don't have a clue. Here's what I've got so far:
Parse a HTML Table into a ListView
- Category: Hypertext Markup Language
- Hits: 8083
A quick article on if you were given a webpage coded in HTML, what methods in AutoHotkey could you use to separate out the HTML Tables into a ListView.
Why?
I want a snippet of code that replicates any HTML table.
How?
I've been trying various ways so I'm posting them here. My opinions on them change with the weather so until I do some benchmarking I won't know which ones best:
Embed an FLV file into a web page
- Category: Hypertext Markup Language
- Hits: 25191
This is if you have an FLV file and you don't want any fancy management system, you just want your FLV to play on your webpage.
The following example is a demonstration of how to do this without installing anything on your webserver.
I like to use flowplayer for this example but my own systems can't use a solution as crude as this.
- Copy the below code (beginning and ending with object tags)
- Paste it into your HTML page
- Replace both instances of the text "http://my.video.com/myVideo.flv" with the full url of your own FLV.
- Save the HTML page and publish
The Code:
This file contains HTML or script code that may be erroneously interpreted by a web browser
- Category: Hypertext Markup Language
- Hits: 12786
The Error: This file contains HTML or script code that may be erroneously interpreted by a web browser
This is a common error when uploading files that the MediaWiki system does not allow. By making some minor changes to the MediaWiki LocalSettings.php file, we can fix this.
For demo purposes, I'm going to make our system recognize SWF files (by default these are disallowed):
How to make a HTML form post its variables to itself
- Category: Hypertext Markup Language
- Hits: 13040
The Issue
You have a PHP page which generates a HTML form. When the user submits the form, you want the same PHP page to process the data.
Solution
I've seen a lot of people write CGI requests but if you left the action attribute blank, this would do the same thing:
<form method="post" action=""> ...
Sort an associative array by values in Javascript
- Category: JavaScript
- Hits: 6853
An article on how to quickly adapt an array code and sort by its values. Surprising how many examples are on the web and everyone saying you're doing it wrong... Which is true but quite unhelpful. The original code is not my own either but that's not an excuse. I also found that examples across the web were only partial and thought I'd write a full example here. No jQuery and using the Google Chrome browser. I wanted to:
- Sort the array by its values
my_records.sort();
- Iterate through and output these in HTML
for(i=0;i<my_records.length;i++){ // do something to my_records[i] }
Page 5 of 9
Credit where Credit is Due:
Feel free to copy, redistribute and share this information. All that we ask is that you attribute credit and possibly even a link back to this website as it really helps in our search engine rankings.
Disclaimer: Please note that the information provided on this website is intended for informational purposes only and does not represent a warranty. The opinions expressed are those of the author only. We recommend testing any solutions in a development environment before implementing them in production. The articles are based on our good faith efforts and were current at the time of writing, reflecting our practical experience in a commercial setting.
Thank you for visiting and, as always, we hope this website was of some use to you!
Kind Regards,
Joel Lipman
www.joellipman.com
Latest Articles
Accreditation

