Project

Profile

Help

Bug #4643

doc() XPath function does not work

Added by Sergei Betke about 1 month ago. Updated 4 days ago.

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

0%

Estimated time:
Legacy ID:
Applies to branch:
10, trunk
Fix Committed on Branch:
10, trunk
Fixed in Maintenance Release:

Description

After doc-available() doc() write error message "... marked as unavailable".

I use custom XMLResolver and set it by Processor.XmlResolver.

But there is workaround:

    <xsl:function name="fix:doc" as="document-node()?" visibility="final">
        <xsl:param name="fix:uri" as="xs:string?" required="yes"/>
        <xsl:if test="exists( $fix:uri )">
            <xsl:source-document href="{ $fix:uri }">
                <xsl:sequence select="/"/>
            </xsl:source-document>
        </xsl:if>
    </xsl:function>

Saxon HE 9.8...

History

#1 Updated by Michael Kay about 1 month ago

I guess you're using .NET, correct?

Does doc-available() return true or false?

Is your custom XMLResolver actually called? Is it called in both cases (with fn:doc() and with xsl:source-document?) What does the XMLResolver actually do?

I'm afraid we'll need a lot more detail to help you with this.

#2 Updated by Sergei Betke about 1 month ago

I guess you're using .NET, correct?

Yes.

Does doc-available() return true or false?

false with absolute uri, but file exists! And xsl:source-document return document as expected. Workaround work as expected.

Is your custom XMLResolver actually called? Is it called in both cases (with fn:doc() and with xsl:source-document?)

Yes for xsl:source-document. And i can not catch call to my XMLResolver on XPath doc() call.

What does the XMLResolver actually do?

This is PowerShell code:

class OOXmlResolver: System.Xml.XmlUrlResolver {

	[System.String] $DtdPath

	OOXmlResolver( [System.String] $DtdPath ) {
		$this.DtdPath = $DtdPath;
	}

	[System.Uri]
	ResolveUri ( [System.Uri] $baseUri, [System.String] $relativeUri ) {
		If ( -not $this.DtdPath ) {
			return ( [System.Xml.XmlUrlResolver] $this ).ResolveUri( $baseUri, $relativeUri );
		};
		[System.Uri] $DtdFileUri = Join-Path -Path $this.DtdPath -ChildPath $relativeUri;
		If ( Test-Path -Path ( $DtdFileUri.LocalPath ) ) {
			return $DtdFileUri;
		}
		else {
			return ( [System.Xml.XmlUrlResolver] $this ).ResolveUri( $baseUri, $relativeUri );
		};
	}

};

Now I use OOXmlResolver just for DTD uri resolving...

I'm afraid we'll need a lot more detail to help you with this.

I'm ready to help! Thank You for Your attension!

My project: https://github.com/test-st-petersburg/DocTemplates

Xsl30Transformer setup for using: https://github.com/test-st-petersburg/DocTemplates/blob/master/tools/Get-XSLTExecutable.ps1

#4 Updated by Michael Kay about 1 month ago

If you call doc() without first calling doc-available(), does it fail, and if so, what is the error message? (One of the problems with doc-available() is that it gives you no diagnostics).

#5 Updated by Sergei Betke about 1 month ago

If you call doc() without first calling doc-available(), does it fail, and if so, what is the error message? (One of the problems with doc-available() is that it gives you no diagnostics).

After calling doc():

ERROR: Исключение при вызове "CallTemplate" с "1" аргументами: "Exception thrown by URIResolver"

#6 Updated by Sergei Betke about 1 month ago

But I do net set Xslt30Transformer.InputXmlResolver, I set Processor.XmlResolver.

And: xsl:source-document work as expected!

#7 Updated by Sergei Betke about 1 month ago

My debug code:

class OOXmlResolver: System.Xml.XmlUrlResolver {

	[System.String] $DtdPath

	OOXmlResolver( [System.String] $DtdPath ) {
		$this.DtdPath = $DtdPath;
	}

	[System.Uri]
	ResolveUri ( [System.Uri] $baseUri, [System.String] $relativeUri ) {
		Write-Verbose "!!!!!!!!!!!!!!!! $baseUri ++++ $relativeUri ....";
		If ( -not $this.DtdPath ) {
			return ( [System.Xml.XmlUrlResolver] $this ).ResolveUri( $baseUri, $relativeUri );
		};
		[System.Uri] $DtdFileUri = Join-Path -Path $this.DtdPath -ChildPath $relativeUri;
		If ( Test-Path -Path ( $DtdFileUri.LocalPath ) ) {
			return $DtdFileUri;
		}
		else {
			return ( [System.Xml.XmlUrlResolver] $this ).ResolveUri( $baseUri, $relativeUri );
		};
	}

};

And verbose output before exception:

...
ПОДРОБНО: !!!!!!!!!!!!!!!! file:///C:/Users/sergei.s.betke/Documents/DocTemplates/tools/dtd/officedocument/1_0/office.dtd ++++ form.mod ....
ПОДРОБНО: !!!!!!!!!!!!!!!!  ++++ file:///C:/Users/sergei.s.betke/Documents/DocTemplates/tools/dtd/officedocument/1_0/office.dtd ....
ПОДРОБНО: !!!!!!!!!!!!!!!! file:///C:/Users/sergei.s.betke/Documents/DocTemplates/tools/dtd/officedocument/1_0/office.dtd ++++ settings.mod ....
ПОДРОБНО: !!!!!!!!!!!!!!!! file:///C:/Users/sergei.s.betke/Documents/DocTemplates/tools/xslt/OODocumentProcessor/oo-preprocessor.xslt ++++ file:/C:/Users/sergei.s.betke/Documents/DocTemplates/tmp/template/%D0%9F%D0%B8%D1%81%D1%8C%D0%BC%D0%BE%20%D0%A4%D0%91%D0%A3%20%D0%A2%D0%B5%D1%81%D1%82-%D0%A1.-%D0%9F
%D0%B5%D1%82%D0%B5%D1%80%D0%B1%D1%83%D1%80%D0%B3.ott/meta.xml ....
ERROR: Исключение при вызове "CallTemplate" с "1" аргументами: "Exception thrown by URIResolver"

I think, problem with URI file:/C:/Users/sergei.s.betke/Documents/DocTemplates/tmp/template/%D0%9F%D0%B8%D1%81%D1%8C%D0%BC%D0%BE%20%D0%A4%D0%91%D0%A3%20%D0%A2%D0%B5%D1%81%D1%82-%D0%A1.-%D0%9F %D0%B5%D1%82%D0%B5%D1%80%D0%B1%D1%83%D1%80%D0%B3.ott/meta.xml

URI generation:

                        <xsl:attribute name="meta:date" select="
                                format-dateTime(
                                        adjust-dateTime-to-timezone(
                                                xs:dateTime( doc( resolve-uri(
                                                        '../../../tmp/template/' || iri-to-uri( @xlink:title ) || '.ott' || '/meta.xml',
                                                        base-uri()
                                                ) )/office:document-meta/office:meta/dc:date ),
                                                xs:dayTimeDuration( 'PT0H' )
                                        ),
                                        '[Y0001]-[M01]-[D01]T[H01]:[m01]:[s01.000000000]'
                                )
                        "/>

May be, error in URI format? URI, generated by resolve-uri, is incorrect (RFC 3986): must be "file:///C:/...", not "file:/C:/...".

#8 Updated by Michael Kay about 1 month ago

Please try setting the Processor option http://saxon.sf.net/feature/trace-external-functions to true. This should have the effect of generating a stack trace when the exception occurs in the URIResolver. This will enable us to determine what the exception is, and whether it is in your code or ours (when you supply an XmlResolver, we wrap that in a URIResolver, and the exception could be either in the XmlResolver or in the wrapper).

#9 Updated by Sergei Betke about 1 month ago

Yes, may be, I catch error. New XmlResolver with debug code:

class OOXmlResolver: System.Xml.XmlUrlResolver {

	[System.String] $DtdPath

	OOXmlResolver( [System.String] $DtdPath ) {
		$this.DtdPath = $DtdPath;
	}

	[System.Uri]
	ResolveUri ( [System.Uri] $baseUri, [System.String] $relativeUri ) {
		If ( $this.DtdPath ) {
			[System.Uri] $relativeUriAsUri = $relativeUri;
			If ( -not $relativeUriAsUri.IsAbsoluteUri ) {
				[System.Uri] $testFileUri = ( [System.Uri] $this.DtdPath ).AbsoluteUri + $relativeUri;
				If ( Test-Path -Path ( $testFileUri.LocalPath ) ) {
					return [System.Uri] $testFileUri;
				};
			};
		};
		Write-Verbose "--- before --- $baseUri ++++ $relativeUri ....";
		[System.Uri] $r = ( [System.Xml.XmlUrlResolver] $this ).ResolveUri( $baseUri, $relativeUri );
		Write-Verbose "--- after  --- $r";
		return $r;
	}

	[System.Object]
	GetEntity ( [System.Uri] $absoluteUri, [System.String] $role, [System.Type] $ofObjectToReturn ) {
		Write-Verbose "--- before GetEntity --- $absoluteUri ++++ $role ++++ $ofObjectToReturn";
		$r = ( [System.Xml.XmlUrlResolver] $this ).GetEntity( $absoluteUri, $role, $ofObjectToReturn );
		Write-Verbose "--- after  --- $r";
		return $r;
	}

};

Output:

ПОДРОБНО: --- before --- file:///C:/Users/sergei.s.betke/Documents/DocTemplates/tools/xslt/OODocumentProcessor/oo-preprocessor.xslt ++++ 
file:/C:/Users/sergei.s.betke/Documents/DocTemplates/tmp/template/%D0%9F%D0%B8%D1%81%D1%8C%D0%BC%D0%BE%20%D0%A4%D0%91%D0%A3%20%D0%A2%D0%B5%D1%81%D1%82-%D0%A1.-%D0%9F%D0%B5%D1%82%D0%B5%D1%80%D0%B1%D1%83%D1%80%D0%B3.ott/meta.xml ....
ПОДРОБНО: --- after  --- file:///C:/Users/sergei.s.betke/Documents/DocTemplates/tmp/template/Письмо ФБУ Тест-С.-Петербург.ott/meta.xml
ПОДРОБНО: --- before GetEntity --- http://github.com/test-st-petersburg/DocTemplates/tools/xslt/OODocumentProcessor/oo-preprocessor.xslt 2.3 
file:///C:/Users/sergei.s.betke/Documents/DocTemplates/tmp/template/Письмо ФБУ Тест-С.-Петербург.ott/meta.xml ++++  ++++ System.IO.Stream
ERROR: Исключение при вызове "CallTemplate" с "1" аргументами: "Exception thrown by URIResolver"
C:\Users\sergei.s.betke\Documents\DocTemplates\.build.ps1:356 знак:21

doc('file:/C:/Users/sergei.s.betke/Documents/DocTemplates/tmp/template/%D0%9F%D0%B8%D1%81%D1%8C%D0%BC%D0%BE%20%D0%A4%D0%91%D0%A3%20%D0%A2%D0%B5%D1%81%D1%82-%D0%A1.-%D0%9F%D0%B5%D1%82%D0%B5%D1%80%D0%B1%D1%83%D1%80%D0%B3.ott/meta.xml') call [System.Xml.XmlUrlResolver]::GetEntity( 'http://github.com/test-st-petersburg/DocTemplates/tools/xslt/OODocumentProcessor/oo-preprocessor.xslt 2.3 file:///C:/Users/sergei.s.betke/Documents/DocTemplates/tmp/template/Письмо ФБУ Тест-С.-Петербург.ott/meta.xml', '', System.IO.Stream )

Error in URI! Why 'http://github.com/test-st-petersburg/DocTemplates/tools/xslt/OODocumentProcessor/oo-preprocessor.xslt 2.3 file:///C:/Users/sergei.s.betke/Documents/DocTemplates/tmp/template/Письмо ФБУ Тест-С.-Петербург.ott/meta.xml', must be 'file:///C:/Users/sergei.s.betke/Documents/DocTemplates/tmp/template/Письмо ФБУ Тест-С.-Петербург.ott/meta.xml'!

#10 Updated by Sergei Betke about 1 month ago

ПОДРОБНО: --- before GetEntity --- http://github.com/test-st-petersburg/DocTemplates/tools/xslt/OODocumentProcessor/oo-preprocessor.xslt 2.3 
file:///C:/Users/sergei.s.betke/Documents/DocTemplates/tmp/template/Письмо ФБУ Тест-С.-Петербург.ott/meta.xml ++++  ++++ System.IO.Stream
net.sf.saxon.trans.XPathException: ╚ёъы■ўхэшх яЁш т√чютх "GetEntity" ё "3" рЁуєьхэЄрьш: "╟ряЁюё с√ы яЁхЁтрэ: ═х єфрыюё№ ёючфрЄ№ чр∙ш∙хээ√щ ърэры SSL/TLS."
        at net.sf.saxon.dotnet.DotNetURIResolver.dereference(DotNetURIResolver.java:166)
        at net.sf.saxon.functions.DocumentFn.resolveURI(DocumentFn.java:394)
        at net.sf.saxon.functions.DocumentFn.makeDoc(DocumentFn.java:283)
        at net.sf.saxon.functions.Doc.call(Doc.java:114)
        at net.sf.saxon.functions.Doc.<bridge>call(Doc.java:24)
        at net.sf.saxon.expr.FunctionCall.iterate(FunctionCall.java:547)
        at net.sf.saxon.expr.Expression.evaluateItem(Expression.java:849)
        at net.sf.saxon.expr.SimpleStepExpression.iterate(SimpleStepExpression.java:113)
        at net.sf.saxon.expr.SlashExpression.iterate(SlashExpression.java:902)
        at net.sf.saxon.expr.SlashExpression.iterate(SlashExpression.java:902)
        at net.sf.saxon.expr.SingletonAtomizer.evaluateItem(SingletonAtomizer.java:211)
        at net.sf.saxon.expr.SingletonAtomizer.<bridge>evaluateItem(SingletonAtomizer.java:30)
        at net.sf.saxon.expr.CastExpression.evaluateItem(CastExpression.java:397)
        at net.sf.saxon.expr.CastExpression.<bridge>evaluateItem(CastExpression.java:31)
        at net.sf.saxon.expr.parser.Evaluator$4.evaluate(Evaluator.java:86)
        at net.sf.saxon.expr.SystemFunctionCall.evaluateArguments(SystemFunctionCall.java:451)
        at net.sf.saxon.expr.FunctionCall.iterate(FunctionCall.java:545)
        at net.sf.saxon.expr.Expression.evaluateItem(Expression.java:849)
        at net.sf.saxon.expr.parser.Evaluator$4.evaluate(Evaluator.java:86)
        at net.sf.saxon.expr.SystemFunctionCall.evaluateArguments(SystemFunctionCall.java:451)
        at net.sf.saxon.expr.FunctionCall.iterate(FunctionCall.java:545)
        at net.sf.saxon.expr.Expression.evaluateItem(Expression.java:849)
        at net.sf.saxon.expr.Expression.evaluateAsString(Expression.java:908)
        at net.sf.saxon.expr.instruct.SimpleNodeConstructor.processLeavingTail(SimpleNodeConstructor.java:218)
        at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:687)
        at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:152)
        at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:340)
        at net.sf.saxon.expr.instruct.Copy.processLeavingTail(Copy.java:485)
        at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:347)
        at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:505)
        at net.sf.saxon.trans.rules.ShallowCopyRuleSet.process(ShallowCopyRuleSet.java:100)
        at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:509)
        at net.sf.saxon.trans.rules.ShallowCopyRuleSet.process(ShallowCopyRuleSet.java:100)
        at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:509)
        at net.sf.saxon.trans.rules.ShallowCopyRuleSet.process(ShallowCopyRuleSet.java:100)
        at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:509)
        at net.sf.saxon.trans.rules.ShallowCopyRuleSet.process(ShallowCopyRuleSet.java:100)
        at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:509)
        at net.sf.saxon.trans.rules.ShallowCopyRuleSet.process(ShallowCopyRuleSet.java:68)
        at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:509)
        at net.sf.saxon.expr.instruct.ApplyTemplates.apply(ApplyTemplates.java:296)
        at net.sf.saxon.expr.instruct.ApplyTemplates.process(ApplyTemplates.java:249)
        at net.sf.saxon.expr.parser.ExpressionTool.getIteratorFromProcessMethod(ExpressionTool.java:800)
        at net.sf.saxon.expr.instruct.Instruction.iterate(Instruction.java:379)
        at net.sf.saxon.expr.CardinalityChecker.evaluateItem(CardinalityChecker.java:280)
        at net.sf.saxon.expr.ItemChecker.evaluateItem(ItemChecker.java:250)
        at net.sf.saxon.expr.parser.ExpressionTool.evaluate(ExpressionTool.java:329)
        at net.sf.saxon.expr.LetExpression.eval(LetExpression.java:519)
        at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:700)
        at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:347)
        at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:505)
        at net.sf.saxon.expr.instruct.ApplyTemplates.apply(ApplyTemplates.java:296)
        at net.sf.saxon.expr.instruct.ApplyTemplates.process(ApplyTemplates.java:249)
        at net.sf.saxon.expr.parser.ExpressionTool.getIteratorFromProcessMethod(ExpressionTool.java:800)
        at net.sf.saxon.expr.instruct.Instruction.iterate(Instruction.java:379)
        at net.sf.saxon.expr.CardinalityChecker.evaluateItem(CardinalityChecker.java:280)
        at net.sf.saxon.expr.ItemChecker.evaluateItem(ItemChecker.java:250)
        at net.sf.saxon.expr.parser.ExpressionTool.evaluate(ExpressionTool.java:329)
        at net.sf.saxon.expr.LetExpression.eval(LetExpression.java:519)
        at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:700)
        at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:687)
        at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:347)
        at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:505)
        at net.sf.saxon.expr.instruct.ApplyTemplates.apply(ApplyTemplates.java:296)
        at net.sf.saxon.expr.instruct.ApplyTemplates.process(ApplyTemplates.java:249)
        at net.sf.saxon.expr.parser.ExpressionTool.getIteratorFromProcessMethod(ExpressionTool.java:800)
        at net.sf.saxon.expr.instruct.Instruction.iterate(Instruction.java:379)
        at net.sf.saxon.expr.CardinalityChecker.evaluateItem(CardinalityChecker.java:280)
        at net.sf.saxon.expr.ItemChecker.evaluateItem(ItemChecker.java:250)
        at net.sf.saxon.expr.parser.ExpressionTool.evaluate(ExpressionTool.java:329)
        at net.sf.saxon.expr.LetExpression.eval(LetExpression.java:519)
        at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:700)
        at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:687)
        at net.sf.saxon.expr.instruct.NamedTemplate.expand(NamedTemplate.java:267)
        at net.sf.saxon.Controller.callTemplate(Controller.java:2560)
        at cli.Saxon.Api.Xslt30Transformer.CallTemplate(Unknown Source)
        at cli.System.Dynamic.UpdateDelegates.UpdateAndExecute2(Unknown Source)
        at cli.System.Management.Automation.Interpreter.DynamicInstruction$$00603.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.Interpreter.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.LightLambda.RunVoid1(Unknown Source)
        at cli.System.Management.Automation.PSScriptCmdlet.RunClause(Unknown Source)
        at cli.System.Management.Automation.PSScriptCmdlet.DoProcessRecord(Unknown Source)
        at cli.System.Management.Automation.CommandProcessor.ProcessRecord(Unknown Source)
        at cli.System.Management.Automation.CommandProcessorBase.DoExecute(Unknown Source)
        at cli.System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Unknown Source)
        at cli.System.Management.Automation.PipelineOps.InvokePipeline(Unknown Source)
        at cli.System.Management.Automation.Interpreter.ActionCallInstruction$$00606.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.Interpreter.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.LightLambda.RunVoid1(Unknown Source)
        at cli.System.Management.Automation.DlrScriptCommandProcessor.RunClause(Unknown Source)
        at cli.System.Management.Automation.DlrScriptCommandProcessor.Complete(Unknown Source)
        at cli.System.Management.Automation.CommandProcessorBase.DoComplete(Unknown Source)
        at cli.System.Management.Automation.Internal.PipelineProcessor.DoCompleteCore(Unknown Source)
        at cli.System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Unknown Source)
        at cli.System.Management.Automation.PipelineOps.InvokePipeline(Unknown Source)
        at cli.System.Management.Automation.Interpreter.ActionCallInstruction$$00606.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.Interpreter.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.LightLambda.RunVoid1(Unknown Source)
        at cli.System.Management.Automation.DlrScriptCommandProcessor.RunClause(Unknown Source)
        at cli.System.Management.Automation.DlrScriptCommandProcessor.Complete(Unknown Source)
        at cli.System.Management.Automation.CommandProcessorBase.DoComplete(Unknown Source)
        at cli.System.Management.Automation.Internal.PipelineProcessor.DoCompleteCore(Unknown Source)
        at cli.System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Unknown Source)
        at cli.System.Management.Automation.PipelineOps.InvokePipeline(Unknown Source)
        at cli.System.Management.Automation.Interpreter.ActionCallInstruction$$00606.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.Interpreter.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.LightLambda.RunVoid1(Unknown Source)
        at cli.System.Management.Automation.DlrScriptCommandProcessor.RunClause(Unknown Source)
        at cli.System.Management.Automation.DlrScriptCommandProcessor.Complete(Unknown Source)
        at cli.System.Management.Automation.CommandProcessorBase.DoComplete(Unknown Source)
        at cli.System.Management.Automation.Internal.PipelineProcessor.DoCompleteCore(Unknown Source)
        at cli.System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Unknown Source)
        at cli.System.Management.Automation.PipelineOps.InvokePipeline(Unknown Source)
        at cli.System.Management.Automation.Interpreter.ActionCallInstruction$$00606.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.Interpreter.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.LightLambda.RunVoid1(Unknown Source)
        at cli.System.Management.Automation.DlrScriptCommandProcessor.RunClause(Unknown Source)
        at cli.System.Management.Automation.DlrScriptCommandProcessor.Complete(Unknown Source)
        at cli.System.Management.Automation.CommandProcessorBase.DoComplete(Unknown Source)
        at cli.System.Management.Automation.Internal.PipelineProcessor.DoCompleteCore(Unknown Source)
        at cli.System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Unknown Source)
        at cli.System.Management.Automation.PipelineOps.InvokePipeline(Unknown Source)
        at cli.System.Management.Automation.Interpreter.ActionCallInstruction$$00606.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.Interpreter.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.LightLambda.RunVoid1(Unknown Source)
        at cli.System.Management.Automation.PSScriptCmdlet.RunClause(Unknown Source)
        at cli.System.Management.Automation.PSScriptCmdlet.DoEndProcessing(Unknown Source)
        at cli.System.Management.Automation.CommandProcessorBase.Complete(Unknown Source)
        at cli.System.Management.Automation.CommandProcessorBase.DoComplete(Unknown Source)
        at cli.System.Management.Automation.Internal.PipelineProcessor.DoCompleteCore(Unknown Source)
        at cli.System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Unknown Source)
        at cli.System.Management.Automation.PipelineOps.InvokePipeline(Unknown Source)
        at cli.System.Management.Automation.Interpreter.ActionCallInstruction$$00606.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.Interpreter.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.LightLambda.RunVoid1(Unknown Source)
        at cli.System.Management.Automation.DlrScriptCommandProcessor.RunClause(Unknown Source)
        at cli.System.Management.Automation.DlrScriptCommandProcessor.Complete(Unknown Source)
        at cli.System.Management.Automation.CommandProcessorBase.DoComplete(Unknown Source)
        at cli.System.Management.Automation.Internal.PipelineProcessor.DoCompleteCore(Unknown Source)
        at cli.System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Unknown Source)
        at cli.System.Management.Automation.Runspaces.LocalPipeline.InvokeHelper(Unknown Source)
        at cli.System.Management.Automation.Runspaces.LocalPipeline.InvokeThreadProc(Unknown Source)
        at cli.System.Management.Automation.Runspaces.PipelineThread.WorkerProc(Unknown Source)
Caused by: cli.System.Management.Automation.MethodInvocationException: ╚ёъы■ўхэшх яЁш т√чютх "GetEntity" ё "3" рЁуєьхэЄрьш: "╟ряЁюё с√ы яЁхЁтрэ: ═х єфрыюё№ ёючфрЄ№ чр∙ш∙хээ√щ ърэры SSL/TLS."
        at cli.System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(Unknown Source)
        at cli.System.Management.Automation.ScriptBlock.InvokeWithPipeImpl(Unknown Source)
        at cli.System.Management.Automation.ScriptBlock$$$003C$$003Ec__DisplayClass57_0.<InvokeWithPipe>b__0(Unknown Source)
        at cli.System.Management.Automation.Runspaces.RunspaceBase.RunActionIfNoRunningPipelinesWithThreadCheck(Unknown Source)
        at cli.System.Management.Automation.ScriptBlock.InvokeWithPipe(Unknown Source)
        at cli.System.Management.Automation.ScriptBlock.InvokeAsMemberFunctionT(Unknown Source)
        at net.sf.saxon.dotnet.DotNetURIResolver.dereference(DotNetURIResolver.java:143)
        ... 192 more
Caused by: cli.System.Net.WebException: ╟ряЁюё с√ы яЁхЁтрэ: ═х єфрыюё№ ёючфрЄ№ чр∙ш∙хээ√щ ърэры SSL/TLS.
---------
cli.System.Management.Automation.MethodInvocationException: ╚ёъы■ўхэшх яЁш т√чютх "GetEntity" ё "3" рЁуєьхэЄрьш: "╟ряЁюё с√ы яЁхЁтрэ: ═х єфрыюё№ ёючфрЄ№ чр∙ш∙хээ√щ ърэры SSL/TLS."
        at cli.System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(Unknown Source)
        at cli.System.Management.Automation.ScriptBlock.InvokeWithPipeImpl(Unknown Source)
        at cli.System.Management.Automation.ScriptBlock$$$003C$$003Ec__DisplayClass57_0.<InvokeWithPipe>b__0(Unknown Source)
        at cli.System.Management.Automation.Runspaces.RunspaceBase.RunActionIfNoRunningPipelinesWithThreadCheck(Unknown Source)
        at cli.System.Management.Automation.ScriptBlock.InvokeWithPipe(Unknown Source)
        at cli.System.Management.Automation.ScriptBlock.InvokeAsMemberFunctionT(Unknown Source)
        at net.sf.saxon.dotnet.DotNetURIResolver.dereference(DotNetURIResolver.java:143)
        at net.sf.saxon.functions.DocumentFn.resolveURI(DocumentFn.java:394)
        at net.sf.saxon.functions.DocumentFn.makeDoc(DocumentFn.java:283)
        at net.sf.saxon.functions.Doc.call(Doc.java:114)
        at net.sf.saxon.functions.Doc.<bridge>call(Doc.java:24)
        at net.sf.saxon.expr.FunctionCall.iterate(FunctionCall.java:547)
        at net.sf.saxon.expr.Expression.evaluateItem(Expression.java:849)
        at net.sf.saxon.expr.SimpleStepExpression.iterate(SimpleStepExpression.java:113)
        at net.sf.saxon.expr.SlashExpression.iterate(SlashExpression.java:902)
        at net.sf.saxon.expr.SlashExpression.iterate(SlashExpression.java:902)
        at net.sf.saxon.expr.SingletonAtomizer.evaluateItem(SingletonAtomizer.java:211)
        at net.sf.saxon.expr.SingletonAtomizer.<bridge>evaluateItem(SingletonAtomizer.java:30)
        at net.sf.saxon.expr.CastExpression.evaluateItem(CastExpression.java:397)
        at net.sf.saxon.expr.CastExpression.<bridge>evaluateItem(CastExpression.java:31)
        at net.sf.saxon.expr.parser.Evaluator$4.evaluate(Evaluator.java:86)
        at net.sf.saxon.expr.SystemFunctionCall.evaluateArguments(SystemFunctionCall.java:451)
        at net.sf.saxon.expr.FunctionCall.iterate(FunctionCall.java:545)
        at net.sf.saxon.expr.Expression.evaluateItem(Expression.java:849)
        at net.sf.saxon.expr.parser.Evaluator$4.evaluate(Evaluator.java:86)
        at net.sf.saxon.expr.SystemFunctionCall.evaluateArguments(SystemFunctionCall.java:451)
        at net.sf.saxon.expr.FunctionCall.iterate(FunctionCall.java:545)
        at net.sf.saxon.expr.Expression.evaluateItem(Expression.java:849)
        at net.sf.saxon.expr.Expression.evaluateAsString(Expression.java:908)
        at net.sf.saxon.expr.instruct.SimpleNodeConstructor.processLeavingTail(SimpleNodeConstructor.java:218)
        at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:687)
        at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:152)
        at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:340)
        at net.sf.saxon.expr.instruct.Copy.processLeavingTail(Copy.java:485)
        at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:347)
        at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:505)
        at net.sf.saxon.trans.rules.ShallowCopyRuleSet.process(ShallowCopyRuleSet.java:100)
        at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:509)
        at net.sf.saxon.trans.rules.ShallowCopyRuleSet.process(ShallowCopyRuleSet.java:100)
        at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:509)
        at net.sf.saxon.trans.rules.ShallowCopyRuleSet.process(ShallowCopyRuleSet.java:100)
        at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:509)
        at net.sf.saxon.trans.rules.ShallowCopyRuleSet.process(ShallowCopyRuleSet.java:100)
        at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:509)
        at net.sf.saxon.trans.rules.ShallowCopyRuleSet.process(ShallowCopyRuleSet.java:68)
        at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:509)
        at net.sf.saxon.expr.instruct.ApplyTemplates.apply(ApplyTemplates.java:296)
        at net.sf.saxon.expr.instruct.ApplyTemplates.process(ApplyTemplates.java:249)
        at net.sf.saxon.expr.parser.ExpressionTool.getIteratorFromProcessMethod(ExpressionTool.java:800)
        at net.sf.saxon.expr.instruct.Instruction.iterate(Instruction.java:379)
        at net.sf.saxon.expr.CardinalityChecker.evaluateItem(CardinalityChecker.java:280)
        at net.sf.saxon.expr.ItemChecker.evaluateItem(ItemChecker.java:250)
        at net.sf.saxon.expr.parser.ExpressionTool.evaluate(ExpressionTool.java:329)
        at net.sf.saxon.expr.LetExpression.eval(LetExpression.java:519)
        at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:700)
        at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:347)
        at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:505)
        at net.sf.saxon.expr.instruct.ApplyTemplates.apply(ApplyTemplates.java:296)
        at net.sf.saxon.expr.instruct.ApplyTemplates.process(ApplyTemplates.java:249)
        at net.sf.saxon.expr.parser.ExpressionTool.getIteratorFromProcessMethod(ExpressionTool.java:800)
        at net.sf.saxon.expr.instruct.Instruction.iterate(Instruction.java:379)
        at net.sf.saxon.expr.CardinalityChecker.evaluateItem(CardinalityChecker.java:280)
        at net.sf.saxon.expr.ItemChecker.evaluateItem(ItemChecker.java:250)
        at net.sf.saxon.expr.parser.ExpressionTool.evaluate(ExpressionTool.java:329)
        at net.sf.saxon.expr.LetExpression.eval(LetExpression.java:519)
        at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:700)
        at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:687)
        at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:347)
        at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:505)
        at net.sf.saxon.expr.instruct.ApplyTemplates.apply(ApplyTemplates.java:296)
        at net.sf.saxon.expr.instruct.ApplyTemplates.process(ApplyTemplates.java:249)
        at net.sf.saxon.expr.parser.ExpressionTool.getIteratorFromProcessMethod(ExpressionTool.java:800)
        at net.sf.saxon.expr.instruct.Instruction.iterate(Instruction.java:379)
        at net.sf.saxon.expr.CardinalityChecker.evaluateItem(CardinalityChecker.java:280)
        at net.sf.saxon.expr.ItemChecker.evaluateItem(ItemChecker.java:250)
        at net.sf.saxon.expr.parser.ExpressionTool.evaluate(ExpressionTool.java:329)
        at net.sf.saxon.expr.LetExpression.eval(LetExpression.java:519)
        at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:700)
        at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:687)
        at net.sf.saxon.expr.instruct.NamedTemplate.expand(NamedTemplate.java:267)
        at net.sf.saxon.Controller.callTemplate(Controller.java:2560)
        at cli.Saxon.Api.Xslt30Transformer.CallTemplate(Unknown Source)
        at cli.System.Dynamic.UpdateDelegates.UpdateAndExecute2(Unknown Source)
        at cli.System.Management.Automation.Interpreter.DynamicInstruction$$00603.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.Interpreter.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.LightLambda.RunVoid1(Unknown Source)
        at cli.System.Management.Automation.PSScriptCmdlet.RunClause(Unknown Source)
        at cli.System.Management.Automation.PSScriptCmdlet.DoProcessRecord(Unknown Source)
        at cli.System.Management.Automation.CommandProcessor.ProcessRecord(Unknown Source)
        at cli.System.Management.Automation.CommandProcessorBase.DoExecute(Unknown Source)
        at cli.System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Unknown Source)
        at cli.System.Management.Automation.PipelineOps.InvokePipeline(Unknown Source)
        at cli.System.Management.Automation.Interpreter.ActionCallInstruction$$00606.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.Interpreter.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.LightLambda.RunVoid1(Unknown Source)
        at cli.System.Management.Automation.DlrScriptCommandProcessor.RunClause(Unknown Source)
        at cli.System.Management.Automation.DlrScriptCommandProcessor.Complete(Unknown Source)
        at cli.System.Management.Automation.CommandProcessorBase.DoComplete(Unknown Source)
        at cli.System.Management.Automation.Internal.PipelineProcessor.DoCompleteCore(Unknown Source)
        at cli.System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Unknown Source)
        at cli.System.Management.Automation.PipelineOps.InvokePipeline(Unknown Source)
        at cli.System.Management.Automation.Interpreter.ActionCallInstruction$$00606.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.Interpreter.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.LightLambda.RunVoid1(Unknown Source)
        at cli.System.Management.Automation.DlrScriptCommandProcessor.RunClause(Unknown Source)
        at cli.System.Management.Automation.DlrScriptCommandProcessor.Complete(Unknown Source)
        at cli.System.Management.Automation.CommandProcessorBase.DoComplete(Unknown Source)
        at cli.System.Management.Automation.Internal.PipelineProcessor.DoCompleteCore(Unknown Source)
        at cli.System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Unknown Source)
        at cli.System.Management.Automation.PipelineOps.InvokePipeline(Unknown Source)
        at cli.System.Management.Automation.Interpreter.ActionCallInstruction$$00606.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.Interpreter.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.LightLambda.RunVoid1(Unknown Source)
        at cli.System.Management.Automation.DlrScriptCommandProcessor.RunClause(Unknown Source)
        at cli.System.Management.Automation.DlrScriptCommandProcessor.Complete(Unknown Source)
        at cli.System.Management.Automation.CommandProcessorBase.DoComplete(Unknown Source)
        at cli.System.Management.Automation.Internal.PipelineProcessor.DoCompleteCore(Unknown Source)
        at cli.System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Unknown Source)
        at cli.System.Management.Automation.PipelineOps.InvokePipeline(Unknown Source)
        at cli.System.Management.Automation.Interpreter.ActionCallInstruction$$00606.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.Interpreter.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.LightLambda.RunVoid1(Unknown Source)
        at cli.System.Management.Automation.DlrScriptCommandProcessor.RunClause(Unknown Source)
        at cli.System.Management.Automation.DlrScriptCommandProcessor.Complete(Unknown Source)
        at cli.System.Management.Automation.CommandProcessorBase.DoComplete(Unknown Source)
        at cli.System.Management.Automation.Internal.PipelineProcessor.DoCompleteCore(Unknown Source)
        at cli.System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Unknown Source)
        at cli.System.Management.Automation.PipelineOps.InvokePipeline(Unknown Source)
        at cli.System.Management.Automation.Interpreter.ActionCallInstruction$$00606.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.Interpreter.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.LightLambda.RunVoid1(Unknown Source)
        at cli.System.Management.Automation.PSScriptCmdlet.RunClause(Unknown Source)
        at cli.System.Management.Automation.PSScriptCmdlet.DoEndProcessing(Unknown Source)
        at cli.System.Management.Automation.CommandProcessorBase.Complete(Unknown Source)
        at cli.System.Management.Automation.CommandProcessorBase.DoComplete(Unknown Source)
        at cli.System.Management.Automation.Internal.PipelineProcessor.DoCompleteCore(Unknown Source)
        at cli.System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Unknown Source)
        at cli.System.Management.Automation.PipelineOps.InvokePipeline(Unknown Source)
        at cli.System.Management.Automation.Interpreter.ActionCallInstruction$$00606.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.Interpreter.Run(Unknown Source)
        at cli.System.Management.Automation.Interpreter.LightLambda.RunVoid1(Unknown Source)
        at cli.System.Management.Automation.DlrScriptCommandProcessor.RunClause(Unknown Source)
        at cli.System.Management.Automation.DlrScriptCommandProcessor.Complete(Unknown Source)
        at cli.System.Management.Automation.CommandProcessorBase.DoComplete(Unknown Source)
        at cli.System.Management.Automation.Internal.PipelineProcessor.DoCompleteCore(Unknown Source)
        at cli.System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Unknown Source)
        at cli.System.Management.Automation.Runspaces.LocalPipeline.InvokeHelper(Unknown Source)
        at cli.System.Management.Automation.Runspaces.LocalPipeline.InvokeThreadProc(Unknown Source)
        at cli.System.Management.Automation.Runspaces.PipelineThread.WorkerProc(Unknown Source)
Caused by: cli.System.Net.WebException: ╟ряЁюё с√ы яЁхЁтрэ: ═х єфрыюё№ ёючфрЄ№ чр∙ш∙хээ√щ ърэры SSL/TLS.
        at cli.System.Net.HttpWebRequest.GetResponse(Unknown Source)
        at cli.System.Xml.XmlDownloadManager.GetNonFileStream(Unknown Source)
        at cli.System.Xml.XmlUrlResolver.GetEntity(Unknown Source)
        at IKVM.Internal.ExceptionHelper.toString(Unknown Source)
        at java.lang.StringHelper.valueOf(StringHelper.java:2390)
        at java.lang.StringBuilder.append(StringBuilder.java:128)
        at java.lang.ThrowableHelper.printEnclosedStackTrace(ThrowableHelper.java:271)
        at java.lang.ThrowableHelper.printEnclosedStackTrace(ThrowableHelper.java:287)
        at java.lang.ThrowableHelper.printStackTrace(ThrowableHelper.java:243)
        at java.lang.ThrowableHelper.printStackTrace(ThrowableHelper.java:300)
        at javax.xml.transform.TransformerException.printStackTrace(TransformerException.java:319)
        at javax.xml.transform.TransformerException.printStackTrace(TransformerException.java:288)
        at net.sf.saxon.functions.DocumentFn.resolveURI(DocumentFn.java:402)
        ... 191 more

Error in URI for GetEntiry on doc(). Why doc( uri ) add xslt package @name and @version to uri, when calling GetEntiry?

#11 Updated by Michael Kay about 1 month ago

So, GetEntity is throwing the exception.

I'm afraid I don't understand the question about adding the package @name and @version to the URI - partly because I don't know what these attributes hold, and partly because I have trouble reading the Russian characters. What doc() should do is to resolve the supplied argument (a relative URI) against the static base URI of the stylesheet.

#12 Updated by Sergei Betke about 1 month ago

What doc() should do is to resolve the supplied argument (a relative URI) against the static base URI of the stylesheet.

Yes, but 'http://github.com/test-st-petersburg/DocTemplates/tools/xslt/OODocumentProcessor/oo-preprocessor.xslt' is current xslt:package @name, not a static-base-uri:

<?xml version="1.0" encoding="UTF-8"?><xsl:package version="3.0"
        id="OOPreprocessor"
        name="http://github.com/test-st-petersburg/DocTemplates/tools/xslt/OODocumentProcessor/oo-preprocessor.xslt"
        package-version="2.3.0"
        declared-modes="yes"
        expand-text="no"
        input-type-annotations="strip"
        default-validation="strip"

...

GetEntity called: GetEntity( 'http://github.com/test-st-petersburg/DocTemplates/tools/xslt/OODocumentProcessor/oo-preprocessor.xslt 2.3 file:///C:/Users/sergei.s.betke/Documents/DocTemplates/tmp/template/Письмо ФБУ Тест-С.-Петербург.ott/meta.xml', '', System.IO.Stream ), but doc called doc('file:/C:/Users/sergei.s.betke/Documents/DocTemplates/tmp/template/%D0%9F%D0%B8%D1%81%D1%8C%D0%BC%D0%BE%20%D0%A4%D0%91%D0%A3%20%D0%A2%D0%B5%D1%81%D1%82-%D0%A1.-%D0%9F%D0%B5%D1%82%D0%B5%D1%80%D0%B1%D1%83%D1%80%D0%B3.ott/meta.xml')

And I send to doc absolute uri:

<xsl:attribute name="meta:date" select="
  format-dateTime(
    adjust-dateTime-to-timezone(
       xs:dateTime( doc( resolve-uri(
          '../../../tmp/template/' || iri-to-uri( @xlink:title ) || '.ott' || '/meta.xml',
          base-uri()
       ) )/office:document-meta/office:meta/dc:date ),
       xs:dayTimeDuration( 'PT0H' )
    ),
    '[Y0001]-[M01]-[D01]T[H01]:[m01]:[s01.000000000]'
  )
"/>

#13 Updated by Michael Kay 17 days ago

  • Category set to .NET API
  • Status changed from New to In Progress
  • Assignee set to O'Neil Delpratt
  • Priority changed from Low to Normal

Sorry to drop the ball on this one.

Saxon includes the package name and version along with the absolute URI in the "documentKey" that it uses to index the document in the cached document pool; this is because two different packages might have different xsl:striip-space (etc) options for the same document which will lead to two different versions of the document being held in the pool.

If the URIResolver implements the RelativeURIResolver interface (which the DotNetURIResolver does), then we pass the documentKey to the URIResolver which in the case of the DotNetURIResolver passes it on to the XmlResolver. So I can confirm there's a bug here.

The problem is in DocumentFn.resolveURI() which receives the document key as its third argument and assumes that the document key is the absolute URI of the document, which is no longer the case.

#14 Updated by Michael Kay 4 days ago

I've reproduced this problem using a user-written RelativeURIResolver on the Java platform, and I've got the test case working by changing the key in the document pool from a string concatenation of the absolute URI with package details, to a composite object containing the absolute URI and package details. Need to do regression testing before committing this. This is currently on the 10.1 branch.

#15 Updated by Michael Kay 4 days ago

  • Status changed from In Progress to Resolved
  • Applies to branch 10, trunk added
  • Applies to branch deleted (9.8)
  • Fix Committed on Branch 10, trunk added

Fixed as suggested on the 10.1 and development branches (only).

Please register to edit this issue

Also available in: Atom PDF