You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have started to try to integrate your Invisible XML library in my XSLT 3, SaxonJS based fidde at https://martin-honnen.github.io/xslt3fiddle/index-iXML.html. I hope I have understood the documentation and comments in the code fine, I have run into one oddity where I wonder whether your function signature or the type checking in the function can be improved.
Sometimes I expect the input XML of the XSLT transformation to contain a grammar to be parsed in some XML element e.g. in a sample I have
gives me an error Failed to call method function(a){a instanceof Document?(a=Cb(a),a.compile()):(a=(new Db).parse(a),a.compile());return a}.
Is that expected? I am afraid I am not able to infer what the minimized Cb(a) or (new Db).parse(a) are supposed to do or what kind of input they take.
So I need your help to tell me whether the explicit string conversion I needed to do is a wanted requirement or whether you can improve the function/API to do that automagically.
On 25 Jul 2022, at 10:58, martin-honnen ***@***.***> wrote:
Hi John,
I have started to try to integrate your Invisible XML library in my XSLT 3, SaxonJS based fidde at https://martin-honnen.github.io/xslt3fiddle/index-iXML.html. I hope I have understood the documentation and comments in the code fine, I have run into one oddity where I wonder whether your function signature or the type checking in the function can be improved.
Sometimes I expect the input XML of the XSLT transformation to contain a grammar to be parsed in some XML element e.g. in a sample I have
<?xml version="1.0" encoding="utf-8"?>
<html lang="en">
<head>
<title>Saxon-JS 2.4 XSLT 3 and iXML fiddle</title>
</head>
<body>
<section>
<h1>jwiXML Test</h1>
<section>
<h3>Invisible XML example</h3>
<section>
<h4>Grammar</h4>
<pre><code id="grammar1">Countries = Country*.
Country = Name, -'/', Code, -'/', Line, #A?.
Name = ['A'-'Z'],['A'-'Z'].
Code = ['0'-'9'],['0'-'9'],['0'-'9'].
Line = ['0'-'9'],['0'-'9'].</code>
</pre>
<h4>Sample data</h4>
<pre><code id="data">UK/006/10
US/004/12</code></pre>
</section>
</section>
</section>
</body>
</html>
and then it "only" works fine to pass the string value of that code id="grammar1" element to the jwL:compileGrammar function, i.e. doing
<xsl:sequence
***@***.*** = 'grammar1']/string()), ***@***.*** = 'data'])?tree"/>
works fine, however simply passing the element node, as in
<xsl:sequence
***@***.*** = 'grammar1']), ***@***.*** = 'data'])?tree"/>
gives me an error Failed to call method function(a){a instanceof Document?(a=Cb(a),a.compile()):(a=(new Db).parse(a),a.compile());return a}.
Is that expected? I am afraid I am not able to infer what the minimized Cb(a) or (new Db).parse(a) are supposed to do or what kind of input they take.
So I need your help to tell me whether the explicit string conversion I needed to do is a wanted requirement or whether you can improve the function/API to do that automagically.
Full examples are: failure , success.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
Hi John,
I have started to try to integrate your Invisible XML library in my XSLT 3, SaxonJS based fidde at https://martin-honnen.github.io/xslt3fiddle/index-iXML.html. I hope I have understood the documentation and comments in the code fine, I have run into one oddity where I wonder whether your function signature or the type checking in the function can be improved.
Sometimes I expect the input XML of the XSLT transformation to contain a grammar to be parsed in some XML element e.g. in a sample I have
and then it "only" works fine to pass the string value of that
code id="grammar1"
element to thejwL:compileGrammar
function, i.e. doingworks fine, however simply passing the element node, as in
gives me an error
Failed to call method function(a){a instanceof Document?(a=Cb(a),a.compile()):(a=(new Db).parse(a),a.compile());return a}
.Is that expected? I am afraid I am not able to infer what the minimized
Cb(a)
or(new Db).parse(a)
are supposed to do or what kind of input they take.So I need your help to tell me whether the explicit string conversion I needed to do is a wanted requirement or whether you can improve the function/API to do that automagically.
Full examples are: failure , success.
The text was updated successfully, but these errors were encountered: