Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsXMLXMLPointing zu files in filesystemPointing zu files in filesystem
Previous
 
Next
New Post
10/27/2006 2:25 PM
 

Hi,
I've written a vbs script that reads filenames from a folder structure and their extended properties (author, title, subject, ...). This information is written to an XML file. Now by using the XML module and a XSL file this is displayed in our DNN intranet. The requirements are to give the users access to the files using UNC paths.
The problem I have is the support of special characters, eg. äöü in filenames. We can't avoid these characters. Using these characters in title, subject, etc. works fine. I tried several encoding settings. No solution so far.
The links that are generated follow the encoding settings in the XSL file. these links don't work in Windows if the filename contains a special character. Is there a way to do different encoding when building the file links? Any other ideas that can help?
Thanks
Manfred

 

 
New Post
10/27/2006 3:02 PM
 

Hi Manfred,

As a German who has to live with Umlaute I was curious enough to look into this issue:

---file.xml----BEGIN--------
<file name="C:\ÄÖÜ.txt"
/>
---file.xml----END--------

---file-html.xsl----BEGIN--------
<?xml version="1.0" encoding="UTF-8"
?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>
<
xsl:output method="html"
/>
<
xsl:template match ="file"
>
   <
a
>
   <
xsl:attribute name ="href"
>
      <
xsl:value-of select ="@name" disable-output-escaping="yes"
/>
   </
xsl:attribute
>
   <
xsl:value-of select ="@name"
/>
   </
a
>
</
xsl:template
>
</
xsl:stylesheet
>
---file-html.xsl----END--------

Running this tranformation will result in this strange output: It is right inside the link caption but gets encoded inside the attribute.

---result-html.xml----BEGIN-------
<a href="C:\%C3%84%C3%96%C3%9C.txt">C:\ÄÖÜ.txt</a
>
---result-html.xml----END----------

So I googled for "xsl:attribute umlaut" and found the solution related to the output setting:

---file.xsl----BEGIN--------
<?xml version="1.0" encoding="UTF-8"
?>
<
xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>
<
xsl:output method="xml" omit-xml-declaration ="yes"
/>
<xsl:template match ="file">
   <
a
>
   <
xsl:attribute name ="href"
>
      <
xsl:value-of select ="@name" disable-output-escaping="yes"
/>
   </
xsl:attribute
>
   <
xsl:value-of select ="@name"
/>
   </
a
>
</
xsl:template
>
</xsl:stylesheet>
---file.xsl----END--------

---result.xml----BEGIN--------
<a href="ÄÖÜ.txt"
>ÄÖÜ.txt</a
>
---result.xml----END----------

 
New Post
10/30/2006 4:16 AM
 

It works like a charm.

Hallo Stefan,
danke für die schnelle Antwort. Funktioniert einwandfrei.
Google hatte ich auch versucht, aber wohl mt der falschen Frage  ;-)

Manfred

 

 

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsXMLXMLPointing zu files in filesystemPointing zu files in filesystem


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out