Google グループは Usenet の新規の投稿と購読のサポートを終了しました。過去のコンテンツは引き続き閲覧できます。
Dismiss

syntax looks correct, but ff gives syntax error

閲覧: 13 回
最初の未読メッセージにスキップ

jmic...@yahoo.com

未読、
2014/10/04 5:38:462014/10/04
To:
xsl is:

<?xml version='1.0' encoding='utf-8'?>
<!--menu7.xsl-->
<xsl:stylesheet verion='1.0' xmlns:xsl='http://www.w3.org/TR/WD-xsl'>
<!-- xsl:template match='/'>
<xsl:apply-templates/>
</xsl:template -->
<xsl:template match='/'>
<xsl:output
method='html'
doctype-system='about:legacy-compat'
encoding='UTF-8'
indent='yes'/>
<html lang="en">
<head>
<title>Sitemap</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></meta>
<link rel="shortcut icon" href="/favicon.ico"></link>
<style>
ul.admin {
color:#69F;
}
ul.moderator {
color:#396;
}
ul.paidbls {
color:#990;
}
ul.paidmusic {
color:#C60;
}
ul.paidwebapps {
color:#F90;
}
ul.user {
color:#96F;
}
li ul {
background-color:#F99;
}
li {
background-color:white;
}
</style>
</head>
<body>

<!-- xsl:for-each select='//admin' -->
<xsl:template match="admin">
<xsl:choose>
<xsl:when test='.'><!--items-->
<li><a href='<xsl:value-of select='@href'/>'><xsl:value-of select='@title'/></a></li>
</xsl:when>
<xsl:when test="/"><!--first items in list-->
<ul class="admin">
</xsl:when>
<xsl:when test='/last()'><!--last item in list-->
</ul>
</xsl:when>
<xsl:otherwise>
<div>otherwise-admin</div>
</xsl:otherwise>
</xsl:choose>
<!-- /xsl:for-each -->
</xsl:template>

<!-- xsl:for-each select='//moderator' -->
<xsl:template match="moderator">
<xsl:choose>
<xsl:when test='.'><!--items-->
<li><a href='<xsl:value-of select='@href'/>'><xsl:value-of select='@title'/></a></li>
</xsl:when>
<xsl:when test="/"><!--first items in list-->
<ul class="moderator">
</xsl:when>
<xsl:when test='/last()'><!--last item in list-->
</ul>
</xsl:when>
<xsl:otherwise>
<div>otherwise-moderator</div>
</xsl:otherwise>
</xsl:choose>
<!-- /xsl:for-each -->
</xsl:template>
</xsl:for-each>
<!--xsl:for-each select='//paidbls' -->
<xsl:template match="paidbls">
<xsl:choose>
<xsl:when test='.'><!--items-->
<li><a href='<xsl:value-of select='@href'/>'><xsl:value-of select='@title'/></a></li>
</xsl:when>
<xsl:when test="/"><!--first items in list-->
<ul class="paidbls">
</xsl:when>
<xsl:when test='/last()'><!--last item in list-->
</ul>
</xsl:when>
<xsl:otherwise>
<div>otherwise-paidbls</div>
</xsl:otherwise>
</xsl:choose>
<!-- /xsl:for-each -->
</xsl:template>

<!-- xsl:for-each select='//paidmusic' -->
<xsl:template match="paidmusic">
<xsl:choose>
<xsl:when test='.'><!--items-->
<li><a href='<xsl:value-of select='@href'/>'><xsl:value-of select='@title'/></a></li>
</xsl:when>
<xsl:when test="/"><!--first items in list-->
<ul class="paidmusic">
</xsl:when>
<xsl:when test='/last()'><!--last item in list-->
</ul>
</xsl:when>
<xsl:otherwise>
<div>otherwise-paidmusic</div>
</xsl:otherwise>
</xsl:choose>
<!-- /xsl:for-each -->
</xsl:template>

<!-- xsl:for-each select='//paidwebapps' -->
<xsl:template match="paidwebapps">
<xsl:choose>
<xsl:when test='.'><!--items-->
<li><a href='<xsl:value-of select='@href'/>'><xsl:value-of select='@title'/></a></li>
</xsl:when>
<xsl:when test="/"><!--first items in list-->
<ul class="paidwebapps">
</xsl:when>
<xsl:when test='/last()'><!--last item in list-->
</ul>
</xsl:when>
<xsl:otherwise>
<div>otherwise-paidwebapps</div>
</xsl:otherwise>
</xsl:choose>
<!-- /xsl:for-each -->
</xsl:template>

<!-- xsl:for-each select='//user' -->
<xsl:template match="visitor">
<xsl:choose>
<xsl:when test='.'><!--items-->
<li><a href='<xsl:value-of select='@href'/>'><xsl:value-of select='@title'/></a></li>
</xsl:when>
<xsl:when test="/"><!--first items in list-->
<ul class="visitor">
</xsl:when>
<xsl:when test='/last()'><!--last item in list-->
</ul>
</xsl:when>
<xsl:otherwise>
<div>otherwise-visitor</div>
</xsl:otherwise>
</xsl:choose>
<!-- /xsl:for-each -->
</xsl:template>

<!-- xsl:for-each select='//leader' -->
<xsl:template match="leader">
<xsl:choose>
<xsl:when test='.'><!--items-->
<li><a href='<xsl:value-of select='@href'/>'><xsl:value-of select='@title'/></a></li>
</xsl:when>
<xsl:when test="/"><!--first items in list-->
<ul class="leader">
</xsl:when>
<xsl:when test='/last()'><!--last item in list-->
</ul>
</xsl:when>
<xsl:otherwise>
<div>otherwise-leader</div>
</xsl:otherwise>
</xsl:choose>
<!-- /xsl:for-each -->
</xsl:template>

</body>
</html>
</xsl:template>
</xsl:stylesheet>



section of large xml looks like:

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="menu7.xsl"?>
<!--!DOCTYPE ul SYSTEM "/menu7-breadcrumb.dtd"-->
<!-- jimm -->
<!--
Copyright 2007 Jim Michaels
This file is part of menu7.

(<visitor .*?">|</visitor>)
is a regex you can use for condensing the file into major categories if something goes wrong.

['tag'] is always upper case i.e. ADMIN

-->
<!-- search xml file for commented out entries -->
<!-- ul xmlns="urn:ul" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xmlns:noNamespaceSchemaLocation="http://JesusnJim.com/menu7-2014-09-30.xsd" -->
<!-- xmlns:Prefix="Namespace Name"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="Namespace Name LocationHint" -->
<!-- xmlns:ul
xmlns:prefix="http://www.w3.org/2001/XMLSchema"
xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
xmlns:noNamespaceSchemaLocation="http://JesusnJim.com/menu7-2014-09-30.xsd" -->

<!-- tried the above and failed -->

<ul
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="menu7-2014-09-30.xsd">

<admin priority="0" href="/setup/index.php" title="Admin HOME">
<admin priority="0" href="/setup/contactme.php" title="Contact me"/>
</admin>



<paidbls priority="0.8" href="/basic-life-skills/index.html" title="basic life skills HOME">
<paidbls priority="0.8" href="/basic-life-skills/shoe-shining.html" title="shoe shining"/>
<paidbls priority="0.8" href="/basic-life-skills/guys-shaving-how-to.html" title="guys - how to shave (basic, advanced)"/>
<paidbls priority="0.8" href="/basic-life-skills/how-to-cut-your-own-hair.html" title="how to cut your own hair"/>
<!-- paidbls priority="0.8" href="/basic-life-skills/weddings.html" title="weddings: you a guy? guest/friend"/ -->
<!-- paidbls priority="0.8" href="/basic-life-skills/funerals.html" title="funerals: you a guy? guest/friend"/ -->
<!-- paidbls priority="0.8" href="/basic-life-skills/anniversary.html" title="anniversary"/ -->
<paidbls priority="0.8" href="/basic-life-skills/things-you-should-know-about-work.html" title="things you should know about work"/>
<paidbls priority="0.8" href="/basic-life-skills/planning-a-daily-bus-trip.html" title="planning a daily bus trip"/>
<paidbls priority="0" href="/basic-life-skills/contactme.php" title="Contact me"/>
</paidbls>

<paidmusic priority="0.8" href="/music/index.html" title="Music HOME">
<!-- paidmusic priority="0.8" href="/music.html" title="Music"/ -->
<paidmusic priority="0.8" href="/music/cakewalk.html" title="mostly Cakewalk Sonar tunes"/>
<paidmusic priority="0.8" href="/music/em1.html" title="Electric Modulations"/>
<paidmusic priority="0.8" href="/music/em2.html" title="Electric Modulations II"/>
<paidmusic priority="0.8" href="/music/em3.html" title="Electric Modulations III"/>
<paidmusic priority="0.8" href="/music/emu.html" title="Electric Musings"/>
<paidmusic priority="0.8" href="/music/elfav1.html" title="Electric Favorites"/>
<paidmusic priority="0.8" href="/music/elfav2.html" title="Electric Favorites II"/>
<paidmusic priority="0" href="/music/contactme.php" title="Contact me"/>
</paidmusic>




<visitor priority="0.9" href="/index.html" title="HOME">

<visitor priority="0.0" href="/test/index.html" title="unit tests">
<visitor priority="0.0" href="/test/atoi64.html" title="atoi64"/>
<visitor priority="0.0" href="/test/js-stringtodtime.html" title="js-stringtodtime"/>
<visitor priority="0.8" href="/test/js-case-sensitive.html" title="js-case-sensitive (id)"/>
<visitor priority="0.8" href="/test/js-Date.getDay.html" title="js-Date.getDay Date.getDay()"/>
</visitor>

<visitor priority="0.8" href="/want-dos-like-os.html" title="Want OS/2 or DOS-like multithreaded OS"/>
<visitor priority="0" href="/contactme.php" title="Contact me"/>
</visitor>
</ul>



anybody got any clues? I don't have XML spy because I don't have that kind of cash, have way too many expenses to keep up with.

I have read article after article, and this follows the rules, but it doesn't work. do I file an ff bug, or is there something wrong you can see (I would like it fixed)?
I plan on sectioning them out so that the various accounts (tags) have their own separate sitemaps.
help/pointers or fixes appreciated. thanks. browser just says "Error loading stylesheet: Parsing an XSLT stylesheet failed." without saying what line number or what exactly is wrong.
新着メール 0 件