|
|
|
[
Permlink
| « Hide
]
Jim Grandy - 21/Feb/07 11:25 AM
Tucker will test the new DTD.
Moving to Osprey; too risky to do this now for OL4
This bug should be broken into two parts:
1: For every release, we need to publish the namespace for that release. That is, we need to change the default namespace in lzx.rnc (just has HTML has an HTML 4.0 namespace and an HTML 4.1 namespace). And, for every release we need to rebuild the tools/lzx+libraries.rnc files, so people with syntax-aware editors can correctly edit LZX files. 2: We should publish the DTD's and LFC's in a known location (just as the W3C dtd's for the various *ML's are published). My point being, that part 1 is a 'must have', and I don't think very risky. Part 2, is for extra credit and risky if we make our default wrappers actually try to do something with the published LFC.
See also
Date: Thu, 12 Apr 2007 14:36:07 +0100
From: "Fennell, Philip" <philip.fennell@hp.com> Subject: [Laszlo-user] More on namespaces and XML schema... Hello again, Seeing as the link in the documentation (running under tomcat) for lzx.dtd returns a 404 error I had to do a bit of searching around on the net. There's a link on the wiki, under 'Editing LZX' that is also broken too. So initialy I tried using the XML Schema (lzx.xsd) and noticed immediately: 1) That the form and window elements are not defined in the schema. 2) There are errors in the schema too: In the definition of the element 'preloadresource' the name and resource attributes are also declared elsewhere in attributeGroup declarations referenced directly and indirectly by this element declaration. 3) If you put the appropriate markup, in the root of you canvas document, to identify the schema: <canvas xmlns="http://www.laszlosystems.com/2003/05/lzx" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.laszlosystems.com/2003/05/lzx ../schema/lzx.xsd" width="1024" height="768"> ... </canvas> You get the following error message form the compiler: The application could not be compiled due to the following errors: Compilation Errors form.lzx:10:22: Syntax error: the token ":" was not expected at this position. Compilation Warnings form.lzx:10:22: attribute "schemaLocation" from namespace "http://www.w3.org/2001/XMLSchema-instance" not allowed at this point; ignored form.lzx:10:22: found an unknown attribute named "schemaLocation" on element canvas, check the spelling of this attribute name This would suggest that not only is Open Laszlo not XML namespace aware (see previous e-mail) but neither is it XML Schema aware either. Its not that I'm being picky for picky's sake, I actually like what I've seen of Open Laszlo so far. Its just that things I'd want and expect to work don't. Regards Philip Fennell This is a gap in our release process, which we really need to address for 4.x. We have not done this correctly since 2.x. Henry's recent work on the schema replacement (see
I'm getting the same compilation error mentioned above when I have a canvas declaration as follows:
<?xml version="1.0" encoding="UTF-8"?> <canvas xmlns="http://www.laszlosystems.com/2003/05/lzx" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.laszlosystems.com/2003/05/lzx /lzx.xsd" bgcolor="0xa0acb8"> </canvas> Also notice that I am pointing to a local version of lzx.xsd. I could not use a canonical version like http://www.openlaszlo.org/lps4.1/tools/lzx.xsd because the eclipse schema parser complained with validation errors. With the above canvas tag and my modified lzx.xsd I get element completion with Eclipse's inbuilt XML editor (Eclipse version 3.4). Of course I still can't use this approach because xsi:schemaLocation causes compilation problems. My local lzx.xsd modifications are: --- lzx.xsd.orig 2008-07-12 09:59:31.000000000 +1200 +++ lzx.xsd 2008-07-17 10:53:13.000000000 +1200 @@ -1088,10 +1088,6 @@ <xs:sequence> <xs:element name="font"> <xs:complexType> - <xs:choice minOccurs="0"> - <xs:element minOccurs="0" maxOccurs="unbounded" ref="lzx:face"/> - <xs:element maxOccurs="unbounded" ref="lzx:face"/> - </xs:choice> <xs:attributeGroup ref="lzx:nameAttribute"/> <xs:attributeGroup ref="lzx:deviceAttribute"/> <xs:attribute name="src" type="xs:anyURI"> @@ -1421,14 +1417,12 @@ </xs:element> <xs:element name="preloadresource"> <xs:complexType> - <xs:attribute name="name" type="xs:token"/> <xs:attribute name="ratio" type="xs:string"/> <xs:attribute name="synctoload" use="required" type="lzx:booleanLiteral"/> <xs:attribute name="hideafterinit" use="required" type="lzx:booleanLiteral"/> <xs:attribute name="center" use="required" type="lzx:booleanLiteral"/> <xs:attribute name="synchronized" type="lzx:booleanLiteral"/> <xs:attribute name="lastframe" type="lzx:numberLiteral"/> - <xs:attribute name="resource" type="xs:string"/> <xs:attribute name="resourcename" type="xs:string"/> <xs:attributeGroup ref="lzx:viewAttributes"/> </xs:complexType> |
||||||||||||||||||||||||||||||||||||||||||||||||