Hello Alain,
Sorry the delay, I am been very busy and as I found a workaround I
didn't find any time to prepare it.
Now here is it
First the xforms code
<?xml-stylesheet type="text/xsl" href="../xsltforms/xsltforms.xsl"?>
<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:xf="http://www.w3.org/2002/xforms">
<head>
<xf:model schema="pattern-bug.xsd">
<xf:instance id="test">
<dummy xmlns=""/>
</xf:instance>
</xf:model>
</head>
<body>some text</body>
</html>
and the pattern-bug.xsd file
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:simpleType name="mypattern">
<xs:restriction base="xs:string">
<xs:pattern value="./."/> <!-- the problem is the unescaped
slash -->
</xs:restriction>
</xs:simpleType>
</xs:schema>
It give a xsltform exception in FF and Chrome
Incorrect Javascript code generation:
ReferenceError: xsltforms_initImpl is not defined
at xsltforms_init
(http://localhost:8984/static/test/pattern-bug.xml:55:1)
at onload (http://localhost:8984/static/test/pattern-bug.xml:60:175)
ReferenceError
xsltforms_initImpl is not defined
The workaround is to escape the slash.
Thank you
Isidro
On 10/25/2013 04:36 PM, Alain Couthures wrote:
Hello Isidro,
The fastest way for having bugs fixed in XSLTForms is to provide a
minimal test case. Is it possible for you?
Thanks!
-Alain
Le 25/10/2013 11:36, Isidro Vila Verde a écrit :
Dear Xsltforms developers,
I am developing a invoice system with xsltforms and I came to a point
where I am stuck. I need generate invoices valid against a very large
and out of my control XML schema.
Unfortunately that schema use some patterns which includes slashes
without escape them, for instance "[^ ]+ [^/^ ]+/[0-9]+".
My question is: Can you, please, change the patterns delimiters in
xslftforms.js using for example the object RegExp instead of // ? I
think could help me a lot.
Thank you
Isidro
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Xsltforms-support mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xsltforms-support