Function Document() and VB .Net 1.1

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sorliden
    New Member
    • Dec 2006
    • 1

    #1

    Function Document() and VB .Net 1.1

    Hello,

    I have a problem with XSLT in VB .Net 1.1 and can't find the answer on the net.

    I have used a construction in XSLT that for instance can be used for separation of text and style. There is a language setting @LG in the XML file that is the ISO code of the selected language. This value is used to create a variable, "string", in XSLT that refer to an XML file that contains the strings of the selected language.

    Code:
    <xsl:variable name="lang" select="string(/OPIC_IMPORT/@LG)"/>
    <xsl:variable name="strings" select="concat('strings/STRINGS_',$lang,'.xml')"/>
    Whenever a text should be written the document command is used to get the string with a specific @Id:

    Code:
    <xsl:value-of select="document($strings)/strings/string[@Id='TITLE']"/>
    A file with strings look like this:

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE strings SYSTEM "STRINGS.dtd">
    <strings>
    	<string Id="NOTICE_HAS_BEEN_RECEIVED">The notice/message has been received and will be published the specified day.</string>
    	<string Id="NOTICE_HAS_BEEN_RETRIEVED">The notice/message has been retrieved.</string>
    	<string Id="TITLE">Title</string>
    </strings>
    I use this construction in MSXML2.DOMDocum ent.4.0 with success. But the document function returns empty string in VB .Net 1.1. Does any one know what could be wrong?

    It's one of my consultants that is the author of the VB .Net 1.1 code and I don't have all the knowledge about all "settings" used.

    Regards
    MÃ¥rten

    and

    Merry Christmas
Working...