[Webkit-unassigned] [Bug 95608] New: xslt fn:document uri fails load external files if relative URI contains characters "[ ] ' "
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Aug 31 14:07:59 PDT 2012
https://bugs.webkit.org/show_bug.cgi?id=95608
Summary: xslt fn:document uri fails load external files if
relative URI contains characters "[ ] ' "
Product: WebKit
Version: 528+ (Nightly build)
Platform: Unspecified
OS/Version: Windows 7
Status: UNCONFIRMED
Severity: Normal
Priority: P2
Component: XML
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: timur.junussov at bee.kz
I've reposted this issue https://code.google.com/p/chromium/issues/detail?id=146039&thanks=146039&ts=1346446842 here
When you want to try include external document by relative path (ex: document('../data/one.xml')) and if your files placed inside directory which contains sequence of characters such as "[ Test ]" (rectangular brackets and space between them) or "Test '"(some text and apostroph sign and space between them) it fails to load
If you specify full path with escaped characters when it works fine
<xsl:value-of select="count(document('file:///C:/%5B%20test%20%5D/data/one.xml')/one/child)"/>
P.s I think Chrome is providing wrong formatted file path to XSLT engine. It doesnt escapes charactes [], it should be %5B%5D
What steps will reproduce the problem?
1. Create folder with name containing space and bracket ex: "My Folder ]" or "[ My Folder ]" or "My Folder '"
2. Extract into this folder zip archive ( text xml+xsl files )
3. Open in Chrome browser file index.xml
What is the expected result?
It should load external document
Count <xsl:value-of select="count(document('../data/one.xml')/one/child)"/> show 3
What happens instead?
It fails to load, even if path is relative.
Count <xsl:value-of select="count(document('../data/one.xml')/one/child)"/> shows 0
Folder Structure example
C:\\[ Test ]\index.xml
C:\\[ Test ]\data\one.xml
C:\\[ Test ]\template\template.xsl
if you change folder name to just Test it works fine
C:\\Test\index.xml
C:\\Test\data\one.xml
C:\\Test\template\template.xsl
-------file index.xml
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="template/template.xsl"?>
<root/>
-------file template.xsl
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml">
<xsl:output method="html"/>
<xsl:template match="/">
Count <xsl:value-of select="count(document('../data/one.xml')/one/child)"/>
</xsl:template>
</xsl:stylesheet>
-------file one.xml
<?xml version="1.0"?>
<one>
<child/>
<child/>
<child/>
</one>
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list