Project

Profile

Help

Bug #4644

closed

xsl:result-document error with with nonexistent directory in @href

Added by Sergei Betke almost 4 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Category:
.NET API
Sprint/Milestone:
-
Start date:
2020-07-14
Due date:
% Done:

0%

Estimated time:
Legacy ID:
Applies to branch:
9.8
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:

Description

I use simple XSLT code:

	<xsl:template mode="p:create-outline-document-files p:create-inline-document-files" use-when="$p:restore-doctype"
		 match="/manifest:manifest/manifest:file-entry[
			starts-with( @manifest:full-path, 'Basic/' )
			and ends-with( @manifest:full-path, '/script-lb.xml' )
		]"
		 priority="-1"
	>
		<xsl:result-document href="{ xs:anyURI( './' || data( @manifest:full-path ) ) }"
			format="p:OOXmlFileFormat"
			doctype-system="library.dtd"
		>
			<xsl:apply-templates mode="#current"/>
		</xsl:result-document>
	</xsl:template>

by example:

		<xsl:result-document href="a/b/c/d.xml"/>
			...
		</xsl:result-document>

and just a directory exists. Previous code create file a/c/d.xml!!!, not a/b/c/d.xml.

But when I create a/b/c directory, previous code create file a/b/c/d.xml.

Saxon HE 9.8 with .net.

Actions #1

Updated by Sergei Betke almost 4 years ago

I use simple XSLT code:

	<xsl:template mode="p:create-outline-document-files p:create-inline-document-files" use-when="$p:restore-doctype"
		 match="/manifest:manifest/manifest:file-entry[
			starts-with( @manifest:full-path, 'Basic/' )
			and ends-with( @manifest:full-path, '/script-lb.xml' )
		]"
		 priority="-1"
	>
		<xsl:result-document href="{ xs:anyURI( './' || data( @manifest:full-path ) ) }"
			format="p:OOXmlFileFormat"
			doctype-system="library.dtd"
		>
			<xsl:apply-templates mode="#current"/>
		</xsl:result-document>
	</xsl:template>

By example:

		<xsl:result-document href="a/b/c/d.xml"/>
			...
		</xsl:result-document>

and just a directory exists. Previous code create file a/c/d.xml!!!, not a/b/c/d.xml.

But when I create a/b/c directory, previous code create file a/b/c/d.xml.

Saxon HE 9.8 with .net.

Actions #2

Updated by Michael Kay almost 4 years ago

  • Category set to .NET API
  • Assignee set to O'Neil Delpratt
Actions #3

Updated by O'Neil Delpratt over 3 years ago

  • Status changed from New to AwaitingInfo

Hi, Sorry for the delay in getting back to you on this bug issue. I would like to try and reproduce this issue at my end. Please can provide a small but full repo?

Actions #4

Updated by O'Neil Delpratt over 3 years ago

  • Status changed from AwaitingInfo to Closed

Hi, I have looked at this bug issue again, but failed to reproduce the problem reported with my own constructed xsl stylesheet. I ran it against Saxon 10.2. Saxon 9.8 is rather old I suggest moving forward to a more recent release.

I am closing this bug, but feel free to reopen it if you can provide us with a suitable repo.

Please register to edit this issue

Also available in: Atom PDF