Got a question about technology? Ask it here. Discussion of hardware, software, TiVos, multi-region DVDs, Windows, Macs, LINUX, hand-helds, iPods, anything tech related. Better than any helpdesk!
Myth update.
The full myth-box in the living room hooked up to the TV is working great but the power supply is too loud for my taste.
The computer it replaced (that was running GeeXBox) is in the process of being converted into a Myth frontend computer. (A tip, if installing from binary packages, use the same distribution for the frontend and backend. My backend/frontend box is on Fedora Core 4 and I first used Ubuntu for the Frontend, but the MythTV versions didn't match and the frontend couldn't talk to the backend.) The frontend is working fine, but needs some tweaking to get the remote control working. But still I can watch recorded video and live TV on the frontend.
"That's why a company like Apple has such an easier time of innovation."
But OS X Tiger can run pretty much all OS X software ever created, and most pre-OS X software in Classic. That's a lot of legacy support. Yes, the new Intel macs have dropped Classic support, but they could get away with that because almost nobody is really running Classic software anymore. I guess my point is - Apple provides legacy software support too, at least to a very large extent (and I know for a fact that not all Windows 95 software will actually run on XP)
Couldn't Windows do the same thing? Provide an emulation layer, separate from the new stuff, for legacy software, and thus start from scratch for the new OS? It seems like a smart move, overall.
I've used and written a little simple xsl, but it's not something I work with very often at all. I might be able to help if it's a pretty simple question.
I don't know if I can even explain this correcly....
OK, say we have the xsl:
<xsl:template match="/">
<xsl:for-each select="employees/employee[@g=0]">
<option>
<xsl:attribute name="value"><xsl:value-of select="@i"/></xsl:attribute>
<xsl:value-of select="@n"/> - <xsl:value-of select="status/@s" />
</option>
</xsl:for-each>
</xsl:template>
I want the stuff in the for-each loop to only happen if the
xsl:value-of select="status/@s"
actually matches something.
There's more stuff going on, but hopefully this is enough info....
eta: the <option> stuff is only there because this is returning html that's used in a drop-down box.
Easy-peasy.
<xsl:template match="/">
<xsl:for-each select="employees/employee[@g=0]">
<xsl:if test="status/@s">
<option>
<xsl:attribute name="value"><xsl:value-of select="@i"/>
<xsl:value-of select="@n"/> - <xsl:value-of select="status/@s" />
</option>
</xsl:if>
</xsl:for-each>
</xsl:template>
Although if it's more complicated than that, you'll probably end up having to use an
t xsl:choose
instead of an
t xsl:if
.
Thanks - I'll give that a try.
That was the direction I was going in, but I didn't know about the
<xsl:if test=
stuff....
OK, that's not working, so I'll have to explain the (more) confusing stuff.
The thing is, the
xsl:value-of select="status/@s"
would normally match to multiple rows, except that there's a criteria/filter put on the xsl by the javascript that applies the xsl on the xml.
That looks like this:
xslStyle.loadXML(xslEmployeeComboboxDept.XMLDocument.xml);
selectField = xslStyle.selectSingleNode("//xsl:value-of[@select='status/@s']/@select");
selectField.value = "status[@pp=" + varPayPeriod + "]/@s"
strTemp = xmlMaster.transformNode(xslStyle);
xslEmployeeComboboxDept is the stylesheet where I excerpted the above xsl.
I don't fully understand how this works, but it normally limits
xsl:value-of select="status/@s"
to a single match. Sometimes there are no matches, which is what i want to exclude....