-
-
Notifications
You must be signed in to change notification settings - Fork 182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] fn:transform not evaluating global params correctly #4609
Comments
@alanpaxton ;) |
|
java version is a red herring, sorry (I'll remove it): it's running in docker. |
@yamahito The error you are reporting is a transform error. So it is not eXist-db complaining but the stylesheet. The stylesheet says: <xsl:param name="documentID" as="xs:string" select="/tei:TEI/@xml:id"/> So if you do not actively supply a I'd suggest making the type a bit looser, to avoid the error, e.g. |
@PieterLamers, I think you are confusing fn:transform() with transform:transform(). As you can see from the first link, It is a transform error that arises because the
The meaning of the syntax here is that if I do not actively supply a So either there is something wrong with how I'm invoking the stylesheet transformation (please tell me if so), or else it is an issue with |
See also #4386 for background on |
@yamahito I was not aware that |
@yamahito while trying to simplify your issue I find a number of strange things, one being that an XSL is always cached: When I change it it will not change its behavior. Update: I see in the XPath 3.1 spec that this is default behavior, to be changed with |
Thanks @PieterLamers : I wonder if the part you can't reproduce is due to the caching behaviour you point out? I'll try to replicate when I get a chance. |
@yamahito I am not saying (I hope) that I cannot reproduce, I can. I had some problems setting up the transformation because my iterative changes were not picked up because of the default XSL caching behavior. I wanted my own document, because I was seeing nodes with namespaces and thought it might have anything to do with a mismatch. But as I said: |
@yamahito I cannot assign an input-tree-based value to a global variable either. so it appears that there is no context outside of the initial match template. |
@yamahito So, after lots of experimenting in the source,
Question for you (and remember I'm just a Java hacker, fairly ignorant of XSLT and XML)
Depending on whether |
The Regardless, as you are storing it into the database (as an XML Document), when it is retrieved from the database using
document {
<TEI xmlns="http://www.tei-c.org/ns/1.0" xml:id="output">
...
</TEI>
}
document {
<doc>
<TEI xmlns="http://www.tei-c.org/ns/1.0" xml:id="output">
...
</TEI>
</doc>
} |
Closed by #4883 |
Describe the bug
When running a transform using
fn:transform()
, parameters set with a default value (e.g.@select='/*/@xml:id'
) return an error. Possibly this is because the context for the transformation?Additionally, when running the transformation using the
stylesheet-location
option, I get the following error (not sure whether or not it's related):Expected behavior
I expect a successful transformation: here is the output when run with Saxon PE (some whitespace added):
To Reproduce
I've attached a sample collection that can be loaded to exist to replicate.
fn_transform.zip
Context (please always complete the following information):
Additional context
conf.xml
? None relevantThe text was updated successfully, but these errors were encountered: