And I'm answering my own question, I have a habbit of this. Anyway, the appropraite syntax for putting a variable into <xsl:with-param select=""> is
<xsl:with-param name="date-time" select="$dayOfTheWeek" />
and not
<xsl:with-param name="date-time" select="'{$dayOfTheWeek}'" />
I'm using EXSLT date:day-in-week function here, but the question is very general. Here I have a short template, and in the middle of it I declare a variable "dayOfTheWeek", and also call the template to parse that date into a number representing the day of the week. The value of the variable is...
I'm using cooktop for testing right now, do you have a better suggestion? It was just the first thing I found that works.
The solution will be implemented in PERL using XML::XSLT module.
Well, I can remove the line after I get it, but thats one extra step to take. I don't control the way the national weather service sends their xml. They specify a schema in their XML, why should I have to write a script to remove that line when I can just ask them to fix it?
Besides it will be...
This is more of a javascript question, but you'll use a line like
var root = xmlDoc.getElementsByTagName('data');
then some kind of loop like:
for (i = 0; i < root[0].childNodes.length; i++) {
}
be sure to test for an actual node and not just whitespace by using a line like:
if...
why don't you test for 12AM with something like
<xsl:if test="substring(date,7,2) = 12">
<xsl:if test="substring(date,13,2) = 'am'">
<xsl:sort select="substring(date,10,2)" order="descending" data-type="number" /> <!-- min -->
<xsl:sort select="substring(date,13,2)"...
This XML feed comes straight from NOAA, I need to transform it via XSLT. Here's my blank stylesheet:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
</xsl:stylesheet>
Nothing special, but I get this error:
"The element...
You were right, but I was unable to get to my objects because at the time I asked for them (the very next line after calling my importXML function) they didn't actually exist yet. I have to wait for the function to finish before calling the resulting objects. I did that by putting my importXML()...
I'm loading an XML file in mozilla here:
if (document.implementation && document.implementation.createDocument)
{
xmlDoc = document.implementation.createDocument("", "", null);
xmlDoc.onload = fillArrayMoz;
}
fillArrayMoz() contains a number of new object declarations that look like...
Alright I have it working now, here's the resulting code if anyone would like to see it. Just so everyone knows, most of this code has been borrowed from various other forums and is only partially my own.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
Well your mods do make this work the way it stands, but the functionality I really want is for this insert function to auto rotate. So my first idea was to call it recursively at the end. In my mind it seems like the function should run, then call itself unless the user calls the function by...
thanks so much, that was extremely helpful. I'm wondering since the page won't finish loading until page_request.open() is called, your added lines:
if (page_request.readyState == 4) {
setTimeout("loadpage(page_request,"+containerid+")",m)
}
should go after that line? I'm going to give it...
function insert(link_num, containerid){
var url = extern_links[link_num-1];
var page_request = false
if (window.XMLHttpRequest) // if Mozilla, Safari etc
page_request = new XMLHttpRequest()
else if (window.ActiveXObject){ // if IE
try {
page_request = new...
here's my function. After the closing </body> tag I call it. I want it to call insert which loads a page ajax style, and then nap for 2 seconds. The behavior I get is a nap for 2 seconds, and then the page loads.
function rotate(link_num, containerid, clicked) {
insert(link_num, containerid)...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.