Conditionals & paths

Discussion in 'XML' started by Mustafa Aydin, Apr 21, 2004.

  1. 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>
    <xsl:eek:therwise>
    <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'/>
    </xsl:eek:therwise>
    </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
     
    Mustafa Aydin, Apr 21, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. .Net Sports
    Replies:
    15
    Views:
    2,694
    Ted Miller
    Feb 3, 2006
  2. Replies:
    1
    Views:
    1,451
    Zafar Abbas
    Dec 30, 2005
  3. Noah
    Replies:
    5
    Views:
    846
  4. Barney Frank
    Replies:
    3
    Views:
    337
    anton muhin
    Jul 29, 2004
  5. Ohad Lutzky

    Paths, gentleman, paths

    Ohad Lutzky, Nov 6, 2006, in forum: Ruby
    Replies:
    2
    Views:
    224
    David Vallner
    Nov 7, 2006
Loading...

Share This Page