Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Conditionals & paths

Reply
Thread Tools

Conditionals & paths

 
 
Mustafa Aydin
Guest
Posts: n/a
 
      04-21-2004
Hello NG,
just another question )

I try a workaround for my problem with the resin directories
(see Resin&WAR&XML)

My HP exists in 3 languages. Because the layout shall be
language independent, I don't want to maintain 3 copies
of the XSL-files. Therefore I'll give the "layouter" the file
with the table of contents as argument so it can build
it into the pages.

Locally all works fine but on the server of my provider resin
does not find my XSL-files apart from "default.xsl".
The directory tree looks like this

<root>
index.html (Startseite)
xsl/
seite.xls This file resin doesn't find (relativ)
toc.xls This file resin doesn't find (relativ)
toc.de.xml German TOC
toc.en.xml English TOC
toc.tr.xml Turkish TOC
deutsch/
index.xtp Entry page
default.xsl This file resin finds
englisch/
index.xtp Entry page
default.xsl This file resin finds
...
...
...

As workaround on the Server I'll use the absolute URLs
of the files so it works at all. Locally I'd like to use the
relative paths because I do not have to stay in the net
all the time. But if I now try to "call" the URLs controlled
by a variable "local" resin gives me the following error

"default.xsl:1: <xsl:choose> is not allowed in the top level."

<xsl:variable name="local" select="ja"/>

<xsl:choose>
<xsl:when test="$local=ja">
<xsl:variable name="toc" select="'../../xsl/toc.de.xml'"/>
<xsl:include href='../../xsl/seite.xsl'/>
<xsl:include href='../../xsl/toc.xsl'/>
</xsl:when>
<xsltherwise>
<xsl:variable name="toc"
select="'http://www.weltgebetsuhr.de/wgb/xsl/toc.de.xml'"/>
<xsl:include href='http://www.weltgebetsuhr.de/wgb/xsl/seite1.xsl'/>
<xsl:include href='http://www.weltgebetsuhr.de/wgb/xsl/toc.xsl'/>
</xsltherwise>
</xsl:choose>


If anyone has any idea to solve this I'd be appreciated. Slow
but sure I get mad about this stuff )

Bye
Mustafa


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Paths, gentleman, paths Ohad Lutzky Ruby 2 11-07-2006 02:15 AM
C# to VB.net conversion for "?" conditionals .Net Sports ASP .Net 15 02-03-2006 04:11 PM
XSD: ways to deal with conditionals on attribute value? Piper707@hotmail.com XML 1 12-30-2005 09:10 PM
Newbie question about formatting long conditionals Barney Frank Python 3 07-29-2004 10:04 AM
Convert between Windows style paths and POSIX style paths Noah Python 5 07-11-2003 09:25 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57