php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #31655 Cannot use document() to use the "multiple sources" function
Submitted: 2005-01-22 17:00 UTC Modified: 2005-01-22 17:47 UTC
From: e-t172 at stargatetc dot com Assigned:
Status: Not a bug Package: XSLT related
PHP Version: 5.0.3 OS: Linux Fedora Core 3
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: e-t172 at stargatetc dot com
New email:
PHP Version: OS:

 

 [2005-01-22 17:00 UTC] e-t172 at stargatetc dot com
Description:
------------
(i am french, sorry for my bad english)

I try to use the document() function (http://www.w3.org/TR/xslt#document) in a XSL stylesheet to use multiple sources in a transformation.

No effect : the expression doesn't return any node - but no error !

I have verifyed the paths : all clear.

Reproduce code:
---------------
(exemple - not really tested)

doc1.xml :

<root>
<element>foo</element>
</root>

doc2.xml :

<otherroot>
<element>bar</element>
</otherroot>

stylesheet.xsl :

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" />
<xsl:template match="root">
<xsl:value-of select="element" />
<xsl:value-of select="document('xml2.xml')/otherroot/element" />
</xsl:template>
</xsl:stylesheet>

Expected result:
----------------
foobar

Actual result:
--------------
foo

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-01-22 17:47 UTC] chregu@php.net
It works for me and I use it quite often in my applications... No idea, why it doesn't work for you... 


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Oct 31 23:01:28 2024 UTC