<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0">
  <channel>
    <title>
Altova Mailing List: xmlschema-dev
    </title>
    <link>http://www.altova.com/</link>
    <description>Altova accelerates application development and data management projects with software and solutions that enhance productivity and maximize results. As an innovative, customer-focused company and the creator of XMLSpy and other leading XML, data administration, UML, and Web services tools, Altova is the choice of over 3 million clients worldwide, including virtually every Fortune 500 company. With customers ranging from vast development teams in the worldâ€™s largest organizations to progressive one-person shops, Altovaâ€™s line of software applications fulfills a broad spectrum of business needs. Altova is an active member of the World Wide Web Consortium (W3C) and Object Management Group (OMG) and is committed to delivering standards-based platform-independent solutions that are powerful, affordable, and easy to use. Altova was founded in 1992 and has headquarters in Beverly, Massachusetts and Vienna, Austria.</description>
    <language>en-us</language>
    <copyright>Copyright Â© 2005, 2006, 2007 Altova GmbH. All rights reserved. Altova, XMLSpy, MapForce, StyleVision, SemanticWorks, SchemaAgent, UModel, DiffDog, and Authentic are trademarks and/or registered trademarks of Altova GmbH in the United States and/or other countries. The names of and reference to other companies and products mentioned herein may be the trademarks of their respective owners.</copyright>
    <pubDate>Tue, 03 Jun 2008 10:00:00 EDT</pubDate>
    <lastBuildDate>Tue, 03 Jun 2008 10:00:00 EDT</lastBuildDate>
    <generator>Authentic RSS Editor, visit www.altova.com for details</generator>
    <managingEditor>pr@altova.com</managingEditor>
    <webMaster>webmaster@altova.com</webMaster>
    <image>
      <url>http://www.altova.com/images/logos/altova_right_120.gif</url>
      <title>ALTOVA</title>
      <link>http://www.altova.com/</link>
      <width>120</width>
      <height>24</height>
      <description>Altova Logo</description>
    </image>

<item>
<title>Re: XML/XSD Binder for C++ - 9/4/2010 9:07:00 AM</title>
<description><![CDATA[<pre>Hi Scott,

We offer an XML/XSD binder for C++.  You are welcome to download an 
evaluation copy from:

http://www.codalogic.com/lmx/download.php

If I can be of further help, please let me know.

Thanks,

Pete Cordell
Codalogic Ltd
Interface XML to C++ the easy way using XML C++
data binding to convert XSD schemas to C++ classes.
Visit http://codalogic.com/lmx/ or http://www.xml2cpp.com
for more info
----- Original Message ----- 
From: &quot;Tsao, Scott&quot; &lt;scott.tsao@boeing.com&gt;
To: &lt;xmlschema-dev@w3.org&gt;
Sent: Friday, September 03, 2010 11:22 PM
Subject: XML/XSD Binder for C++


We're looking for an XML/XSD binder for C++.  Ideally, we'd like to see a 
tool like JAXB, which is used with java.

Any suggestions?

Thanks,

Scott Tsao $BAbThT&quot;(B
Associate Technical Fellow
The Boeing Company</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/201009/msg1000315011.html</link>
</item><item>
<title>XML/XSD Binder for C++ - 9/3/2010 10:26:00 PM</title>
<description><![CDATA[<pre>We're looking for an XML/XSD binder for C++.  Ideally, we'd like to see a tool like JAXB, which is used with java.

Any suggestions?

Thanks,

Scott Tsao $BAbThT&quot;(B
Associate Technical Fellow
The Boeing Company</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/201009/msg1000315010.html</link>
</item><item>
<title>Re: Unique Particle Attribution with xsd:any and xsd:element with  - 9/1/2010 3:02:00 PM</title>
<description><![CDATA[<pre>Michael rightly wrote that in your schema, the wild-card and the
element particles are in same namespace, so you're getting a UPA
violation.

Here's probably a solution (one of the solutions I guess :)) with few
sample XML and schema documents, which could solve the problem for
you.

test.xsd
&lt;xsd:schema xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot;
                     targetNamespace=&quot;some-A&quot;
                     xmlns:tns=&quot;some-A&quot;
                     xmlns:fault=&quot;some-B&quot;
                     elementFormDefault=&quot;qualified&quot;&gt;

   &lt;xsd:import namespace=&quot;some-B&quot; schemaLocation=&quot;fault.xsd&quot; /&gt;

   &lt;xsd:element name=&quot;MyResponse&quot;&gt;
       &lt;xsd:complexType&gt;
           &lt;xsd:choice&gt;
              &lt;xsd:any namespace=&quot;##targetNamespace&quot; processContents=&quot;lax&quot; /&gt;
              &lt;xsd:element ref=&quot;fault:Fault&quot; /&gt;
           &lt;/xsd:choice&gt;
       &lt;/xsd:complexType&gt;	
   &lt;/xsd:element&gt;

&lt;/xsd:schema&gt;

fault.xsd
&lt;xsd:schema xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot;
                     targetNamespace=&quot;some-B&quot;
		     xmlns:fault=&quot;some-B&quot;
                     elementFormDefault=&quot;qualified&quot;&gt;

   &lt;xsd:element name=&quot;Fault&quot; type=&quot;xsd:integer&quot; /&gt;

&lt;/xsd:schema&gt;

test1.xml
&lt;MyResponse xmlns=&quot;some-A&quot;&gt;
     &lt;Fault&gt;
        &lt;Message&gt;test message&lt;/Message&gt;
     &lt;/Fault&gt;
&lt;/MyResponse&gt;

test2.xml
&lt;MyResponse xmlns=&quot;some-A&quot;&gt;
     &lt;Fault xmlns=&quot;some-B&quot;&gt;test message&lt;/Fault&gt;
&lt;/MyResponse&gt;

Here are the validation outcomes for above examples, with Xerces XML
Schema 1.0 engine:
1. Validating test1.xml with test.xsd successfully passes the
validation (here the child of 'MyResponse' is validated by the
wild-card)
2. Validating test2.xml with test.xsd gives following error,
[Error] test2.xml:2:45: cvc-datatype-valid.1.2.1: 'test message' is
not a valid value for 'integer'.
[Error] test2.xml:2:45: cvc-type.3.1.3: The value 'test message' of
element 'Fault' is not valid.
(here the child of 'MyResponse' is validated by the element
declaration in fault.xsd)

I hope this helps.

On Tue, Aug 31, 2010 at 8:03 PM, janne postilista
&lt;jannepostilistat@gmail.com&gt; wrote:
&gt; Hi,
&gt;
&gt; &#194;&#160;I am trying to create a choice with either a xsd:any from namespace A
&gt; or xsd:element from namespace B. I think that because they are from
&gt; different namespaces there should be no ambiguity, am I wrong?
&gt;
&gt; My schema:
&gt;
&gt; &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&gt;
&gt; &lt;xsd:schema xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot;
&gt; &#194;&#160; &#194;&#160;targetNamespace=&quot;some-A&quot;
&gt; &#194;&#160; &#194;&#160;xmlns:tns=&quot;some-A&quot;
&gt; &#194;&#160; &#194;&#160;xmlns:fault=&quot;some-B&quot;
&gt; &#194;&#160; &#194;&#160;elementFormDefault=&quot;qualified&quot; &gt;
&gt;
&gt; &#194;&#160; &#194;&#160;&lt;xsd:import namespace=&quot;some-B&quot;
&gt; &#194;&#160; &#194;&#160;schemaLocation=&quot;fault.xsd&quot; /&gt;
&gt;
&gt; &#194;&#160; &#194;&#160;&lt;xsd:element name=&quot;MyResponse&quot;&gt;
&gt; &#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160;&lt;xsd:complexType&gt;
&gt; &#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160;&lt;xsd:choice&gt;
&gt; &#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160;&lt;xsd:any namespace=&quot;##targetNamespace&quot;/&gt;
&gt; &#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160;&lt;xsd:element name=&quot;Fault&quot; type=&quot;fault:FaultType&quot; /&gt;
&gt; &#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160;&lt;/xsd:choice&gt;
&gt; &#194;&#160; &#194;&#160; &#194;&#160; &#194;&#160;&lt;/xsd:complexType&gt;
&gt; &#194;&#160; &#194;&#160;&lt;/xsd:element&gt;
&gt;
&gt; When validating I get
&gt;
&gt;
&gt; XML validation started.
&gt; D:/zzz.xsd:33,8
&gt; ERROR: cos-nonambig: WC[&quot;some-A&quot;] and &quot;hsome-A&quot;:Fault (or elements
&gt; from their substitution group) violate &quot;Unique Particle Attribution&quot;.
&gt; During validation against this schema, ambiguity would be created for
&gt; those two particles.
&gt;
&gt; 1 Error(s), &#194;&#160;0 Warning(s).
&gt; XML validation finished.
&gt;
&gt; What is the problem?



-- 
Regards,
Mukul Gandhi</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/201009/msg1000314964.html</link>
</item><item>
<title>Re: Unique Particle Attribution with xsd:any and xsd:element with   - 9/1/2010 8:10:00 AM</title>
<description><![CDATA[<pre>On 31/08/2010 3:33 PM, janne postilista wrote:
&gt; Hi,
&gt;
&gt;   I am trying to create a choice with either a xsd:any from namespace A
&gt; or xsd:element from namespace B. I think that because they are from
&gt; different namespaces there should be no ambiguity, am I wrong?

But they aren't in different namespaces. Both the element particle and 
the wildcard particle are in namespace some-A.

Michael Kay
Saxonica
&gt; My schema:
&gt;
&gt; &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&gt;
&gt; &lt;xsd:schema xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot;
&gt;      targetNamespace=&quot;some-A&quot;
&gt;      xmlns:tns=&quot;some-A&quot;
&gt;      xmlns:fault=&quot;some-B&quot;
&gt;      elementFormDefault=&quot;qualified&quot;&gt;
&gt;
&gt;      &lt;xsd:import namespace=&quot;some-B&quot;
&gt;      schemaLocation=&quot;fault.xsd&quot; /&gt;
&gt;
&gt;      &lt;xsd:element name=&quot;MyResponse&quot;&gt;
&gt;          &lt;xsd:complexType&gt;
&gt;                  &lt;xsd:choice&gt;
&gt;                      &lt;xsd:any namespace=&quot;##targetNamespace&quot;/&gt;
&gt;                      &lt;xsd:element name=&quot;Fault&quot; type=&quot;fault:FaultType&quot; /&gt;
&gt;                  &lt;/xsd:choice&gt;
&gt;          &lt;/xsd:complexType&gt;
&gt;      &lt;/xsd:element&gt;
&gt;
&gt; When validating I get
&gt;
&gt;
&gt; XML validation started.
&gt; D:/zzz.xsd:33,8
&gt; ERROR: cos-nonambig: WC[&quot;some-A&quot;] and &quot;hsome-A&quot;:Fault (or elements
&gt; from their substitution group) violate &quot;Unique Particle Attribution&quot;.
&gt; During validation against this schema, ambiguity would be created for
&gt; those two particles.
&gt;
&gt; 1 Error(s),  0 Warning(s).
&gt; XML validation finished.
&gt;
&gt; What is the problem?
&gt;
&gt;
&gt;</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/201009/msg1000314950.html</link>
</item><item>
<title>Unique Particle Attribution with xsd:any and xsd:element with  - 9/1/2010 7:59:00 AM</title>
<description><![CDATA[<pre>Hi,

 I am trying to create a choice with either a xsd:any from namespace A
or xsd:element from namespace B. I think that because they are from
different namespaces there should be no ambiguity, am I wrong?

My schema:

&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;

&lt;xsd:schema xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot;
    targetNamespace=&quot;some-A&quot;
    xmlns:tns=&quot;some-A&quot;
    xmlns:fault=&quot;some-B&quot;
    elementFormDefault=&quot;qualified&quot; &gt;

    &lt;xsd:import namespace=&quot;some-B&quot;
    schemaLocation=&quot;fault.xsd&quot; /&gt;

    &lt;xsd:element name=&quot;MyResponse&quot;&gt;
        &lt;xsd:complexType&gt;
                &lt;xsd:choice&gt;
                    &lt;xsd:any namespace=&quot;##targetNamespace&quot;/&gt;
                    &lt;xsd:element name=&quot;Fault&quot; type=&quot;fault:FaultType&quot; /&gt;
                &lt;/xsd:choice&gt;
        &lt;/xsd:complexType&gt;
    &lt;/xsd:element&gt;

When validating I get


XML validation started.
D:/zzz.xsd:33,8
ERROR: cos-nonambig: WC[&quot;some-A&quot;] and &quot;hsome-A&quot;:Fault (or elements
from their substitution group) violate &quot;Unique Particle Attribution&quot;.
During validation against this schema, ambiguity would be created for
those two particles.

1 Error(s),  0 Warning(s).
XML validation finished.

What is the problem?</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/201009/msg1000314947.html</link>
</item><item>
<title>Re: Help on XML Schema generation using XSLT - 8/31/2010 3:31:00 PM</title>
<description><![CDATA[<pre>On 31/08/2010 3:50 PM, Silent lights wrote:
&gt; Hi there,
&gt; I am trying to solve one issue here.. How do I check for the data type for an element and its attribute..
&gt;
&gt; I tried something like,
&gt;
&gt; &lt;xsl:if test=&quot;not(string(.) castable as xs:integer)&quot;&gt;
&gt;        &lt;xsl:text&gt;Following value is not an integer:&lt;/xsl:text&gt;
&gt;        &lt;xsl:value-of select=&quot;.&quot;/&gt;
&gt;      &lt;/xsl:if&gt;
&gt;
&gt; but looks like it doesnt work on XSLT 1.0 and XPath 1.0.. Is there a way to check the data type for integer, decimal, string and boolean perhaps ?
&gt;
There's no easy way in XSLT 1.0. You'll have to do it the hard way, by 
actually parsing the value against the lexical rules, using the limited 
machinery available of translate(), substring-before(), 
substring-after(), and so on. You could start by testing to see whether 
number(x) returns NaN.

Michael Kay
Saxonica</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/201008/msg1000314934.html</link>
</item><item>
<title>Re: Help on XML Schema generation using XSLT - 8/31/2010 2:59:00 PM</title>
<description><![CDATA[<pre>Hi there,
I am trying to solve one issue here.. How do I check for the data type for an element and its attribute..

I tried something like,

&lt;xsl:if test=&quot;not(string(.) castable as xs:integer)&quot;&gt;
      &lt;xsl:text&gt;Following value is not an integer: &lt;/xsl:text&gt;
      &lt;xsl:value-of select=&quot;.&quot;/&gt;
    &lt;/xsl:if&gt;

but looks like it doesnt work on XSLT 1.0 and XPath 1.0.. Is there a way to check the data type for integer, decimal, string and boolean perhaps ?

thanks
Densil


--- On Fri, 20/8/10, Matthieu Ricaud-Dussarget &lt;matthieu.ricaud@igs-cp.fr&gt; wrote:

&gt; From: Matthieu Ricaud-Dussarget &lt;matthieu.ricaud@igs-cp.fr&gt;
&gt; Subject: Re: Help on XML Schema generation using XSLT
&gt; To: &quot;Michael Kay&quot; &lt;mike@saxonica.com&gt;
&gt; Cc: &quot;Cheney, Edward A SSG RES USAR USARC&quot; &lt;austin.cheney@us.army.mil&gt;, &quot;Silent lights&quot; &lt;silentlights@yahoo.co.uk&gt;, xmlschema-dev@w3.org
&gt; Date: Friday, 20 August, 2010, 12:50
&gt; Hi Densil,
&gt; 
&gt; I think it's a pretty good idea, especially the one to use
&gt; a collection of xml file to better detect the global XML
&gt; structure. We can admit the assertion that if one need a
&gt; schema, it means that we should have more than one file on
&gt; this type.
&gt; XSLT, as functionnal language may be quite helpful, and
&gt; using XSLT2 might help more. And as long as I know, if you
&gt; use a Java XSLT processor, you can call java classes within
&gt; your xslt. Then you are no more restricted
&gt; functionnal/procedural (but well your xslt will not be
&gt; plateform independant anymore...).
&gt; 
&gt; Do you already now what kind of &quot;schema&quot; you like to
&gt; generate ?
&gt; It might be a very different analyse in case you want to
&gt; generate a DTD, a W3C-schema or a RelaxNG one.
&gt; 
&gt; I've done something similar for Relax NG, but it's a dummy
&gt; XSLT&#160; : it only generate elements with attributes in
&gt; the order then come, no guesswork.. euh heuristics ;)
&gt; But within the xml input you can add a few lines of RelaxNg
&gt; which will be reproduced (within the generated elements or
&gt; inverse).
&gt; It don't think it's what you want. Its actually just a tool
&gt; to write schema easyer and faster, because one only interact
&gt; with the structure logic, not the obvisous things. But you
&gt; can customize everythings (the more you do, the less
&gt; automatic it is, and finaly your could almost write the
&gt; schema yourself in the xml and the tool become unusefull)
&gt; 
&gt; And at last, I think XMLspy has a W3C-schema generator, I
&gt; don't know how it is implemented.
&gt; Jedit has a DTD generator (XML plugin), which might be
&gt; written in java (or/and XSLT ?) and is open source :)
&gt; 
&gt; Let us know about this interresting project.
&gt; 
&gt; Matthieu Ricaud-Dussarget.
&gt; Le 20/08/2010 10:22, Michael Kay a &#233;crit :
&gt; &gt; On 20/08/2010 00:58, Cheney, Edward A SSG RES USAR
&gt; USARC wrote:
&gt; &gt;&gt; Densil,
&gt; &gt;&gt; 
&gt; &gt;&gt; I would say converting a basic XML document to a
&gt; schema document is not probable unless there exists a
&gt; certain quantity of known information
&gt; &gt; 
&gt; &gt; 
&gt; &gt; Actually there are a number of tools that do a quite
&gt; passable job of generating a schema from an instance,
&gt; including my own DTDGenerator from many years ago (still
&gt; available on the Saxon page at Sourceforge). It demands some
&gt; guesswork (or if we want to be more polite, heuristics) but
&gt; it's possible to do a surprisingly good job. For example, my
&gt; DTDGenerator uses ruled like &quot;generate an enumeration type
&gt; if there are less than 20 distinct values and the number of
&gt; actual values is at least ten times the number of distinct
&gt; values&quot;. Of course the inferred schema will always be
&gt; imperfect (it will allow some &quot;invalid&quot; documents, and
&gt; disallow some &quot;valid&quot; ones, where &quot;validity&quot; is in the eye
&gt; of the user) so it will need manual adjustment.
&gt; &gt; 
&gt; &gt; Although there are quite a few such tools around, I'm
&gt; not aware of any that are implemented in XSLT. But I think
&gt; it would be perfectly reasonable to attempt to write one in
&gt; XSLT.
&gt; &gt; 
&gt; &gt; I've always thought it would be a good idea for such a
&gt; tool to allow multiple source instances to be supplied as
&gt; input. In practice I've handled this by concatenating them
&gt; within a wrapper element.
&gt; &gt; 
&gt; &gt; Michael Kay
&gt; &gt; Saxonica
&gt; &gt; 
&gt; &gt; 
&gt; 
&gt; 
&gt; -- Matthieu Ricaud
&gt; IGS-CP
&gt; Service Livre num&#233;rique
&gt; 
&gt; 
&gt;</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/201008/msg1000314932.html</link>
</item><item>
<title>Re: How to make simple type choice - 8/27/2010 10:16:00 PM</title>
<description><![CDATA[<pre>You can use xs:assert for this, but conditional type assignment is 
probably a closer fit to the requirement - it's specifically designed to 
allow you to validate the element contentagainst a type chosen on the 
basis of the value of an attribute

&lt;xs:element name=&quot;queries&quot;&gt;
&lt;xs:alternative test=&quot;@name='test1'&quot; type=&quot;type1&quot;/&gt;
&lt;xs:alternative type=&quot;type2&quot;/&gt;
&lt;/xs:element&gt;

On the other hand, I often find xs:assert easier even in cases like 
this. Here it would be something like this:

&lt;xs:assert test=&quot;every $q in query satisfies
                                    $q/@name = if (@name='test1')
                                                            then 
('somename1', 'somename2')
                                                            else 
('somename2', 'somename3')&quot;/&gt;

Note, with Saxon it's always a good idea to express assertions using 
&quot;every X satisfies&quot;, because Saxon treats them specially from the point 
of view of diagnostics - you will get a list of the query elements (with 
line numbers) that don't satisfy the condition.

Michael Kay
Saxonica


On 27/08/2010 10:11 PM, Karl Stubsjoen wrote:
&gt; I need to make a choice between various simple types for an attribute.
&gt;   The xml may look something like this:
&gt;
&gt; &lt;project&gt;
&gt; &lt;queries name=&quot;test1&quot;&gt;
&gt;    &lt;query name=&quot;somename1&quot;&gt;&lt;/query&gt;
&gt;    &lt;query name=&quot;samename2&quot;&gt;&lt;/query&gt;
&gt; &lt;/queries&gt;
&gt; &lt;queries name=&quot;test2&quot;&gt;
&gt;    &lt;query name=&quot;somename2&quot;&gt;&lt;/query&gt;
&gt;    &lt;query name=&quot;samename3&quot;&gt;&lt;/query&gt;
&gt; &lt;/queries&gt;
&gt; &lt;/project&gt;
&gt;
&gt; So basically a queries node named &quot;test1&quot; will have a query node with
&gt; an enumeration restriction of:
&gt; somename1
&gt; somename2
&gt;
&gt; And, a queries node named 'test2&quot; will have a query node with an
&gt; enumeration restriction of:
&gt; somename2
&gt; somename3
&gt;
&gt; How do you achieve this?  I'm looking at xs:assert but not sure I'm on
&gt; the right path.
&gt; Thanks,
&gt; Karl..
&gt;
&gt;</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/201008/msg1000314886.html</link>
</item><item>
<title>How to make simple type choice - 8/27/2010 9:14:00 PM</title>
<description><![CDATA[<pre>I need to make a choice between various simple types for an attribute.
&#160;The xml may look something like this:

&lt;project&gt;
&lt;queries name=&quot;test1&quot;&gt;
&#160;&#160;&lt;query name=&quot;somename1&quot;&gt;&lt;/query&gt;
&#160;&#160;&lt;query name=&quot;samename2&quot;&gt;&lt;/query&gt;
&lt;/queries&gt;
&lt;queries name=&quot;test2&quot;&gt;
&#160;&#160;&lt;query name=&quot;somename2&quot;&gt;&lt;/query&gt;
&#160;&#160;&lt;query name=&quot;samename3&quot;&gt;&lt;/query&gt;
&lt;/queries&gt;
&lt;/project&gt;

So basically a queries node named &quot;test1&quot; will have a query node with
an enumeration restriction of:
somename1
somename2

And, a queries node named 'test2&quot; will have a query node with an
enumeration restriction of:
somename2
somename3

How do you achieve this? &#160;I'm looking at xs:assert but not sure I'm on
the right path.
Thanks,
Karl..</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/201008/msg1000314884.html</link>
</item><item>
<title>RE: RE: Difficult logical relationship in complex type - 8/25/2010 5:06:00 PM</title>
<description><![CDATA[<pre>Thanks, Austin.

Mr. Sperberg-McQueen helped me work out a solution, as follows:

&lt;xsd:complexType name=&quot;abcd&quot;&gt;
   &lt;xsd:sequence&gt;
     &lt;xsd:element ref=&quot;tns:A&quot; minOccurs=&quot;0&quot; maxOccurs=&quot;unbounded&quot;/&gt;
     &lt;xsd:choice&gt;
       &lt;xsd:element ref=&quot;tns:B&quot;/&gt;
       &lt;xsd:element ref=&quot;tns:C&quot;/&gt;
       &lt;xsd:element ref=&quot;tns:D&quot;/&gt;
     &lt;/xsd:choice&gt;
     &lt;xsd:choice minOccurs=&quot;0&quot; maxOccurs=&quot;unbounded&quot;&gt;
       &lt;xsd:element ref=&quot;tns:A&quot;/&gt;
       &lt;xsd:element ref=&quot;tns:B&quot;/&gt;
       &lt;xsd:element ref=&quot;tns:C&quot;/&gt;
       &lt;xsd:element ref=&quot;tns:D&quot;/&gt;
     &lt;/xsd:choice&gt;
   &lt;/xsd:sequence&gt;
  &lt;/xsd:complexType&gt;

This achieves what I was after, which was:
1) Empty not allowed
2) No enforced sequence
3) A is optional, but only if B, C, or D
4) maxOccurs unbounded for A, B, C, and D

David

-----Original Message-----
From: xmlschema-dev-request@w3.org [mailto:xmlschema-dev-request@w3.org] On Behalf Of Cheney, Edward A SSG RES USAR
Sent: Wednesday, August 25, 2010 9:23 AM
To: xmlschema-dev@w3.org
Subject: Re: RE: Difficult logical relationship in complex type

Here is what I would do:

&lt;xs:complexType&gt;
  &lt;xs:choice&gt;
    &lt;xs:choice&gt;
      &lt;xs:choice maxOccurs=&quot;unbounded&quot;&gt;
        &lt;xs:element ref=&quot;b&quot;/&gt;
        &lt;xs:element ref=&quot;c&quot;/&gt;
        &lt;xs:element ref=&quot;d&quot;/&gt;
      &lt;/xs:choice&gt;
      &lt;xs:element ref=&quot;a&quot;/minOccurs=&quot;0&quot; maxOccurs=&quot;unbounded&quot;/&gt;
    &lt;/xs:choice&gt;
    &lt;xs:choice maxOccurs=&quot;unbounded&quot;&gt;
      &lt;xs:element ref=&quot;b&quot;/&gt;
      &lt;xs:element ref=&quot;c&quot;/&gt;
      &lt;xs:element ref=&quot;d&quot;/&gt;
    &lt;/xs:choice&gt;
  &lt;/xs:choice&gt;
&lt;/xs:complexType&gt;

Does that satisfy the requirements?  If that does not work please let me know what are the additional requirements I am sure I can find a way to make it work even if it does become a bit lengthy.

Austin
http://prettydiff.com/</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/201008/msg1000314810.html</link>
</item><item>
<title>Re: RE: Difficult logical relationship in complex type - 8/25/2010 4:25:00 PM</title>
<description><![CDATA[<pre>Here is what I would do:

&lt;xs:complexType&gt;
  &lt;xs:choice&gt;
    &lt;xs:choice&gt;
      &lt;xs:choice maxOccurs=&quot;unbounded&quot;&gt;
        &lt;xs:element ref=&quot;b&quot;/&gt;
        &lt;xs:element ref=&quot;c&quot;/&gt;
        &lt;xs:element ref=&quot;d&quot;/&gt;
      &lt;/xs:choice&gt;
      &lt;xs:element ref=&quot;a&quot;/minOccurs=&quot;0&quot; maxOccurs=&quot;unbounded&quot;/&gt;
    &lt;/xs:choice&gt;
    &lt;xs:choice maxOccurs=&quot;unbounded&quot;&gt;
      &lt;xs:element ref=&quot;b&quot;/&gt;
      &lt;xs:element ref=&quot;c&quot;/&gt;
      &lt;xs:element ref=&quot;d&quot;/&gt;
    &lt;/xs:choice&gt;
  &lt;/xs:choice&gt;
&lt;/xs:complexType&gt;

Does that satisfy the requirements?  If that does not work please let me know what are the additional requirements I am sure I can find a way to make it work even if it does become a bit lengthy.

Austin
http://prettydiff.com/</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/201008/msg1000314809.html</link>
</item><item>
<title>RE: Difficult logical relationship in complex type - 8/24/2010 10:50:00 PM</title>
<description><![CDATA[<pre>Unfortunately, I'm getting errors from the XSD:  &quot;The element X may not overlap with another element&quot;.

I'll probably have to stick with the sequence you described in your previous post.

Thanks.

-----Original Message-----
From: C. M. Sperberg-McQueen [mailto:cmsmcq@blackmesatech.com] 
Sent: Tuesday, August 24, 2010 12:17 PM
To: McBride, David
Cc: C. M. Sperberg-McQueen; xmlschema-dev@w3.org
Subject: Re: Difficult logical relationship in complex type


On 24 Aug 2010, at 11:54 , McBride, David wrote:

&gt; ...
&gt;
&gt; The only remaining problem with the XSD form is that it implies  
&gt; order, but I may have to live with that.


There are two ways to approach that question.

One is to say that since no information is being conveyed by
different ways of ordering the elements, there is no point in
allowing different orders.  On this view, the fact that B, C,
and D can be interleaved is a weakness of the content models
we've been talking about, because it allows both BC and CB
(for example) to convey the same information, thus opening
a covert channel for conveying additional (unauthorized)
information.  The fact that allowing B, C, and D to occur in
any order simplifies the content model expression and makes
it easier to see what's going on may or may not outweigh that
weakness.

The other way is to say that any order should be allowed.
(Perhaps in some application the order does convey information,
but we still want to enforce the constraints we've been
discussing.)  Here the key point seems to be:  A, B, C, and
D can occur as children in any order, and at least one of
B, C, or D must occur, or else nothing at all.  Then we can
write

   (A*, (B|C|D), (A|B|C|D)*)?

Or in XSD syntax

   &lt;sequence minOccurs=&quot;0&quot; maxOccurs=&quot;1&quot;&gt;
     &lt;element ref=&quot;A&quot; minOccurs=&quot;0&quot; maxOccurs=&quot;unbounded&quot;&gt;
     &lt;choice&gt;
       &lt;element ref=&quot;B&quot;/&gt;
       &lt;element ref=&quot;C&quot;/&gt;
       &lt;element ref=&quot;D&quot;/&gt;
     &lt;/choice&gt;
     &lt;choice minOccurs=&quot;0&quot; maxOccurs=&quot;unbounded&quot;&gt;
       &lt;element ref=&quot;A&quot;/&gt;
       &lt;element ref=&quot;B&quot;/&gt;
       &lt;element ref=&quot;C&quot;/&gt;
       &lt;element ref=&quot;D&quot;/&gt;
     &lt;/choice&gt;
   &lt;/sequence&gt;


-- 
****************************************************************
* C. M. Sperberg-McQueen, Black Mesa Technologies LLC
* http://www.blackmesatech.com
* http://cmsmcq.com/mib
* http://balisage.net
****************************************************************</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/201008/msg1000314797.html</link>
</item><item>
<title>Re: Difficult logical relationship in complex type - 8/24/2010 7:17:00 PM</title>
<description><![CDATA[<pre>On 24 Aug 2010, at 11:54 , McBride, David wrote:

&gt; ...
&gt;
&gt; The only remaining problem with the XSD form is that it implies  
&gt; order, but I may have to live with that.


There are two ways to approach that question.

One is to say that since no information is being conveyed by
different ways of ordering the elements, there is no point in
allowing different orders.  On this view, the fact that B, C,
and D can be interleaved is a weakness of the content models
we've been talking about, because it allows both BC and CB
(for example) to convey the same information, thus opening
a covert channel for conveying additional (unauthorized)
information.  The fact that allowing B, C, and D to occur in
any order simplifies the content model expression and makes
it easier to see what's going on may or may not outweigh that
weakness.

The other way is to say that any order should be allowed.
(Perhaps in some application the order does convey information,
but we still want to enforce the constraints we've been
discussing.)  Here the key point seems to be:  A, B, C, and
D can occur as children in any order, and at least one of
B, C, or D must occur, or else nothing at all.  Then we can
write

   (A*, (B|C|D), (A|B|C|D)*)?

Or in XSD syntax

   &lt;sequence minOccurs=&quot;0&quot; maxOccurs=&quot;1&quot;&gt;
     &lt;element ref=&quot;A&quot; minOccurs=&quot;0&quot; maxOccurs=&quot;unbounded&quot;&gt;
     &lt;choice&gt;
       &lt;element ref=&quot;B&quot;/&gt;
       &lt;element ref=&quot;C&quot;/&gt;
       &lt;element ref=&quot;D&quot;/&gt;
     &lt;/choice&gt;
     &lt;choice minOccurs=&quot;0&quot; maxOccurs=&quot;unbounded&quot;&gt;
       &lt;element ref=&quot;A&quot;/&gt;
       &lt;element ref=&quot;B&quot;/&gt;
       &lt;element ref=&quot;C&quot;/&gt;
       &lt;element ref=&quot;D&quot;/&gt;
     &lt;/choice&gt;
   &lt;/sequence&gt;


-- 
****************************************************************
* C. M. Sperberg-McQueen, Black Mesa Technologies LLC
* http://www.blackmesatech.com
* http://cmsmcq.com/mib
* http://balisage.net
****************************************************************</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/201008/msg1000314791.html</link>
</item><item>
<title>RE: Difficult logical relationship in complex type - 8/24/2010 5:55:00 PM</title>
<description><![CDATA[<pre>Ok - I see what you mean.  I misread your regex.

BTW - the regex I suggested is nothing unusual, it's simply a common perl extended regular expression.

The only remaining problem with the XSD form is that it implies order, but I may have to live with that.

Thanks again for your response.

-----Original Message-----
From: C. M. Sperberg-McQueen [mailto:cmsmcq@blackmesatech.com] 
Sent: Tuesday, August 24, 2010 10:41 AM
To: McBride, David
Cc: C. M. Sperberg-McQueen; xmlschema-dev@w3.org
Subject: Re: Difficult logical relationship in complex type


On 24 Aug 2010, at 11:08 , McBride, David wrote:

&gt; Thanks for your response.
&gt;
&gt; Order does not matter.
&gt;
&gt; I think you've misunderstood the constraints (or I haven't expressed  
&gt; them clearly).  Specifically, I'm trying to prohibit the case where  
&gt; element 'A' is the only content.  The rexex you proposed would allow  
&gt; this case to occur.

How?  The content model (A*, (B|C|D)+) allows zero or more A
elements, followed by one or more B, C, or D elements.
An A element by itself matches the initial token, but
then leaves nothing but the empty string to match
the sub-expression (B|C|D)+.  But the empty string does
not match that construct:  at least one of B, C, or D
is required. (It's a plus sign, meaning one-or-more, not
a star meaning zero-or-more.)

&gt;
&gt; I think the regex would be more like the following:
&gt;
&gt; (?([BCD]+)A*)
&gt;
&gt; i.e.,
&gt;
&gt; IF one or more instanced of B, C, or D,
&gt; THEN zero or more instances of A

Perhaps we are simply using different notations for regular
expressions:  the expression you write is not legal in
any syntax I know, because the '?' operator does not follow
any regular expression.  (If it matters, the syntax I'm
using is that of DTDs.)

To put the content model into XSD form, you might write
either:

   &lt;sequence&gt;
     &lt;element ref=&quot;A&quot; minOccurs=&quot;0&quot; maxOccurs=&quot;unbounded&quot;/&gt;
     &lt;choice minOccurs=&quot;1&quot; maxOccurs=&quot;unbounded&quot;&gt;
       &lt;element ref=&quot;B&quot;/&gt;
       &lt;element ref=&quot;C&quot;/&gt;
       &lt;element ref=&quot;D&quot;/&gt;
     &lt;/choice&gt;
   &lt;/sequence&gt;

(which puts the As first), or

   &lt;sequence&gt;
     &lt;choice minOccurs=&quot;1&quot; maxOccurs=&quot;unbounded&quot;&gt;
       &lt;element ref=&quot;B&quot;/&gt;
       &lt;element ref=&quot;C&quot;/&gt;
       &lt;element ref=&quot;D&quot;/&gt;
     &lt;/choice&gt;
     &lt;element ref=&quot;A&quot; minOccurs=&quot;0&quot; maxOccurs=&quot;unbounded&quot;/&gt;
   &lt;/sequence&gt;

(which puts them last).  Does that help?

-- 
****************************************************************
* C. M. Sperberg-McQueen, Black Mesa Technologies LLC
* http://www.blackmesatech.com
* http://cmsmcq.com/mib
* http://balisage.net
****************************************************************</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/201008/msg1000314789.html</link>
</item><item>
<title>Re: Difficult logical relationship in complex type - 8/24/2010 5:39:00 PM</title>
<description><![CDATA[<pre>On 24 Aug 2010, at 11:08 , McBride, David wrote:

&gt; Thanks for your response.
&gt;
&gt; Order does not matter.
&gt;
&gt; I think you've misunderstood the constraints (or I haven't expressed  
&gt; them clearly).  Specifically, I'm trying to prohibit the case where  
&gt; element 'A' is the only content.  The rexex you proposed would allow  
&gt; this case to occur.

How?  The content model (A*, (B|C|D)+) allows zero or more A
elements, followed by one or more B, C, or D elements.
An A element by itself matches the initial token, but
then leaves nothing but the empty string to match
the sub-expression (B|C|D)+.  But the empty string does
not match that construct:  at least one of B, C, or D
is required. (It's a plus sign, meaning one-or-more, not
a star meaning zero-or-more.)

&gt;
&gt; I think the regex would be more like the following:
&gt;
&gt; (?([BCD]+)A*)
&gt;
&gt; i.e.,
&gt;
&gt; IF one or more instanced of B, C, or D,
&gt; THEN zero or more instances of A

Perhaps we are simply using different notations for regular
expressions:  the expression you write is not legal in
any syntax I know, because the '?' operator does not follow
any regular expression.  (If it matters, the syntax I'm
using is that of DTDs.)

To put the content model into XSD form, you might write
either:

   &lt;sequence&gt;
     &lt;element ref=&quot;A&quot; minOccurs=&quot;0&quot; maxOccurs=&quot;unbounded&quot;/&gt;
     &lt;choice minOccurs=&quot;1&quot; maxOccurs=&quot;unbounded&quot;&gt;
       &lt;element ref=&quot;B&quot;/&gt;
       &lt;element ref=&quot;C&quot;/&gt;
       &lt;element ref=&quot;D&quot;/&gt;
     &lt;/choice&gt;
   &lt;/sequence&gt;

(which puts the As first), or

   &lt;sequence&gt;
     &lt;choice minOccurs=&quot;1&quot; maxOccurs=&quot;unbounded&quot;&gt;
       &lt;element ref=&quot;B&quot;/&gt;
       &lt;element ref=&quot;C&quot;/&gt;
       &lt;element ref=&quot;D&quot;/&gt;
     &lt;/choice&gt;
     &lt;element ref=&quot;A&quot; minOccurs=&quot;0&quot; maxOccurs=&quot;unbounded&quot;/&gt;
   &lt;/sequence&gt;

(which puts them last).  Does that help?

-- 
****************************************************************
* C. M. Sperberg-McQueen, Black Mesa Technologies LLC
* http://www.blackmesatech.com
* http://cmsmcq.com/mib
* http://balisage.net
****************************************************************</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/201008/msg1000314788.html</link>
</item><item>
<title>RE: Difficult logical relationship in complex type - 8/24/2010 5:10:00 PM</title>
<description><![CDATA[<pre>Thanks for your response.

Order does not matter.

I think you've misunderstood the constraints (or I haven't expressed them clearly).  Specifically, I'm trying to prohibit the case where element 'A' is the only content.  The rexex you proposed would allow this case to occur.

I think the regex would be more like the following:

(?([BCD]+)A*)

i.e.,

IF one or more instanced of B, C, or D,
THEN zero or more instances of A

DJM

-----Original Message-----
From: C. M. Sperberg-McQueen [mailto:cmsmcq@blackmesatech.com] 
Sent: Tuesday, August 24, 2010 6:30 AM
To: McBride, David
Cc: C. M. Sperberg-McQueen; xmlschema-dev@w3.org
Subject: Re: Difficult logical relationship in complex type


On 23 Aug 2010, at 10:39 , McBride, David wrote:

&gt; I'm having difficulties defining a logical relationship within a  
&gt; complex type.  The complex type contains 4 sub-elements.  Let's call  
&gt; them A, B, C, D.  The logical relationship is this:
&gt;
&gt; 1.       One, or more of elements B, C, or D are required.
&gt; 2.       There may be zero or more instances of element A.
&gt; 3.       Element A may never be the only element.  In other words,  
&gt; there may only be an instance of A, if there is also at least one  
&gt; instance of B, C, or D.
&gt;
&gt; If I was just dealing with B, C, and D, I could handle that.   
&gt; However, adding the requirements for A has thrown me.

If one of B, C, and D is required, then your constraint 3 seems
always to be satisfied.  Element A will never be the only element,
since there will always be a B, C, or D.  Or have I misunderstood
the constraints?

If you do not care about the order, then the simplest thing
might be the XSD equivalent of the regular expression

   (A*, (B | C | D)+)

If I've misunderstood the constraints, then this content model
may not do the job -- explaining why not would be a good step
towards clarifying the requirements.

HTH

-- 
****************************************************************
* C. M. Sperberg-McQueen, Black Mesa Technologies LLC
* http://www.blackmesatech.com
* http://cmsmcq.com/mib
* http://balisage.net
****************************************************************</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/201008/msg1000314787.html</link>
</item><item>
<title>Re: Difficult logical relationship in complex type - 8/24/2010 1:30:00 PM</title>
<description><![CDATA[<pre>On 23 Aug 2010, at 10:39 , McBride, David wrote:

&gt; I’m having difficulties defining a logical relationship within a  
&gt; complex type.  The complex type contains 4 sub-elements.  Let’s call  
&gt; them A, B, C, D.  The logical relationship is this:
&gt;
&gt; 1.       One, or more of elements B, C, or D are required.
&gt; 2.       There may be zero or more instances of element A.
&gt; 3.       Element A may never be the only element.  In other words,  
&gt; there may only be an instance of A, if there is also at least one  
&gt; instance of B, C, or D.
&gt;
&gt; If I was just dealing with B, C, and D, I could handle that.   
&gt; However, adding the requirements for A has thrown me.

If one of B, C, and D is required, then your constraint 3 seems
always to be satisfied.  Element A will never be the only element,
since there will always be a B, C, or D.  Or have I misunderstood
the constraints?

If you do not care about the order, then the simplest thing
might be the XSD equivalent of the regular expression

   (A*, (B | C | D)+)

If I've misunderstood the constraints, then this content model
may not do the job -- explaining why not would be a good step
towards clarifying the requirements.

HTH

-- 
****************************************************************
* C. M. Sperberg-McQueen, Black Mesa Technologies LLC
* http://www.blackmesatech.com
* http://cmsmcq.com/mib
* http://balisage.net
****************************************************************</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/201008/msg1000314773.html</link>
</item><item>
<title>Re: Difficult logical relationship in complex type - 8/24/2010 8:07:00 AM</title>
<description><![CDATA[<pre>On 23/08/2010 17:39, McBride, David wrote:
&gt;
&gt; I'm having difficulties defining a logical relationship within a 
&gt; complex type.  The complex type contains 4 sub-elements.  Let's call 
&gt; them A, B, C, D.  The logical relationship is this:
&gt;
&gt; 1. One, or more of elements B, C, or D are required.
&gt;
&gt; 2. There may be zero or more instances of element A.
&gt;
&gt; 3. Element A may never be the only element.  In other words, there may 
&gt; only be an instance of A, if there is also at least one instance of B, 
&gt; C, or D.
&gt;
&gt; If I was just dealing with B, C, and D, I could handle that.  However, 
&gt; adding the requirements for A has thrown me.
&gt;
&gt; Thanks for any responses, in advance.
&gt;

Are there any ordering constraints?

If not, I would think this is stretching XSD 1.0 to the limits. It's 
obviously easy using XSD 1.1 assertions.

Michael Kay
Saxonica</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/201008/msg1000314770.html</link>
</item><item>
<title>Difficult logical relationship in complex type - 8/24/2010 7:50:00 AM</title>
<description><![CDATA[<pre>I'm having difficulties defining a logical relationship within a complex type.  The complex type contains 4 sub-elements.  Let's call them A, B, C, D.  The logical relationship is this:


1.       One, or more of elements B, C, or D are required.

2.       There may be zero or more instances of element A.

3.       Element A may never be the only element.  In other words, there may only be an instance of A, if there is also at least one instance of B, C, or D.

If I was just dealing with B, C, and D, I could handle that.  However, adding the requirements for A has thrown me.

Thanks for any responses, in advance.</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/201008/msg1000314769.html</link>
</item><item>
<title>Re: Doubt in xmlDocDumpFormatMemoryEnc - 8/23/2010 2:21:00 PM</title>
<description><![CDATA[<pre>Hi Bahrath,

As supposed Michael, I think this is not the good list for this question 
which has nothing to do with XML-Schema.
I don't know but I guess there should be a specific list on libxml, 
where you could get a precise answer.

Anyway, as far as XML is concerned  : what you are getting here ( &amp;amp; 
&amp;lt; &amp;gt; ...) are XML entities which is a way to format those specials 
characters in XML.
Some of those characters (&amp;, &lt;) are actually forbiden in a XML file 
(they would create confusion : &quot;&lt;&quot; is for opening a tag, &amp; is for 
entities...).
I suggest you have a look on the w3c XML recommendation 
&quot;http://www.w3.org/TR/REC-xml/#charencoding&quot;
Any XML Tools will be aware of this and will convert back those entities 
to characters if necessary. So don't worry about that, this is actually 
normal when using XML.

Under Jedit the XML plugin propose to convert entities to characters and 
vice versa if you like.

But well, I already said to much things unrelated to schema here...

Regards,

Matthieu Ricaud-Dussarget.


Le 23/08/2010 15:01, bharath a &#233;crit :
&gt; Hi Michael,
&gt; This function &quot;xmlDocDumpFormatMemoryEnc&quot; is in xmlsave.c of Libxml. 
&gt; This function is used for dumping the xml file contents (pointed 
&gt; by xmlDocPtr) to string format.
&gt; Can you please check this and let me know about the conversion of xml 
&gt; special characters to format as given below.
&gt; Thanks and Regards,
&gt; Bahrath.
&gt; ***************************************************************************************
&gt; This e-mail and attachments contain confidential information from 
&gt; HUAWEI, which is intended only for the person or entity whose address 
&gt; is listed above. Any use of the information contained herein in any 
&gt; way (including, but not limited to, total or partial disclosure, 
&gt; reproduction, or dissemination) by persons other than the intended 
&gt; recipient's) is prohibited. If you receive this e-mail in error, 
&gt; please notify the sender by phone or email immediately and delete it!
&gt;
&gt; ------------------------------------------------------------------------
&gt; *From:* xmlschema-dev-request@w3.org 
&gt; [mailto:xmlschema-dev-request@w3.org] *On Behalf Of *Michael Kay
&gt; *Sent:* Monday, August 23, 2010 6:19 PM
&gt; *To:* bharath
&gt; *Cc:* xmlschema-dev-request@w3.org; xmlschema-dev@w3.org; 
&gt; arathikarki@huawei.com; rajithr@huawei.com
&gt; *Subject:* Re: Doubt in xmlDocDumpFormatMemoryEnc
&gt;
&gt; I suspect that most readers of this list, like me, have never heard of 
&gt; *xmlDocDumpFormatMemoryEnc*(). So it would be useful for you to 
&gt; explain what product it is part of and what its intended purpose is. 
&gt; Does it have anything to do with XML Schema (and if not, why are you 
&gt; posting here?)
&gt;
&gt; Intrinsically, escaping of XML special characters (for example 
&gt; converting &amp; to &amp;amp;) is a sensible/necessary thing to do for any 
&gt; tool that generates or serializes XML.
&gt;
&gt; Michael Kay
&gt; Saxonica
&gt;
&gt; On 23/08/2010 13:31, bharath wrote:
&gt;&gt; Hi All,
&gt;&gt; I am calling the function *xmlDocDumpFormatMemoryEnc*() to construct 
&gt;&gt; xmlDocPtr to xmlChar.
&gt;&gt; When i used this function, the left characters are converted to right 
&gt;&gt; characters. Can you please let me know what is the reason to convert 
&gt;&gt; like this.
&gt;&gt; &amp; - &amp;amp;
&gt;&gt; &gt; - &amp;lt;
&gt;&gt; &lt; - &amp;gt;
&gt;&gt; &quot; - &amp;quot
&gt;&gt; ' - &amp;#39;
&gt;&gt; \r - &amp;#13;
&gt;&gt; Thanks and Regards,
&gt;&gt; Bharath.
&gt;&gt; ***************************************************************************************
&gt;&gt; This e-mail and attachments contain confidential information from 
&gt;&gt; HUAWEI, which is intended only for the person or entity whose address 
&gt;&gt; is listed above. Any use of the information contained herein in any 
&gt;&gt; way (including, but not limited to, total or partial disclosure, 
&gt;&gt; reproduction, or dissemination) by persons other than the intended 
&gt;&gt; recipient's) is prohibited. If you receive this e-mail in error, 
&gt;&gt; please notify the sender by phone or email immediately and delete it!
&gt;


-- 
Matthieu Ricaud
IGS-CP
Service Livre num&#233;rique</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/201008/msg1000314758.html</link>
</item><item>
<title>RE: Doubt in xmlDocDumpFormatMemoryEnc - 8/23/2010 1:03:00 PM</title>
<description><![CDATA[<pre>Hi Michael,
 
This function &quot;xmlDocDumpFormatMemoryEnc&quot; is in xmlsave.c of Libxml. This
function is used for dumping the xml file contents (pointed by xmlDocPtr) to
string format.
 
Can you please check this and let me know about the conversion of xml
special characters to format as given below.
 
Thanks and Regards,
Bahrath.
 
****************************************************************************
***********
This e-mail and attachments contain confidential information from HUAWEI,
which is intended only for the person or entity whose address is listed
above. Any use of the information contained herein in any way (including,
but not limited to, total or partial disclosure, reproduction, or
dissemination) by persons other than the intended recipient's) is
prohibited. If you receive this e-mail in error, please notify the sender by
phone or email immediately and delete it!
 

  _____  

From: xmlschema-dev-request@w3.org [mailto:xmlschema-dev-request@w3.org] On
Behalf Of Michael Kay
Sent: Monday, August 23, 2010 6:19 PM
To: bharath
Cc: xmlschema-dev-request@w3.org; xmlschema-dev@w3.org;
arathikarki@huawei.com; rajithr@huawei.com
Subject: Re: Doubt in xmlDocDumpFormatMemoryEnc


I suspect that most readers of this list, like me, have never heard of
xmlDocDumpFormatMemoryEnc(). So it would be useful for you to explain what
product it is part of and what its intended purpose is. Does it have
anything to do with XML Schema (and if not, why are you posting here?)

Intrinsically, escaping of XML special characters (for example converting &amp;
to &amp;amp;) is a sensible/necessary thing to do for any tool that generates or
serializes XML.

Michael Kay
Saxonica

On 23/08/2010 13:31, bharath wrote: 

Hi All,
 
I am calling the function xmlDocDumpFormatMemoryEnc() to construct xmlDocPtr
to xmlChar.
When i used this function, the left characters are converted to right
characters. Can you please let me know what is the reason to convert like
this.
 
 
&amp; - &amp;amp;
&gt; - &amp;lt;
&lt; - &amp;gt;
&quot; - &amp;quot
' - &amp;#39;
\r - &amp;#13;
 
Thanks and Regards,
Bharath.
 
****************************************************************************
***********
This e-mail and attachments contain confidential information from HUAWEI,
which is intended only for the person or entity whose address is listed
above. Any use of the information contained herein in any way (including,
but not limited to, total or partial disclosure, reproduction, or
dissemination) by persons other than the intended recipient's) is
prohibited. If you receive this e-mail in error, please notify the sender by
phone or email immediately and delete it!</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/201008/msg1000314756.html</link>
</item><item>
<title>Re: Doubt in xmlDocDumpFormatMemoryEnc - 8/23/2010 12:50:00 PM</title>
<description><![CDATA[<pre>I suspect that most readers of this list, like me, have never heard of 
*xmlDocDumpFormatMemoryEnc*(). So it would be useful for you to explain 
what product it is part of and what its intended purpose is. Does it 
have anything to do with XML Schema (and if not, why are you posting here?)

Intrinsically, escaping of XML special characters (for example 
converting &amp; to &amp;amp;) is a sensible/necessary thing to do for any tool 
that generates or serializes XML.

Michael Kay
Saxonica

On 23/08/2010 13:31, bharath wrote:
&gt; Hi All,
&gt; I am calling the function *xmlDocDumpFormatMemoryEnc*() to construct 
&gt; xmlDocPtr to xmlChar.
&gt; When i used this function, the left characters are converted to right 
&gt; characters. Can you please let me know what is the reason to convert 
&gt; like this.
&gt; &amp; - &amp;amp;
&gt; &gt; - &amp;lt;
&gt; &lt; - &amp;gt;
&gt; &quot; - &amp;quot
&gt; ' - &amp;#39;
&gt; \r - &amp;#13;
&gt; Thanks and Regards,
&gt; Bharath.
&gt; ***************************************************************************************
&gt; This e-mail and attachments contain confidential information from 
&gt; HUAWEI, which is intended only for the person or entity whose address 
&gt; is listed above. Any use of the information contained herein in any 
&gt; way (including, but not limited to, total or partial disclosure, 
&gt; reproduction, or dissemination) by persons other than the intended 
&gt; recipient's) is prohibited. If you receive this e-mail in error, 
&gt; please notify the sender by phone or email immediately and delete it!</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/201008/msg1000314753.html</link>
</item><item>
<title>Doubt in xmlDocDumpFormatMemoryEnc - 8/23/2010 12:34:00 PM</title>
<description><![CDATA[<pre>Hi All,
 
I am calling the function xmlDocDumpFormatMemoryEnc() to construct xmlDocPtr
to xmlChar.
When i used this function, the left characters are converted to right
characters. Can you please let me know what is the reason to convert like
this.
 
 
&amp; - &amp;amp;
&gt; - &amp;lt;
&lt; - &amp;gt;
&quot; - &amp;quot
' - &amp;#39;
\r - &amp;#13;
 
Thanks and Regards,
Bharath.
 
****************************************************************************
***********
This e-mail and attachments contain confidential information from HUAWEI,
which is intended only for the person or entity whose address is listed
above. Any use of the information contained herein in any way (including,
but not limited to, total or partial disclosure, reproduction, or
dissemination) by persons other than the intended recipient's) is
prohibited. If you receive this e-mail in error, please notify the sender by
phone or email immediately and delete it!</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/201008/msg1000314752.html</link>
</item><item>
<title>Re: Help on XML Schema generation using XSLT - 8/20/2010 10:52:00 AM</title>
<description><![CDATA[<pre>Hi Densil,

I think it's a pretty good idea, especially the one to use a collection 
of xml file to better detect the global XML structure. We can admit the 
assertion that if one need a schema, it means that we should have more 
than one file on this type.
XSLT, as functionnal language may be quite helpful, and using XSLT2 
might help more. And as long as I know, if you use a Java XSLT 
processor, you can call java classes within your xslt. Then you are no 
more restricted functionnal/procedural (but well your xslt will not be 
plateform independant anymore...).

Do you already now what kind of &quot;schema&quot; you like to generate ?
It might be a very different analyse in case you want to generate a DTD, 
a W3C-schema or a RelaxNG one.

I've done something similar for Relax NG, but it's a dummy XSLT  : it 
only generate elements with attributes in the order then come, no 
guesswork.. euh heuristics ;)
But within the xml input you can add a few lines of RelaxNg which will 
be reproduced (within the generated elements or inverse).
It don't think it's what you want. Its actually just a tool to write 
schema easyer and faster, because one only interact with the structure 
logic, not the obvisous things. But you can customize everythings (the 
more you do, the less automatic it is, and finaly your could almost 
write the schema yourself in the xml and the tool become unusefull)

And at last, I think XMLspy has a W3C-schema generator, I don't know how 
it is implemented.
Jedit has a DTD generator (XML plugin), which might be written in java 
(or/and XSLT ?) and is open source :)

Let us know about this interresting project.

Matthieu Ricaud-Dussarget.
Le 20/08/2010 10:22, Michael Kay a &#233;crit :
&gt; On 20/08/2010 00:58, Cheney, Edward A SSG RES USAR USARC wrote:
&gt;&gt; Densil,
&gt;&gt;
&gt;&gt; I would say converting a basic XML document to a schema document is 
&gt;&gt; not probable unless there exists a certain quantity of known information
&gt;
&gt;
&gt; Actually there are a number of tools that do a quite passable job of 
&gt; generating a schema from an instance, including my own DTDGenerator 
&gt; from many years ago (still available on the Saxon page at 
&gt; Sourceforge). It demands some guesswork (or if we want to be more 
&gt; polite, heuristics) but it's possible to do a surprisingly good job. 
&gt; For example, my DTDGenerator uses ruled like &quot;generate an enumeration 
&gt; type if there are less than 20 distinct values and the number of 
&gt; actual values is at least ten times the number of distinct values&quot;. Of 
&gt; course the inferred schema will always be imperfect (it will allow 
&gt; some &quot;invalid&quot; documents, and disallow some &quot;valid&quot; ones, where 
&gt; &quot;validity&quot; is in the eye of the user) so it will need manual adjustment.
&gt;
&gt; Although there are quite a few such tools around, I'm not aware of any 
&gt; that are implemented in XSLT. But I think it would be perfectly 
&gt; reasonable to attempt to write one in XSLT.
&gt;
&gt; I've always thought it would be a good idea for such a tool to allow 
&gt; multiple source instances to be supplied as input. In practice I've 
&gt; handled this by concatenating them within a wrapper element.
&gt;
&gt; Michael Kay
&gt; Saxonica
&gt;
&gt;


-- 
Matthieu Ricaud
IGS-CP
Service Livre num&#233;rique</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/201008/msg1000314717.html</link>
</item><item>
<title>Re: Help on XML Schema generation using XSLT - 8/20/2010 8:23:00 AM</title>
<description><![CDATA[<pre>On 20/08/2010 00:58, Cheney, Edward A SSG RES USAR USARC wrote:
&gt; Densil,
&gt;
&gt; I would say converting a basic XML document to a schema document is not probable unless there exists a certain quantity of known information
&gt;    


Actually there are a number of tools that do a quite passable job of 
generating a schema from an instance, including my own DTDGenerator from 
many years ago (still available on the Saxon page at Sourceforge). It 
demands some guesswork (or if we want to be more polite, heuristics) but 
it's possible to do a surprisingly good job. For example, my 
DTDGenerator uses ruled like &quot;generate an enumeration type if there are 
less than 20 distinct values and the number of actual values is at least 
ten times the number of distinct values&quot;. Of course the inferred schema 
will always be imperfect (it will allow some &quot;invalid&quot; documents, and 
disallow some &quot;valid&quot; ones, where &quot;validity&quot; is in the eye of the user) 
so it will need manual adjustment.

Although there are quite a few such tools around, I'm not aware of any 
that are implemented in XSLT. But I think it would be perfectly 
reasonable to attempt to write one in XSLT.

I've always thought it would be a good idea for such a tool to allow 
multiple source instances to be supplied as input. In practice I've 
handled this by concatenating them within a wrapper element.

Michael Kay
Saxonica</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/201008/msg1000314712.html</link>
</item><item>
<title>Re: Help on XML Schema generation using XSLT - 8/20/2010 8:10:00 AM</title>
<description><![CDATA[<pre>Hi Austin,
Vielen Dank :) for your tips. I agree absolutely to the concerns you have mentioned. I do see this problem along with similar issues like identifying enumerations, identifying decimal values that are based on European conventions, occurances, set of values and the list goes on.
I have no idea of how the xml would be and the limits of its existance. It is highly specific to the customers environment. But on the other hand, I hae the possibility to refine my XSLT once I treat succesive documents. hence my Schema would get better and better every time it is loaded with the same type of XML file at that customers place.

At the moment I am working on the XSLT and I do land on issues where it is misty. I try to find my solutions, I think I would post some code where I am stuck and cant get further.

But thank you for giving some hopes that it is possible to generate a schema using a non-procedural language like XSLT.
cheers
Domnic

--- On Fri, 20/8/10, Cheney, Edward A SSG RES USAR USARC &lt;austin.cheney@us.army.mil&gt; wrote:

&gt; From: Cheney, Edward A SSG RES USAR USARC &lt;austin.cheney@us.army.mil&gt;
&gt; Subject: Re: Help on XML Schema generation using XSLT
&gt; To: &quot;Silent lights&quot; &lt;silentlights@yahoo.co.uk&gt;
&gt; Cc: xmlschema-dev@w3.org
&gt; Date: Friday, 20 August, 2010, 1:58
&gt; Densil,
&gt; 
&gt; I would say converting a basic XML document to a schema
&gt; document is not probable unless there exists a certain
&gt; quantity of known information that you are aware of outside
&gt; the XML instance.&#160; I say this because there are many
&gt; details associated with a schema that cannot be inferred
&gt; from a single XML instance, such as how many times a certain
&gt; child should occur under a parent element or if a certain
&gt; parent element should be confined to only a limited
&gt; specified choice of child elements.
&gt; 
&gt; The only way that such a task would become probable is if
&gt; the XML document is auto-generated with known and defined
&gt; meta-data and structure.&#160; This is so because then you
&gt; known exactly what all the bounds of those generated
&gt; instances of XML should be limited to and allow expression
&gt; of, which is the breath of information necessary to write a
&gt; schema.
&gt; 
&gt; If you would supply additional information about the nature
&gt; of the XML instances and the method by which they are
&gt; generated and the depth of their consumption I believe
&gt; anybody on this mailing list could supply you with tips to
&gt; achieve a highly efficient solution.
&gt; 
&gt; Austin
&gt;</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/201008/msg1000314711.html</link>
</item><item>
<title>Re: Help on XML Schema generation using XSLT - 8/20/2010 12:00:00 AM</title>
<description><![CDATA[<pre>Densil,

I would say converting a basic XML document to a schema document is not probable unless there exists a certain quantity of known information that you are aware of outside the XML instance.  I say this because there are many details associated with a schema that cannot be inferred from a single XML instance, such as how many times a certain child should occur under a parent element or if a certain parent element should be confined to only a limited specified choice of child elements.

The only way that such a task would become probable is if the XML document is auto-generated with known and defined meta-data and structure.  This is so because then you known exactly what all the bounds of those generated instances of XML should be limited to and allow expression of, which is the breath of information necessary to write a schema.

If you would supply additional information about the nature of the XML instances and the method by which they are generated and the depth of their consumption I believe anybody on this mailing list could supply you with tips to achieve a highly efficient solution.

Austin</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/201008/msg1000314706.html</link>
</item><item>
<title>Help on XML Schema generation using XSLT - 8/19/2010 9:22:00 PM</title>
<description><![CDATA[<pre>Hi there,
Did anyone develop or came accross a XSLT which 
1) transforms an input XML document into its XML Schema..? 
2) is it a valid approach ? 
3) how is stylus doing the schema generation ?

Any help would be highly appreciated
Cheers
Densil</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/201008/msg1000314704.html</link>
</item><item>
<title>Re: Newbie question - 8/18/2010 8:11:00 PM</title>
<description><![CDATA[<pre>-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

David writes:

&gt; It's 'http://www.w3.org/2000/06/webdata/xsv#', corresponding to the
&gt; URI in my original posting (http://www.w3.org/2000/06/style/xsv.xsl).
&gt; It seems I'm using an old version of the validation page (I found it
&gt; in a book on XML). When I changed it to '.../2001/03/...', it worked
&gt; fine.

Sorry for your wasted time, glad we sorted it out.  I thought that
page did mention that it was out of date, I'll try to get it improved
in that regard.

ht
- -- 
       Henry S. Thompson, School of Informatics, University of Edinburgh
      10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
                Fax: (44) 131 651-1426, e-mail: ht@inf.ed.ac.uk
                       URL: http://www.ltg.ed.ac.uk/~ht/
 [mail from me _always_ has a .sig like this -- mail without it is forged spam]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFMbD3ekjnJixAXWBoRAqvDAJ9f9NIIcMR4KN8P8/V1aRyIpHrvgACfX5Hk
osxsEslCT/Oe6RWsRnyiPQ0=
=QA7O
-----END PGP SIGNATURE-----</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/201008/msg1000314675.html</link>
</item><item>
<title>Re: Newbie question - 8/18/2010 6:13:00 PM</title>
<description><![CDATA[<pre>Sorry, I thought you meant the field in the HTML form where I entered
the address of my XSD file.

It's 'http://www.w3.org/2000/06/webdata/xsv#', corresponding to the
URI in my original posting (http://www.w3.org/2000/06/style/xsv.xsl).
It seems I'm using an old version of the validation page (I found it
in a book on XML). When I changed it to '.../2001/03/...', it worked
fine.

Maybe they should redirect people to the latest, or warn them that
they're using an old version (which doesn't work). It wasn't obvious
to me that I was using an outdated version.

Thanks for your help.

On Wed, Aug 18, 2010 at 1:30 PM, Henry S. Thompson &lt;ht@inf.ed.ac.uk&gt; wrote:
&gt; -----BEGIN PGP SIGNED MESSAGE-----
&gt; Hash: SHA1
&gt;
&gt; You have not answered the crucial question:
&gt;
&gt;&gt; What is the URI in the address bar when you see this message?
&gt;
&gt; It should be http://www.w3.org/2001/03/webdata/xsv#
&gt;
&gt; ht
&gt; - --
&gt; &#160; &#160; &#160; Henry S. Thompson, School of Informatics, University of Edinburgh
&gt; &#160; &#160; &#160;10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
&gt; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;Fax: (44) 131 651-1426, e-mail: ht@inf.ed.ac.uk
&gt; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; URL: http://www.ltg.ed.ac.uk/~ht/
&gt; &#160;[mail from me _always_ has a .sig like this -- mail without it is forged spam]
&gt; -----BEGIN PGP SIGNATURE-----
&gt; Version: GnuPG v1.2.6 (GNU/Linux)
&gt;
&gt; iD8DBQFMbBi0kjnJixAXWBoRAhs4AJ9rIT8+lCQrF0ERu/cHWtrP2HC+SgCfWbS/
&gt; 7hOlyANMNJh/oP+6evoEpCk=
&gt; =mRmd
&gt; -----END PGP SIGNATURE-----
&gt;</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/201008/msg1000314673.html</link>
</item><item>
<title>Re: Newbie question - 8/18/2010 5:32:00 PM</title>
<description><![CDATA[<pre>-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

You have not answered the crucial question:

&gt; What is the URI in the address bar when you see this message?

It should be http://www.w3.org/2001/03/webdata/xsv#

ht
- -- 
       Henry S. Thompson, School of Informatics, University of Edinburgh
      10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
                Fax: (44) 131 651-1426, e-mail: ht@inf.ed.ac.uk
                       URL: http://www.ltg.ed.ac.uk/~ht/
 [mail from me _always_ has a .sig like this -- mail without it is forged spam]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFMbBi0kjnJixAXWBoRAhs4AJ9rIT8+lCQrF0ERu/cHWtrP2HC+SgCfWbS/
7hOlyANMNJh/oP+6evoEpCk=
=mRmd
-----END PGP SIGNATURE-----</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/201008/msg1000314672.html</link>
</item><item>
<title>Re: Newbie question - 8/18/2010 12:21:00 PM</title>
<description><![CDATA[<pre>I tried it in IE 6.0.29 and got the same error, although the message
was a little different.

&quot;The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error
and then click the Refresh button, or try again later.
--------------------------------------------------------------------------------
The stylesheet does not contain a document element. The stylesheet may
be empty, or it may not be a well-formed XML documen...&quot;

So I looked at the page source, and here's what I saw:

&lt;?xml version='1.0'?&gt;
&lt;?xml-stylesheet type='text/xsl' href='../style/xsv.xsl'?&gt;
&lt;xsv xmlns=&quot;http://www.w3.org/2000/05/xsv&quot; instanceAssessed=&quot;false&quot;
     realName=&quot;D:\Data\TGMS Project\OLGCDM.xsd&quot;
     schemaDocs=&quot;file:/usr/local/XSV/xsvlog/tmpfwsIU2uploaded&quot; schemaErrors=&quot;0&quot;
     target=&quot;[standalone schema assessment]&quot;
     version=&quot;XSV 3.1-1 of 2007/12/11 16:20:05&quot;&gt;
  &lt;schemaDocAttempt URI=&quot;file:///usr/local/XSV/xsvlog/tmpfwsIU2uploaded&quot;
                    outcome=&quot;success&quot; source=&quot;command line&quot;/&gt;
&lt;/xsv&gt;

Looks like my XSD file is OK, but the returned XML can't be displayed
by the browser.  Any idea why? It isn't missing, is it?

David.

On Wed, Aug 18, 2010 at 7:04 AM, Henry S. Thompson &lt;ht@inf.ed.ac.uk&gt; wrote:
&gt; -----BEGIN PGP SIGNED MESSAGE-----
&gt; Hash: SHA1
&gt;
&gt; David writes:
&gt;
&gt;&gt; I was trying to use your validation service, but I just get the
&gt;&gt; following error message:
&gt;&gt;
&gt;&gt; Error loading stylesheet: A network error occured loading an XSLT stylesheet:
&gt;&gt; http://www.w3.org/2000/06/style/xsv.xsl
&gt;
&gt; Can't reproduce. &#160;What is the URI in the address bar when you see this
&gt; message, and what browser are you using?
&gt;
&gt; ht
&gt; - --
&gt; &#160; &#160; &#160; Henry S. Thompson, School of Informatics, University of Edinburgh
&gt; &#160; &#160; &#160;10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
&gt; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;Fax: (44) 131 651-1426, e-mail: ht@inf.ed.ac.uk
&gt; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; URL: http://www.ltg.ed.ac.uk/~ht/
&gt; &#160;[mail from me _always_ has a .sig like this -- mail without it is forged spam]
&gt; -----BEGIN PGP SIGNATURE-----
&gt; Version: GnuPG v1.2.6 (GNU/Linux)
&gt;
&gt; iD8DBQFMa75OkjnJixAXWBoRAqfwAJ4saNtHSy49NWeMLSFpuo5xuCzD5gCffu3U
&gt; 5kKRRJdPgqfaM4LPr39K6sQ=
&gt; =bmWY
&gt; -----END PGP SIGNATURE-----
&gt;</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/201008/msg1000314665.html</link>
</item><item>
<title>Re: Newbie question - 8/18/2010 12:03:00 PM</title>
<description><![CDATA[<pre>I'm using Firefox 3.6.8, and I uploaded the file (a single XSD file)
to the server. I'm behind a firewall, so I have to upload.

Thanks.

On Wed, Aug 18, 2010 at 7:04 AM, Henry S. Thompson &lt;ht@inf.ed.ac.uk&gt; wrote:
&gt; -----BEGIN PGP SIGNED MESSAGE-----
&gt; Hash: SHA1
&gt;
&gt; David writes:
&gt;
&gt;&gt; I was trying to use your validation service, but I just get the
&gt;&gt; following error message:
&gt;&gt;
&gt;&gt; Error loading stylesheet: A network error occured loading an XSLT stylesheet:
&gt;&gt; http://www.w3.org/2000/06/style/xsv.xsl
&gt;
&gt; Can't reproduce. &#160;What is the URI in the address bar when you see this
&gt; message, and what browser are you using?
&gt;
&gt; ht
&gt; - --
&gt; &#160; &#160; &#160; Henry S. Thompson, School of Informatics, University of Edinburgh
&gt; &#160; &#160; &#160;10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
&gt; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;Fax: (44) 131 651-1426, e-mail: ht@inf.ed.ac.uk
&gt; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; URL: http://www.ltg.ed.ac.uk/~ht/
&gt; &#160;[mail from me _always_ has a .sig like this -- mail without it is forged spam]
&gt; -----BEGIN PGP SIGNATURE-----
&gt; Version: GnuPG v1.2.6 (GNU/Linux)
&gt;
&gt; iD8DBQFMa75OkjnJixAXWBoRAqfwAJ4saNtHSy49NWeMLSFpuo5xuCzD5gCffu3U
&gt; 5kKRRJdPgqfaM4LPr39K6sQ=
&gt; =bmWY
&gt; -----END PGP SIGNATURE-----
&gt;</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/201008/msg1000314664.html</link>
</item><item>
<title>Re: Newbie question - 8/18/2010 11:06:00 AM</title>
<description><![CDATA[<pre>-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

David writes:

&gt; I was trying to use your validation service, but I just get the
&gt; following error message:
&gt;
&gt; Error loading stylesheet: A network error occured loading an XSLT stylesheet:
&gt; http://www.w3.org/2000/06/style/xsv.xsl

Can't reproduce.  What is the URI in the address bar when you see this
message, and what browser are you using?

ht
- -- 
       Henry S. Thompson, School of Informatics, University of Edinburgh
      10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
                Fax: (44) 131 651-1426, e-mail: ht@inf.ed.ac.uk
                       URL: http://www.ltg.ed.ac.uk/~ht/
 [mail from me _always_ has a .sig like this -- mail without it is forged spam]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFMa75OkjnJixAXWBoRAqfwAJ4saNtHSy49NWeMLSFpuo5xuCzD5gCffu3U
5kKRRJdPgqfaM4LPr39K6sQ=
=bmWY
-----END PGP SIGNATURE-----</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/201008/msg1000314657.html</link>
</item><item>
<title>Newbie question - 8/18/2010 9:46:00 AM</title>
<description><![CDATA[<pre>Hi!

I was trying to use your validation service, but I just get the
following error message:

Error loading stylesheet: A network error occured loading an XSLT stylesheet:
http://www.w3.org/2000/06/style/xsv.xsl

What am I doing wrong? In this case, I uploaded a file with the
following contents (with some stuff deleted):

&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;xs:schema xmlns:xs=&quot;http://www.w3.org/2001/XMLSchema&quot;
       xmlns=&quot;http://.../xsd/cdm/2010/08&quot;
       targetNamespace=&quot;http://.../xsd/cdm/2010/08&quot;
       elementFormDefault=&quot;qualified&quot;
       attributeFormDefault=&quot;unqualified&quot;&gt;
       &lt;!-- type definitions --&gt;
       &lt;xs:complexType name=&quot;DurationType&quot;&gt;
               &lt;xs:sequence&gt;
                       &lt;xs:element name=&quot;StartDateTime&quot; type=&quot;xs:dateTime&quot;/&gt;
                       &lt;xs:element name=&quot;EndDateTime&quot; type=&quot;xs:dateTime&quot;/&gt;
               &lt;/xs:sequence&gt;
       &lt;/xs:complexType&gt;
&lt;/xs:schema&gt;

Thanks.</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/201008/msg1000314651.html</link>
</item><item>
<title>Re: Looking for help. Implementing a XML validation engine in - 8/13/2010 6:37:00 PM</title>
<description><![CDATA[<pre>C.M.,

Thanks for the info. It's good to know that there is discussion going on
around this. Too bad a conclusion has not been reached.

Cheers,

Casey

On Tue, Aug 10, 2010 at 9:40 PM, C. M. Sperberg-McQueen &lt;
cmsmcq@blackmesatech.com&gt; wrote:

&gt;
&gt; On 10 Aug 2010, at 11:16 , Casey Jordan wrote:
&gt;
&gt;&gt;
&gt;&gt;
&gt;&gt; Here is the main problem, the greedy algorithm I developed does not work
&gt;&gt; for patterns like this:
&gt;&gt;
&gt;&gt; &lt;sequence&gt;
&gt;&gt;    &lt;element ref=&quot;e1&quot;/&gt;
&gt;&gt;    &lt;choice minOccurs=&quot;2&quot;&gt;
&gt;&gt;        &lt;element ref=&quot;e2&quot; maxOccurs=&quot;2&quot;/&gt;
&gt;&gt;        &lt;element ref=&quot;e3&quot;/&gt;
&gt;&gt;    &lt;/choice&gt;
&gt;&gt;    &lt;element ref=&quot;e4&quot;/&gt;
&gt;&gt; &lt;/sequence&gt;
&gt;&gt;
&gt;&gt; This can be seen as a regular expression e1( e2{1,2} | e3 ){2,2} e4. My
&gt;&gt; greedy algorithm cannot validate this correctly.
&gt;&gt;
&gt;&gt; Assuming input like &lt;e1/&gt;&lt;e2/&gt;&lt;e2/&gt;&lt;e4/&gt;
&gt;&gt;
&gt;&gt; My algorithm will match all the way up to the &lt;e4/&gt; in the first pass
&gt;&gt; through the choice: ( e2{1,2} | e3 ){2,2} because it does not realize that
&gt;&gt; both &lt;e2/&gt; elements should be treated individually as matches for the
&gt;&gt; choice, and not a single match for the choice. Validation then fails because
&gt;&gt; it is expecting one more of &lt;e2/&gt; or &lt;e3/&gt;. There is not an easy way to
&gt;&gt; build this into my current algorithm.
&gt;&gt;
&gt;
&gt; There is a good, solid discussion and solution of this issue
&gt; in the paper &quot;Towards efficient implementation of XML schema
&gt; content models&quot;, by Pekka Kilpel&#228;inen and Rauno Tuhkanen,
&gt; in the proceedings of Document Engineering 2004. See
&gt; http://portal.acm.org/citation.cfm?doid=1030397.1030441
&gt; for more bibliographic information and a link to the full
&gt; text (for subscribers to the ACM digital library).
&gt;
&gt; It may be worth while to note that the problem you have
&gt; encountered results from a blunder on the part of the XSD working
&gt; group, which failed to notice, when introducing numeric ranges
&gt; for occurrence indicators, that the difference between
&gt; weak determinism and strong determinism was now important
&gt; and visible in the language, and thus failed to reach any
&gt; considered decision on whether to require weak determinism
&gt; or strong determinism.  As the rule known as the 'Unique Particle
&gt; Attribution' constraint shows, the WG ended up with weak
&gt; determinism, but this was not a conscious choice. I wish the
&gt; WG had had the guts to fix this design error in 1.1, but we
&gt; did not.
&gt;
&gt; Instead, each implementation has found a different way of
&gt; fudging the issue, with the result that schemas which exhibit
&gt; the problem (i.e. content models which are weakly deterministic
&gt; but not strongly deterministic) are unambiguously legal and have a
&gt; well defined interpretation, but relatively few implementations
&gt; actually implement what the spec says, and no two of them are
&gt; likely to implement exactly the same thing.  The schema
&gt; author thus gets the best of both worlds:  different implementations
&gt; will do different things with the schema, but since the schema
&gt; is legal, it's unlikely that the schema author will be
&gt; alerted to the difficulty.
&gt;
&gt;
&gt; --
&gt; ****************************************************************
&gt; * C. M. Sperberg-McQueen, Black Mesa Technologies LLC
&gt; * http://www.blackmesatech.com
&gt; * http://cmsmcq.com/mib
&gt; * http://balisage.net
&gt; ****************************************************************
&gt;
&gt;
&gt;
&gt;
&gt;


-- 
--
Casey Jordan
Jorsek Software LLC.
&quot;CaseyDJordan&quot; on LinkedIn, Twitter &amp; Facebook
Cell (585) 348 7399
Office (585) 239 6060
Jorsek.com


This message is intended only for the use of the Addressee(s) and may
contain information that is privileged, confidential, and/or exempt from
disclosure under applicable law.  If you are not the intended recipient,
please be advised that any disclosure  copying, distribution, or use of
the information contained herein is prohibited.  If you have received
this communication in error, please destroy all copies of the message,
whether in electronic or hard copy format, as well as attachments, and
immediately contact the sender by replying to this e-mail or by phone.
Thank you.</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/201008/msg1000314607.html</link>
</item><item>
<title>Re: Looking for help. Implementing a XML validation engine in   - 8/11/2010 1:40:00 AM</title>
<description><![CDATA[<pre>On 10 Aug 2010, at 11:16 , Casey Jordan wrote:
&gt;
&gt;
&gt; Here is the main problem, the greedy algorithm I developed does not  
&gt; work for patterns like this:
&gt;
&gt; &lt;sequence&gt;
&gt;     &lt;element ref=&quot;e1&quot;/&gt;
&gt;     &lt;choice minOccurs=&quot;2&quot;&gt;
&gt;         &lt;element ref=&quot;e2&quot; maxOccurs=&quot;2&quot;/&gt;
&gt;         &lt;element ref=&quot;e3&quot;/&gt;
&gt;     &lt;/choice&gt;
&gt;     &lt;element ref=&quot;e4&quot;/&gt;
&gt; &lt;/sequence&gt;
&gt;
&gt; This can be seen as a regular expression e1( e2{1,2} | e3 ){2,2} e4.  
&gt; My greedy algorithm cannot validate this correctly.
&gt;
&gt; Assuming input like &lt;e1/&gt;&lt;e2/&gt;&lt;e2/&gt;&lt;e4/&gt;
&gt;
&gt; My algorithm will match all the way up to the &lt;e4/&gt; in the first  
&gt; pass through the choice: ( e2{1,2} | e3 ){2,2} because it does not  
&gt; realize that both &lt;e2/&gt; elements should be treated individually as  
&gt; matches for the choice, and not a single match for the choice.  
&gt; Validation then fails because it is expecting one more of &lt;e2/&gt; or  
&gt; &lt;e3/&gt;. There is not an easy way to build this into my current  
&gt; algorithm.

There is a good, solid discussion and solution of this issue
in the paper &quot;Towards efficient implementation of XML schema
content models&quot;, by Pekka Kilpel&#228;inen and Rauno Tuhkanen,
in the proceedings of Document Engineering 2004. See
http://portal.acm.org/citation.cfm?doid=1030397.1030441
for more bibliographic information and a link to the full
text (for subscribers to the ACM digital library).

It may be worth while to note that the problem you have
encountered results from a blunder on the part of the XSD working
group, which failed to notice, when introducing numeric ranges
for occurrence indicators, that the difference between
weak determinism and strong determinism was now important
and visible in the language, and thus failed to reach any
considered decision on whether to require weak determinism
or strong determinism.  As the rule known as the 'Unique Particle
Attribution' constraint shows, the WG ended up with weak
determinism, but this was not a conscious choice. I wish the
WG had had the guts to fix this design error in 1.1, but we
did not.

Instead, each implementation has found a different way of
fudging the issue, with the result that schemas which exhibit
the problem (i.e. content models which are weakly deterministic
but not strongly deterministic) are unambiguously legal and have a
well defined interpretation, but relatively few implementations
actually implement what the spec says, and no two of them are
likely to implement exactly the same thing.  The schema
author thus gets the best of both worlds:  different implementations
will do different things with the schema, but since the schema
is legal, it's unlikely that the schema author will be
alerted to the difficulty.


-- 
****************************************************************
* C. M. Sperberg-McQueen, Black Mesa Technologies LLC
* http://www.blackmesatech.com
* http://cmsmcq.com/mib
* http://balisage.net
****************************************************************</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/201008/msg1000314574.html</link>
</item><item>
<title>Re: Looking for help. Implementing a XML validation engine in  - 8/10/2010 10:28:00 PM</title>
<description><![CDATA[<pre>&gt; The rate of that processing increase is not directly proportional to 
the growth of input leaving something like a logarithmic curve.

With one or two unimportant exceptions, such as key/keyref, I believe 
that the cost of XSD validation is indeed linear with the size of the 
document being validated.
&gt; As far as what I said about the namespace issue here is an example:
&gt;
&gt; var a = function () {
&gt;      var b = 5;
&gt;      subfunction1();
&gt;      subfunction2();
&gt; }
&gt;    

OK. It seems (a) your use of the word &quot;namespace&quot; has nothing to do with 
XML namespaces, which is what confused me, and (b) you are saying, in 
some detail, that Javascript is a language which has traps for the 
unwary programmer. I'm sure you're right. So do most languages.

Michael Kay
Saxonica</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/201008/msg1000314572.html</link>
</item><item>
<title>Re: Looking for help. Implementing a XML validation engine in  - 8/10/2010 9:58:00 PM</title>
<description><![CDATA[<pre>Michael,

Processing and generating instructions is relative to the length of input.  Processing is fast until it is not.  What such a broad claim eludes to is that many smaller examples of input may appear to be fast enough to generate output against.  At a point when the input becomes large enough generating the output becomes too slow for user acceptance even if output is returned fast for acceptable testing.  At that point once the input grows the length in processing time becomes incrementally noticeable.  I don't know what the math calculation is, but as input grows the length of processing increases.  The rate of that processing increase is not directly proportional to the growth of input leaving something like a logarithmic curve.

When I was attempting to write my HTML lint code last year I was using the latest JavaScript interpreters at the time.  The delay, in my case, was most certainly due to hardware as I was write my code only on a netbook, which is perhaps 5-6 times slower than my current work computer.  Even though the hardware was slow it was still an acceptable test platform given the variety of hardware currently in use.  My primary test example at the time was the Travelocity homepage with only minimal changes necessary for XHTML syntax compatibility.  The sample I was using was about 174K.

As far as what I said about the namespace issue here is an example:

var a = function () {
    var b = 5;
    subfunction1();
    subfunction2();
}

In the above example subfunction1 and subfunction2 are functions not defined in function &quot;a&quot;.  Variable &quot;b&quot; is a closure to subfunction1() and subfunction2() by their inclusion into the scope of function &quot;a&quot;.  Presume each of those sub functions exit using the &quot;return&quot; keyword with a value and that each of those sub functions do consume closure &quot;b&quot;.  Finally, presume each of those sub functions are also executed by inclusion into other pieces of code that you do not see.  In those case you can see those sub functions in their relation to closure &quot;b&quot;, so if you know what those functions do and how they consume &quot;b&quot; then you will know what to expect when they return and what to expect if that returned value is used in a statement or other function under &quot;a&quot;.  But, what if &quot;b&quot; is a closure, but not under &quot;a&quot; and its scope is not clear in relation to the inclusion of those sub functions?  No big deal, because you will likely still have any idea what to expect from &quot;a&quot; from testing the code and have an idea what to expect from the output.  The prior statement is not entirely accurate, because &quot;b&quot; can be dynamic before it is consumed by the sub functions and if it is so dynamically set and the sub functions are like wise being executed by inclusion in multiple places then &quot;b&quot; can become a link between those pieces of execution.  An unintended link between separated pieces of logic is a covert channel.

The exemplified covert channel can be interrupted by use of a variable &quot;b&quot; at a scope low enough so that it is isolated to only one instance of execution.  This is typically represented as an unintentional condition in a code set of many scope layers using many like named variables, such that a coder in once instance may arbitrarily scope a new variable where a difference variable exists with the same name in a higher scope.

In my previous email I mentioned the possibility of collision.  If variable &quot;b&quot; does exist at a higher scope, is dynamic, and is consumed by interchangeable pieces that are reused in various places the possibility of collision occurs when those pieces of consuming logic return and their consuming functions process that returned data.  Data prepared for one instance of logic, in that case, may be consumed by a separate instance of logic due blurred direction upon the linkage.  This is not a failure of the logic of the language, but is the result of possible oversight by the coder in the absence of controls or regulation upon the multiple instances of code working together in manners not expected.  That is how advertisements can, by accident and not maliciously, halt JavaScript processing upon a page.  Internally to a closed application it can result in unnecessary churn that adds to the logarithmic processing times of increasingly larger code.

Such a covert channel is not necessarily a prominent security risk in JavaScript only because such conditions are difficult to identify in the wild without some sort of web spider that is capable of perform automated flow control analysis of the logic and because there are so many other easier ways to compromise targets on the web with a higher degree of assurance and at a significantly lower cost.  The primary harm in such covert channels that is that instructions can be moved in memory without IO back to the user, so it is hard to determine that errors in logic actually exist.</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/201008/msg1000314570.html</link>
</item><item>
<title>Re: Looking for help. Implementing a XML validation engine in   - 8/10/2010 6:36:00 PM</title>
<description><![CDATA[<pre>Micheal,

Did you encounter the problem Henry outlined in developing saxon? If so, did
you solve it the same way?

Cheers,

Casey

On Tue, Aug 10, 2010 at 2:22 PM, Casey Jordan &lt;casey.jordan@jorsek.com&gt;wrote:

&gt; Henry,
&gt;
&gt; This paper is fantastic. Thank you very much.
&gt;
&gt; Based on your paper, it seems to me that for now, a greedy algorithm will
&gt; suffice for my needs. As the &quot;vulnerable&quot; cases are so rare.
&gt;
&gt; I had actually experimented with backtracking to solve my problem with no
&gt; luck. However this is probably due to my lack of experience with this stuff.
&gt; I will attempt to try this again.
&gt;
&gt; Is there a specific area in the XSV code that might be useful for me to
&gt; look over, that you could point me to?
&gt;
&gt; Thanks,
&gt;
&gt; Casey
&gt;
&gt;
&gt;
&gt;
&gt;
&gt; On Tue, Aug 10, 2010 at 1:43 PM, Henry S. Thompson &lt;ht@inf.ed.ac.uk&gt;wrote:
&gt;
&gt;&gt; -----BEGIN PGP SIGNED MESSAGE-----
&gt;&gt; Hash: SHA1
&gt;&gt;
&gt;&gt; Casey Jordan writes:
&gt;&gt;
&gt;&gt; &gt; Henry,Is this considered &quot;Strong determinism&quot;? I think I came across
&gt;&gt; &gt; this in the code you pointed me too.Thanks,
&gt;&gt;
&gt;&gt; I don't remember using that phrase.  I realise I forgot the reference,
&gt;&gt; which is here:
&gt;&gt;
&gt;&gt;  http://xtech06.usefulinc.com/schedule/paper/118
&gt;&gt;
&gt;&gt; ht
&gt;&gt; - --
&gt;&gt;       Henry S. Thompson, School of Informatics, University of Edinburgh
&gt;&gt;      10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
&gt;&gt;                Fax: (44) 131 651-1426, e-mail: ht@inf.ed.ac.uk
&gt;&gt;                       URL: http://www.ltg.ed.ac.uk/~ht/
&gt;&gt;  [mail from me _always_ has a .sig like this -- mail without it is forged
&gt;&gt; spam]
&gt;&gt; -----BEGIN PGP SIGNATURE-----
&gt;&gt; Version: GnuPG v1.2.6 (GNU/Linux)
&gt;&gt;
&gt;&gt; iD8DBQFMYY/NkjnJixAXWBoRAh+LAJ9IY6X1GaZllgiReCdbFlrDC2dE+ACfapSI
&gt;&gt; 2mae/orEjLDGX6ZmN0nSUwA=
&gt;&gt; =0Gk/
&gt;&gt; -----END PGP SIGNATURE-----
&gt;&gt;
&gt;
&gt;
&gt;
&gt; --
&gt; --
&gt; Casey Jordan
&gt; Jorsek Software LLC.
&gt; &quot;CaseyDJordan&quot; on LinkedIn, Twitter &amp; Facebook
&gt; Cell (585) 348 7399
&gt; Office (585) 239 6060
&gt; Jorsek.com
&gt;
&gt;
&gt; This message is intended only for the use of the Addressee(s) and may
&gt; contain information that is privileged, confidential, and/or exempt from
&gt; disclosure under applicable law.  If you are not the intended recipient,
&gt; please be advised that any disclosure  copying, distribution, or use of
&gt; the information contained herein is prohibited.  If you have received
&gt; this communication in error, please destroy all copies of the message,
&gt; whether in electronic or hard copy format, as well as attachments, and
&gt; immediately contact the sender by replying to this e-mail or by phone.
&gt; Thank you.
&gt;



-- 
--
Casey Jordan
Jorsek Software LLC.
&quot;CaseyDJordan&quot; on LinkedIn, Twitter &amp; Facebook
Cell (585) 348 7399
Office (585) 239 6060
Jorsek.com


This message is intended only for the use of the Addressee(s) and may
contain information that is privileged, confidential, and/or exempt from
disclosure under applicable law.  If you are not the intended recipient,
please be advised that any disclosure  copying, distribution, or use of
the information contained herein is prohibited.  If you have received
this communication in error, please destroy all copies of the message,
whether in electronic or hard copy format, as well as attachments, and
immediately contact the sender by replying to this e-mail or by phone.
Thank you.</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/201008/msg1000314567.html</link>
</item><item>
<title>Re: Looking for help. Implementing a XML validation engine in   - 8/10/2010 6:25:00 PM</title>
<description><![CDATA[<pre>Henry,

This paper is fantastic. Thank you very much.

Based on your paper, it seems to me that for now, a greedy algorithm will
suffice for my needs. As the &quot;vulnerable&quot; cases are so rare.

I had actually experimented with backtracking to solve my problem with no
luck. However this is probably due to my lack of experience with this stuff.
I will attempt to try this again.

Is there a specific area in the XSV code that might be useful for me to look
over, that you could point me to?

Thanks,

Casey





On Tue, Aug 10, 2010 at 1:43 PM, Henry S. Thompson &lt;ht@inf.ed.ac.uk&gt; wrote:

&gt; -----BEGIN PGP SIGNED MESSAGE-----
&gt; Hash: SHA1
&gt;
&gt; Casey Jordan writes:
&gt;
&gt; &gt; Henry,Is this considered &quot;Strong determinism&quot;? I think I came across
&gt; &gt; this in the code you pointed me too.Thanks,
&gt;
&gt; I don't remember using that phrase.  I realise I forgot the reference,
&gt; which is here:
&gt;
&gt;  http://xtech06.usefulinc.com/schedule/paper/118
&gt;
&gt; ht
&gt; - --
&gt;       Henry S. Thompson, School of Informatics, University of Edinburgh
&gt;      10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
&gt;                Fax: (44) 131 651-1426, e-mail: ht@inf.ed.ac.uk
&gt;                       URL: http://www.ltg.ed.ac.uk/~ht/
&gt;  [mail from me _always_ has a .sig like this -- mail without it is forged
&gt; spam]
&gt; -----BEGIN PGP SIGNATURE-----
&gt; Version: GnuPG v1.2.6 (GNU/Linux)
&gt;
&gt; iD8DBQFMYY/NkjnJixAXWBoRAh+LAJ9IY6X1GaZllgiReCdbFlrDC2dE+ACfapSI
&gt; 2mae/orEjLDGX6ZmN0nSUwA=
&gt; =0Gk/
&gt; -----END PGP SIGNATURE-----
&gt;



-- 
--
Casey Jordan
Jorsek Software LLC.
&quot;CaseyDJordan&quot; on LinkedIn, Twitter &amp; Facebook
Cell (585) 348 7399
Office (585) 239 6060
Jorsek.com


This message is intended only for the use of the Addressee(s) and may
contain information that is privileged, confidential, and/or exempt from
disclosure under applicable law.  If you are not the intended recipient,
please be advised that any disclosure  copying, distribution, or use of
the information contained herein is prohibited.  If you have received
this communication in error, please destroy all copies of the message,
whether in electronic or hard copy format, as well as attachments, and
immediately contact the sender by replying to this e-mail or by phone.
Thank you.</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/201008/msg1000314566.html</link>
</item><item>
<title>Re: Looking for help. Implementing a XML validation engine in  - 8/10/2010 5:45:00 PM</title>
<description><![CDATA[<pre>-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Casey Jordan writes:

&gt; Henry,Is this considered &quot;Strong determinism&quot;? I think I came across
&gt; this in the code you pointed me too.Thanks,

I don't remember using that phrase.  I realise I forgot the reference,
which is here:

 http://xtech06.usefulinc.com/schedule/paper/118

ht
- -- 
       Henry S. Thompson, School of Informatics, University of Edinburgh
      10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
                Fax: (44) 131 651-1426, e-mail: ht@inf.ed.ac.uk
                       URL: http://www.ltg.ed.ac.uk/~ht/
 [mail from me _always_ has a .sig like this -- mail without it is forged spam]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFMYY/NkjnJixAXWBoRAh+LAJ9IY6X1GaZllgiReCdbFlrDC2dE+ACfapSI
2mae/orEjLDGX6ZmN0nSUwA=
=0Gk/
-----END PGP SIGNATURE-----</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/201008/msg1000314565.html</link>
</item><item>
<title>Re: Looking for help. Implementing a XML validation engine in   - 8/10/2010 5:32:00 PM</title>
<description><![CDATA[<pre>Henry,

Is this considered &quot;Strong determinism&quot;? I think I came across this in the
code you pointed me too.

Thanks,

Casey

On Tue, Aug 10, 2010 at 1:25 PM, Henry S. Thompson &lt;ht@inf.ed.ac.uk&gt; wrote:

&gt; -----BEGIN PGP SIGNED MESSAGE-----
&gt; Hash: SHA1
&gt;
&gt; Casey Jordan writes:
&gt;
&gt; &gt; &lt;sequence&gt;
&gt; &gt;     &lt;element ref=&quot;e1&quot;/&gt;
&gt; &gt;     &lt;choice minOccurs=&quot;2&quot;&gt;
&gt; &gt;         &lt;element ref=&quot;e2&quot; maxOccurs=&quot;2&quot;/&gt;
&gt; &gt;         &lt;element ref=&quot;e3&quot;/&gt;
&gt; &gt;     &lt;/choice&gt;
&gt; &gt;     &lt;element ref=&quot;e4&quot;/&gt;
&gt; &gt; &lt;/sequence&gt;
&gt; &gt;
&gt; &gt; This can be seen as a regular expression e1( e2{1,2} | e3 ){2,2} e4. My
&gt; &gt; greedy algorithm cannot validate this correctly.
&gt; &gt;
&gt; &gt; Assuming input like &lt;e1/&gt;&lt;e2/&gt;&lt;e2/&gt;&lt;e4/&gt;
&gt;
&gt; This problem is discussed in [1], which asserts that you need to fall
&gt; back to pseudo-parallel or backtracking in such cases.  The Python
&gt; code in XSV, which I pointed you to yesterday, implements this
&gt; fallback.
&gt;
&gt; ht
&gt; - --
&gt;       Henry S. Thompson, School of Informatics, University of Edinburgh
&gt;      10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
&gt;                Fax: (44) 131 651-1426, e-mail: ht@inf.ed.ac.uk
&gt;                       URL: http://www.ltg.ed.ac.uk/~ht/
&gt;  [mail from me _always_ has a .sig like this -- mail without it is forged
&gt; spam]
&gt; -----BEGIN PGP SIGNATURE-----
&gt; Version: GnuPG v1.2.6 (GNU/Linux)
&gt;
&gt; iD8DBQFMYYuRkjnJixAXWBoRAk1IAJoC+/plq5hesivHGcVJoxCwMn3MMACfRsZp
&gt; SKwiRx0+ZdwKtHXRq8jOwjE=
&gt; =tq8F
&gt; -----END PGP SIGNATURE-----
&gt;



-- 
--
Casey Jordan
Jorsek Software LLC.
&quot;CaseyDJordan&quot; on LinkedIn, Twitter &amp; Facebook
Cell (585) 348 7399
Office (585) 239 6060
Jorsek.com


This message is intended only for the use of the Addressee(s) and may
contain information that is privileged, confidential, and/or exempt from
disclosure under applicable law.  If you are not the intended recipient,
please be advised that any disclosure  copying, distribution, or use of
the information contained herein is prohibited.  If you have received
this communication in error, please destroy all copies of the message,
whether in electronic or hard copy format, as well as attachments, and
immediately contact the sender by replying to this e-mail or by phone.
Thank you.</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/201008/msg1000314564.html</link>
</item><item>
<title>Re: Looking for help. Implementing a XML validation engine in   - 8/10/2010 5:27:00 PM</title>
<description><![CDATA[<pre>-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Casey Jordan writes:

&gt; &lt;sequence&gt;
&gt;     &lt;element ref=&quot;e1&quot;/&gt;
&gt;     &lt;choice minOccurs=&quot;2&quot;&gt;
&gt;         &lt;element ref=&quot;e2&quot; maxOccurs=&quot;2&quot;/&gt;
&gt;         &lt;element ref=&quot;e3&quot;/&gt;
&gt;     &lt;/choice&gt;
&gt;     &lt;element ref=&quot;e4&quot;/&gt;
&gt; &lt;/sequence&gt;
&gt;
&gt; This can be seen as a regular expression e1( e2{1,2} | e3 ){2,2} e4. My
&gt; greedy algorithm cannot validate this correctly.
&gt;
&gt; Assuming input like &lt;e1/&gt;&lt;e2/&gt;&lt;e2/&gt;&lt;e4/&gt;

This problem is discussed in [1], which asserts that you need to fall
back to pseudo-parallel or backtracking in such cases.  The Python
code in XSV, which I pointed you to yesterday, implements this
fallback.

ht
- -- 
       Henry S. Thompson, School of Informatics, University of Edinburgh
      10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
                Fax: (44) 131 651-1426, e-mail: ht@inf.ed.ac.uk
                       URL: http://www.ltg.ed.ac.uk/~ht/
 [mail from me _always_ has a .sig like this -- mail without it is forged spam]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFMYYuRkjnJixAXWBoRAk1IAJoC+/plq5hesivHGcVJoxCwMn3MMACfRsZp
SKwiRx0+ZdwKtHXRq8jOwjE=
=tq8F
-----END PGP SIGNATURE-----</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/201008/msg1000314563.html</link>
</item><item>
<title>Re: Looking for help. Implementing a XML validation engine in   - 8/10/2010 5:18:00 PM</title>
<description><![CDATA[<pre>I should have noted the following:


   - Since this is for an in-browser wysiwyg xml editor, I am only doing
   validations of sub-trees when the change from editing. So this makes it much
   more efficient.
   - The document is validated on the server before entering the client
   environment.
   - I am assuming well-formedness and my validation will be done in the
   DOM. (The user cannot edit the raw xml and caused invalid xml form)
   - I am not worried about simple type validation, as that can be done via
   regular expressions.

*
*
*Edward:* JavaScript can most definitely handle this problem Especially if
the conversions to FSA are done on the server and cached. You also lost me
with the namespace stuff, but it sounds interesting.

*Micheal:* I agree.

*Peter:*

This is very interesting, it seems I am working from the opposite
direction.

Here are the steps I take in my current algorithm:

1.) I use XQuery and XSLT to completely normalize the schema on the server.
This resolves all imports, includes, groups, extensions, restrictions,
substitutionGroups etc.. all done with respect to namespaces. So essentially
I turn the schema into a bunch of element declarations with complexType
pattern definition for each, which is a regular grammer (from what I
understand)

2.) This gets sent to the server and my javascript reads and parses it into
memory.

3.) When validating I step through the complexType pattern as a tree and use
a greedy matching algorithm against the children of an element to be
validated. Along the way I check for required min occuences, if I reach the
end of the pattern and still have input elements that are not matched I know
I have unexpected elements. This works pretty well but theoretically it has
problems.

Here is the main problem, the greedy algorithm I developed does not work for
patterns like this:

&lt;sequence&gt;
    &lt;element ref=&quot;e1&quot;/&gt;
    &lt;choice minOccurs=&quot;2&quot;&gt;
        &lt;element ref=&quot;e2&quot; maxOccurs=&quot;2&quot;/&gt;
        &lt;element ref=&quot;e3&quot;/&gt;
    &lt;/choice&gt;
    &lt;element ref=&quot;e4&quot;/&gt;
&lt;/sequence&gt;

This can be seen as a regular expression e1( e2{1,2} | e3 ){2,2} e4. My
greedy algorithm cannot validate this correctly.

Assuming input like &lt;e1/&gt;&lt;e2/&gt;&lt;e2/&gt;&lt;e4/&gt;

My algorithm will match all the way up to the &lt;e4/&gt; in the first pass
through the choice: ( e2{1,2} | e3 ){2,2} because it does not realize that
both &lt;e2/&gt; elements should be treated individually as matches for the
choice, and not a single match for the choice. Validation then
fails because it is expecting one more of &lt;e2/&gt; or &lt;e3/&gt;. There is not an
easy way to build this into my current algorithm.

For the moment this seems to be &quot;good enough&quot;, I rarely see real world
schemas that do this, but I need to have a game plan to actually fix this in
the future.

Cheers,

Casey

On Tue, Aug 10, 2010 at 5:23 AM, Michael Kay &lt;mike@saxonica.com&gt; wrote:

&gt; On 10/08/2010 02:53, Cheney, Edward A SSG RES USAR USARC wrote:
&gt;
&gt;&gt; Casey,
&gt;&gt;
&gt;&gt; I have attempted to write a Lint engine for HTML to imply conformance to
&gt;&gt; an XHTML type syntax with rigid structure requirements to throw errors for
&gt;&gt; violations that conflict with either semantics or accessibility.  The
&gt;&gt; problems I ran into are:
&gt;&gt;
&gt;&gt; 1)  JavaScript is too slow for any sort of validation engine where
&gt;&gt; structure is stressed as well as syntax.  JavaScript is a high level
&gt;&gt; interpreted language, and so it about as slow as it gets with regards to
&gt;&gt; programming.
&gt;&gt;
&gt;&gt;
&gt;
&gt; I would have said this a couple of years ago, but for client-side
&gt; processing, I don't think this is true nowadays. The typical desktop machine
&gt; (not mobile devices, perhaps) has enough processor cycles going spare to
&gt; tolerate a great deal of inefficiency. Delays from the server and the
&gt; network tend to overshadow any delays from client-side processing. Also, I
&gt; think Javascript engines are getting steadily better.
&gt;
&gt; And it does seem that if you want to implement stuff in the browser,
&gt; writing it in Javascript is often the only choice (writing in XSLT 1.0 is
&gt; sometimes an alternative, but probably not here!). So writing an XSD
&gt; validator in Javascript certainly doesn't seem an unreasonable idea.
&gt;
&gt; I'm not sure what you mean by &quot;structure is stressed as well as syntax&quot;.
&gt; Validating the structure of an instance document using an FSA is actually
&gt; extremely fast. What takes time is building the FSA (so it would be a good
&gt; idea to try and avoid doing that every time). The other significant cost in
&gt; validation is validating non-string fields against simple type definitions -
&gt; for example, dates and times - the code for that is thoroughly
&gt; uninteresting, but because it's looking at each character, the cost can be
&gt; quite high.
&gt;
&gt;
&gt;  2) Logically, the natural inclination of JavaScript towards Lambda
&gt;&gt; closures in theory should be helpful enough to solve the prior problem, but
&gt;&gt; that is not so in practice.  This is line of thought is further enforced by
&gt;&gt; the mere fact that XML namespace inheritance appears to likewise follow a
&gt;&gt; Lambda model.  Unfortunately, this is not a benefit enough to over come the
&gt;&gt; processing inefficiencies described in the prior point.  Additionally,
&gt;&gt; Lambda models exist because they are helpful, however that do appear to
&gt;&gt; directly represent strong potential towards the covert channels better
&gt;&gt; described in systems architectures.  The covert channels are not so much a
&gt;&gt; concern here for security violations, but rather for logic collision with
&gt;&gt; regard to reuse of logic components where closure is manifest in that reuse,
&gt;&gt; but scoped above the parts being reused.
&gt;&gt;
&gt;&gt;
&gt;&gt;
&gt; This sounds fascinating, but I have absolutely no idea what you are talking
&gt; about. &quot;Namespace inheritance follows a lambda model&quot;? You seem to be seeing
&gt; connections that I've never seen. Could you elucidate? And I don't
&gt; understand your references to covert channels either. You seem to be packing
&gt; an argument that deserves 10 pages into one paragraph, and it's left me
&gt; completely lost.
&gt;
&gt; Michael Kay
&gt; Saxonica
&gt;



-- 
--
Casey Jordan
Jorsek Software LLC.
&quot;CaseyDJordan&quot; on LinkedIn, Twitter &amp; Facebook
Cell (585) 348 7399
Office (585) 239 6060
Jorsek.com


This message is intended only for the use of the Addressee(s) and may
contain information that is privileged, confidential, and/or exempt from
disclosure under applicable law.  If you are not the intended recipient,
please be advised that any disclosure  copying, distribution, or use of
the information contained herein is prohibited.  If you have received
this communication in error, please destroy all copies of the message,
whether in electronic or hard copy format, as well as attachments, and
immediately contact the sender by replying to this e-mail or by phone.
Thank you.</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/201008/msg1000314562.html</link>
</item><item>
<title>Re: Looking for help. Implementing a XML validation engine in  - 8/10/2010 9:25:00 AM</title>
<description><![CDATA[<pre>On 10/08/2010 02:53, Cheney, Edward A SSG RES USAR USARC wrote:
&gt; Casey,
&gt;
&gt; I have attempted to write a Lint engine for HTML to imply conformance to an XHTML type syntax with rigid structure requirements to throw errors for violations that conflict with either semantics or accessibility.  The problems I ran into are:
&gt;
&gt; 1)  JavaScript is too slow for any sort of validation engine where structure is stressed as well as syntax.  JavaScript is a high level interpreted language, and so it about as slow as it gets with regards to programming.
&gt;    

I would have said this a couple of years ago, but for client-side 
processing, I don't think this is true nowadays. The typical desktop 
machine (not mobile devices, perhaps) has enough processor cycles going 
spare to tolerate a great deal of inefficiency. Delays from the server 
and the network tend to overshadow any delays from client-side 
processing. Also, I think Javascript engines are getting steadily better.

And it does seem that if you want to implement stuff in the browser, 
writing it in Javascript is often the only choice (writing in XSLT 1.0 
is sometimes an alternative, but probably not here!). So writing an XSD 
validator in Javascript certainly doesn't seem an unreasonable idea.

I'm not sure what you mean by &quot;structure is stressed as well as syntax&quot;. 
Validating the structure of an instance document using an FSA is 
actually extremely fast. What takes time is building the FSA (so it 
would be a good idea to try and avoid doing that every time). The other 
significant cost in validation is validating non-string fields against 
simple type definitions - for example, dates and times - the code for 
that is thoroughly uninteresting, but because it's looking at each 
character, the cost can be quite high.

&gt; 2) Logically, the natural inclination of JavaScript towards Lambda closures in theory should be helpful enough to solve the prior problem, but that is not so in practice.  This is line of thought is further enforced by the mere fact that XML namespace inheritance appears to likewise follow a Lambda model.  Unfortunately, this is not a benefit enough to over come the processing inefficiencies described in the prior point.  Additionally, Lambda models exist because they are helpful, however that do appear to directly represent strong potential towards the covert channels better described in systems architectures.  The covert channels are not so much a concern here for security violations, but rather for logic collision with regard to reuse of logic components where closure is manifest in that reuse, but scoped above the parts being reused.
&gt;
&gt;    
This sounds fascinating, but I have absolutely no idea what you are 
talking about. &quot;Namespace inheritance follows a lambda model&quot;? You seem 
to be seeing connections that I've never seen. Could you elucidate? And 
I don't understand your references to covert channels either. You seem 
to be packing an argument that deserves 10 pages into one paragraph, and 
it's left me completely lost.

Michael Kay
Saxonica</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/201008/msg1000314555.html</link>
</item><item>
<title>Re: Looking for help. Implementing a XML validation engine in  - 8/10/2010 1:56:00 AM</title>
<description><![CDATA[<pre>Casey,

I have attempted to write a Lint engine for HTML to imply conformance to an XHTML type syntax with rigid structure requirements to throw errors for violations that conflict with either semantics or accessibility.  The problems I ran into are:

1)  JavaScript is too slow for any sort of validation engine where structure is stressed as well as syntax.  JavaScript is a high level interpreted language, and so it about as slow as it gets with regards to programming.  My experience writing such things with JavaScript has left me to believe that in order to return any level of acceptable processing time you can have syntax validation like that of JSLint or structure analysis like that of the markup beautifier used by Pretty Diff tool, but you cannot have both.  I even mean far too slow even on the latest and greatest interpreters.

2) Logically, the natural inclination of JavaScript towards Lambda closures in theory should be helpful enough to solve the prior problem, but that is not so in practice.  This is line of thought is further enforced by the mere fact that XML namespace inheritance appears to likewise follow a Lambda model.  Unfortunately, this is not a benefit enough to over come the processing inefficiencies described in the prior point.  Additionally, Lambda models exist because they are helpful, however that do appear to directly represent strong potential towards the covert channels better described in systems architectures.  The covert channels are not so much a concern here for security violations, but rather for logic collision with regard to reuse of logic components where closure is manifest in that reuse, but scoped above the parts being reused.

These are the problems I ran into when using JavaScript in a similar manner.  For me the task became too ambitious for my feeble understanding of JavaScript and general inexperience programming.  I sincerely hope you succeed where I did not hope my pitfalls are something that are not present in your current frustrations.

Austin</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/201008/msg1000314551.html</link>
</item><item>
<title>Looking for help. Implementing a XML validation engine in JavaScript. - 8/9/2010 6:35:00 PM</title>
<description><![CDATA[<pre>Community,

As some of you may know for the past few months I have been working on
implementing the DOM3 Validation spec for XML Schema in JavaScript.

I have made alot of headway but my attempts at creating a algorithm that
correctly validates content models has come short several times now. At the
present I am in dire need of someone who might be able to help me better
understand implemention of the algorithms presented here:
http://www.ltg.ed.ac.uk/~ht/XML_Europe_2003.html in JavaScript. These
methods seem to have a well founded mathematical basis.

Any help would be much appreciated. I have also created a thread on
stackoverflow.com outlining my problem:
http://stackoverflow.com/questions/3418739/finite-state-machine-implementing-a-xml-schema-validator-in-javascript

Thank you all very much for the help in the past and ongoing patience.

Cheers,

Casey

-- 
--
Casey Jordan
Jorsek Software LLC.
&quot;CaseyDJordan&quot; on LinkedIn, Twitter &amp; Facebook
Cell (585) 348 7399
Office (585) 239 6060
Jorsek.com


This message is intended only for the use of the Addressee(s) and may
contain information that is privileged, confidential, and/or exempt from
disclosure under applicable law.  If you are not the intended recipient,
please be advised that any disclosure  copying, distribution, or use of
the information contained herein is prohibited.  If you have received
this communication in error, please destroy all copies of the message,
whether in electronic or hard copy format, as well as attachments, and
immediately contact the sender by replying to this e-mail or by phone.
Thank you.</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/201008/msg1000314541.html</link>
</item><item>
<title>Re: Java source code for xml schema validation - 8/5/2010 12:11:00 AM</title>
<description><![CDATA[<pre>Nevermind, just found the source code for the apache validator!

Thanks anyway.

On Wed, Aug 4, 2010 at 7:55 PM, Casey Jordan &lt;casey.jordan@jorsek.com&gt;wrote:

&gt; Hey crew,
&gt;
&gt; Does anyone know of any java xml validators that have source code
&gt; available? I've spent a good amount of time looking with no luck. I'm trying
&gt; to answer some tough questions right now and the ability to see some
&gt; implemented code would help alot.
&gt;
&gt; Thanks,
&gt;
&gt; Casey
&gt;
&gt; --
&gt; --
&gt; Casey Jordan
&gt; Jorsek Software LLC.
&gt; &quot;CaseyDJordan&quot; on LinkedIn, Twitter &amp; Facebook
&gt; Cell (585) 348 7399
&gt; Office (585) 239 6060
&gt; Jorsek.com
&gt;
&gt;
&gt; This message is intended only for the use of the Addressee(s) and may
&gt; contain information that is privileged, confidential, and/or exempt from
&gt; disclosure under applicable law.  If you are not the intended recipient,
&gt; please be advised that any disclosure  copying, distribution, or use of
&gt; the information contained herein is prohibited.  If you have received
&gt; this communication in error, please destroy all copies of the message,
&gt; whether in electronic or hard copy format, as well as attachments, and
&gt; immediately contact the sender by replying to this e-mail or by phone.
&gt; Thank you.
&gt;



-- 
--
Casey Jordan
Jorsek Software LLC.
&quot;CaseyDJordan&quot; on LinkedIn, Twitter &amp; Facebook
Cell (585) 348 7399
Office (585) 239 6060
Jorsek.com


This message is intended only for the use of the Addressee(s) and may
contain information that is privileged, confidential, and/or exempt from
disclosure under applicable law.  If you are not the intended recipient,
please be advised that any disclosure  copying, distribution, or use of
the information contained herein is prohibited.  If you have received
this communication in error, please destroy all copies of the message,
whether in electronic or hard copy format, as well as attachments, and
immediately contact the sender by replying to this e-mail or by phone.
Thank you.</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/201008/msg1000314483.html</link>
</item><item>
<title>Java source code for xml schema validation - 8/4/2010 11:58:00 PM</title>
<description><![CDATA[<pre>Hey crew,

Does anyone know of any java xml validators that have source code available?
I've spent a good amount of time looking with no luck. I'm trying to answer
some tough questions right now and the ability to see some implemented code
would help alot.

Thanks,

Casey

-- 
--
Casey Jordan
Jorsek Software LLC.
&quot;CaseyDJordan&quot; on LinkedIn, Twitter &amp; Facebook
Cell (585) 348 7399
Office (585) 239 6060
Jorsek.com


This message is intended only for the use of the Addressee(s) and may
contain information that is privileged, confidential, and/or exempt from
disclosure under applicable law.  If you are not the intended recipient,
please be advised that any disclosure  copying, distribution, or use of
the information contained herein is prohibited.  If you have received
this communication in error, please destroy all copies of the message,
whether in electronic or hard copy format, as well as attachments, and
immediately contact the sender by replying to this e-mail or by phone.
Thank you.</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/201008/msg1000314482.html</link>
</item><item>
<title>[ANN] Free proprietary license for CodeSynthesis XSD and XSD/e - 8/3/2010 2:15:00 PM</title>
<description><![CDATA[<pre>Hi,

We have introduced a free proprietary license for CodeSynthesis XSD[1] 
and XSD/e[2]. The new license allows you to use the generated code to
handle small XML vocabularies in proprietary (closed-source) applications
free of charge and without having to publish your source code.

The license allows you to target any number of platforms and upgrade to
any future releases of XSD and XSD/e. It comes with best-effort, community
support via the public mailing lists. For more information on the new
license visit the Free Proprietary License page:

XSD:   http://www.codesynthesis.com/products/xsd/free-license.xhtml

XSD/e: http://www.codesynthesis.com/products/xsde/free-license.xhtml

Background on CodeSynthesis XSD and XSD/e:

CodeSynthesis XSD is an open-source, cross-platform XML Schema to C++
data binding compiler. Provided with a schema, it generates C++ classes
that represent the given vocabulary as well as parsing and serialization
code. You can then access the data stored in XML using types and functions
that semantically correspond to your application domain rather than dealing
with elements, attributes, and text in a direct representation of XML such
as DOM or SAX. 

CodeSynthesis XSD is available on IBM AIX, GNU/Linux, HP-UX, Mac OS X,
Solaris, Windows, OpenVMS, and z/OS. Supported C++ compilers include: 
GNU g++, HP aCC, IBM XL C++, Intel C++, Sun C++, and MS Visual C++.

CodeSynthesis XSD/e is a version of XSD for memory-constrained and light-
weight applications such as mobile and embedded systems. It provides 
event-driven, stream-oriented XML parsing, XML serialization, XML Schema
validation, and C++ data binding while maintaining a small footprint and
portability.

Besides the platforms supported by XSD, XSD/e is also available on the
many embedded and mobile targets including Embedded Linux, VxWorks, QNX,
LynxOS, iPhone OS/iOS and Windows CE/Mobile.

[1] http://www.codesynthesis.com/products/xsd/
[2] http://www.codesynthesis.com/products/xsde/

Enjoy,
	Boris</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/201008/msg1000314458.html</link>
</item><item>
<title>Re: kind of mixed (and ordered) content - 8/3/2010 12:53:00 AM</title>
<description><![CDATA[<pre>I believe this list is about W3C XML Schema.

I'm not sure how this could be done with RELAX NG.

But it should be possible to write such a validation constraint with
XSD 1.1 (it's still not a REC) assertions. An example of this is
below:

&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;xs:schema xmlns:xs=&quot;http://www.w3.org/2001/XMLSchema&quot;&gt;

	&lt;xs:element name=&quot;span&quot;&gt;
	     &lt;xs:complexType mixed=&quot;true&quot;&gt;
	           &lt;xs:sequence&gt;
		        &lt;xs:element name=&quot;a&quot; type=&quot;LINK&quot; maxOccurs=&quot;unbounded&quot; /&gt;
	           &lt;/xs:sequence&gt;
	           &lt;xs:attribute name=&quot;class&quot; type=&quot;xs:string&quot; /&gt;
	           &lt;xs:assert test=&quot;text()[preceding-sibling::a[1] and
following-sibling::a[1]][. = ', ']
		                              and
					    normalize-space(a[1]/preceding-sibling::text()) = '' and
					    normalize-space(a[last()]/following-sibling::text()) = ''&quot; /&gt;
	     &lt;/xs:complexType&gt;
	&lt;/xs:element&gt;
	
	&lt;xs:complexType name=&quot;LINK&quot;&gt;
	     &lt;xs:simpleContent&gt;
	          &lt;xs:extension base=&quot;xs:string&quot;&gt;
		      &lt;xs:attribute name=&quot;href&quot; type=&quot;xs:anyURI&quot; /&gt;
		  &lt;/xs:extension&gt;
	     &lt;/xs:simpleContent&gt;
	&lt;/xs:complexType&gt;
	
&lt;/xs:schema&gt;

The assertion in above schema specifies:
1. Any two &lt;a&gt; have &quot;, &quot; in between
2. The first and last &lt;a&gt; can be preceded and followed (respectively)
only by white-space's.


On Mon, Aug 2, 2010 at 7:57 PM, Matthieu Ricaud-Dussarget
&lt;matthieu.ricaud@igs-cp.fr&gt; wrote:
&gt; ** The constraint **

&gt; is a restriction on xhtml elements. I need to say : &quot;this span contain a
&gt; serie of links separated by a coma and a space&quot;
&gt; that is :
&gt; &lt;span class=&quot;foo&quot;&gt;
&gt; &#194;&#160;&#194;&#160;&#194;&#160; &lt;a href=&quot;#1&quot;&gt;1&lt;/a&gt;,&amp;#160;
&gt; &#194;&#160;&#194;&#160;&#194;&#160; &lt;a href=&quot;#2&quot;&gt;2&lt;/a&gt;,&amp;#160;
&gt; &#194;&#160;&#194;&#160;&#194;&#160; &lt;a href=&quot;#3&quot;&gt;2&lt;/a&gt;,&amp;#160;
&gt; &lt;/span&gt;
&gt; (well it would be even better if the last &lt;a&gt; has no text after but let say
&gt; I don't care about that)




-- 
Regards,
Mukul Gandhi</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/201008/msg1000314448.html</link>
</item><item>
<title>Re: Optimizing a schema. - 7/22/2010 10:11:00 PM</title>
<description><![CDATA[<pre>Michael,

Thats a great reference, thanks. You are right this is looking quite
ambitious to do in xslt, thats why I was hoping I could use saxon to help
take the brunt of the load in converting the schema to an FSA.

Next I need to convert my current validation algorithm, which is recursive,
into an iterative one. If you have any ideas on that I would much appreciate
the advice. The end goal being to provide access to a PSVI which can be
queried to determine where new elements can be inserted safely into the
structure.

Thanks,

Casey

On Thu, Jul 22, 2010 at 6:00 PM, Michael Kay &lt;mike@saxonica.com&gt; wrote:

&gt; Converting from a grammar to a FSA using XSLT looks ambitious. But the
&gt; question is, whatever language the code is written in, what is the algorithm
&gt; you are using? A classic algorithm is Thompson and Tobin's adaptation of the
&gt; standard Aho/Ullman algorithm, which T&amp;T published at XML Europe 2003 -
&gt; which you will find here:
&gt;
&gt; http://www.ltg.ed.ac.uk/~ht/XML_Europe_2003.html&lt;http://www.ltg.ed.ac.uk/%7Eht/XML_Europe_2003.html&gt;
&gt;
&gt; I believe that if you use this algorithm, the process of determinizing the
&gt; FSA will automatically remove redundant transitions caused by excess
&gt; verbosity in the original grammar. The treatment of occurrence indicators is
&gt; less than optimal, but that's a different question. I think the answer to
&gt; your question is that you don't necessarily need to do any work in
&gt; simplifying the grammar in advance, provided that you remove redundancy from
&gt; the FSA after generating it.
&gt;
&gt; Michael Kay
&gt; Saxonica
&gt;
&gt;
&gt; On 21/07/2010 20:50, Casey Jordan wrote:
&gt;
&gt;&gt; Hi folks,
&gt;&gt;
&gt;&gt; I have a need to optimize an xml schema into its simplest DFA form.
&gt;&gt; Currently I have a number of xslt stylesheets that I wrote which essentially
&gt;&gt; flattens a schema and converts the whole thing to a state automaton in JSON
&gt;&gt; to be used in a client side validator I wrote.
&gt;&gt;
&gt;&gt; However, the schemas I am working with right now (From the DITA open
&gt;&gt; toolkit) when flattened have a ton of unnecessary nested structures, for
&gt;&gt; instance things like this pop up:
&gt;&gt;
&gt;&gt; &lt;xs:sequence&gt;
&gt;&gt; &lt;xs:choice&gt;
&gt;&gt; &lt;xs:sequence&gt;
&gt;&gt; &lt;xs:choice&gt;
&gt;&gt; &lt;xs:sequence&gt;
&gt;&gt; &lt;xs:sequence&gt;
&gt;&gt; &lt;xs:element/&gt;
&gt;&gt; &lt;/xs:sequence&gt;
&gt;&gt; &lt;xs:sequence&gt;
&gt;&gt; &lt;xs:element/&gt;
&gt;&gt; &lt;/xs:sequence&gt;
&gt;&gt; &lt;/xs:sequence&gt;
&gt;&gt; &lt;/xs:choice&gt;
&gt;&gt; &lt;/xs:sequence&gt;
&gt;&gt; &lt;/xs:choice&gt;
&gt;&gt; &lt;/xs:sequence&gt;
&gt;&gt;
&gt;&gt; The validator works great on smaller schemas, but as its written in
&gt;&gt; javascript these huge unnecessary structures slow it down a lot.
&gt;&gt;
&gt;&gt; I am assuming that other schema processors simplify things like this and
&gt;&gt; before I wrote my own wanted to check with the community.
&gt;&gt;
&gt;&gt; Cheers,
&gt;&gt;
&gt;&gt; Casey
&gt;&gt; --
&gt;&gt; --
&gt;&gt; Casey Jordan
&gt;&gt; Jorsek Software LLC.
&gt;&gt; &quot;CaseyDJordan&quot; on LinkedIn, Twitter &amp; Facebook
&gt;&gt; Cell (585) 348 7399
&gt;&gt; Office (585) 239 6060
&gt;&gt; Jorsek.com
&gt;&gt;
&gt;&gt;
&gt;&gt; This message is intended only for the use of the Addressee(s) and may
&gt;&gt; contain information that is privileged, confidential, and/or exempt from
&gt;&gt; disclosure under applicable law.  If you are not the intended recipient,
&gt;&gt; please be advised that any disclosure  copying, distribution, or use of
&gt;&gt; the information contained herein is prohibited.  If you have received
&gt;&gt; this communication in error, please destroy all copies of the message,
&gt;&gt; whether in electronic or hard copy format, as well as attachments, and
&gt;&gt; immediately contact the sender by replying to this e-mail or by phone.
&gt;&gt; Thank you.
&gt;&gt;
&gt;
&gt;


-- 
--
Casey Jordan
Jorsek Software LLC.
&quot;CaseyDJordan&quot; on LinkedIn, Twitter &amp; Facebook
Cell (585) 348 7399
Office (585) 239 6060
Jorsek.com


This message is intended only for the use of the Addressee(s) and may
contain information that is privileged, confidential, and/or exempt from
disclosure under applicable law.  If you are not the intended recipient,
please be advised that any disclosure  copying, distribution, or use of
the information contained herein is prohibited.  If you have received
this communication in error, please destroy all copies of the message,
whether in electronic or hard copy format, as well as attachments, and
immediately contact the sender by replying to this e-mail or by phone.
Thank you.</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/201007/msg1000314339.html</link>
</item><item>
<title>Re: Optimizing a schema. - 7/22/2010 10:03:00 PM</title>
<description><![CDATA[<pre>Converting from a grammar to a FSA using XSLT looks ambitious. But the 
question is, whatever language the code is written in, what is the 
algorithm you are using? A classic algorithm is Thompson and Tobin's 
adaptation of the standard Aho/Ullman algorithm, which T&amp;T published at 
XML Europe 2003 - which you will find here:

http://www.ltg.ed.ac.uk/~ht/XML_Europe_2003.html

I believe that if you use this algorithm, the process of determinizing 
the FSA will automatically remove redundant transitions caused by excess 
verbosity in the original grammar. The treatment of occurrence 
indicators is less than optimal, but that's a different question. I 
think the answer to your question is that you don't necessarily need to 
do any work in simplifying the grammar in advance, provided that you 
remove redundancy from the FSA after generating it.

Michael Kay
Saxonica

On 21/07/2010 20:50, Casey Jordan wrote:
&gt; Hi folks,
&gt;
&gt; I have a need to optimize an xml schema into its simplest DFA form. 
&gt; Currently I have a number of xslt stylesheets that I wrote which 
&gt; essentially flattens a schema and converts the whole thing to a state 
&gt; automaton in JSON to be used in a client side validator I wrote.
&gt;
&gt; However, the schemas I am working with right now (From the DITA open 
&gt; toolkit) when flattened have a ton of unnecessary nested structures, 
&gt; for instance things like this pop up:
&gt;
&gt; &lt;xs:sequence&gt;
&gt; &lt;xs:choice&gt;
&gt; &lt;xs:sequence&gt;
&gt; &lt;xs:choice&gt;
&gt; &lt;xs:sequence&gt;
&gt; &lt;xs:sequence&gt;
&gt; &lt;xs:element/&gt;
&gt; &lt;/xs:sequence&gt;
&gt; &lt;xs:sequence&gt;
&gt; &lt;xs:element/&gt;
&gt; &lt;/xs:sequence&gt;
&gt; &lt;/xs:sequence&gt;
&gt; &lt;/xs:choice&gt;
&gt; &lt;/xs:sequence&gt;
&gt; &lt;/xs:choice&gt;
&gt; &lt;/xs:sequence&gt;
&gt;
&gt; The validator works great on smaller schemas, but as its written in 
&gt; javascript these huge unnecessary structures slow it down a lot.
&gt;
&gt; I am assuming that other schema processors simplify things like this 
&gt; and before I wrote my own wanted to check with the community.
&gt;
&gt; Cheers,
&gt;
&gt; Casey
&gt; -- 
&gt; --
&gt; Casey Jordan
&gt; Jorsek Software LLC.
&gt; &quot;CaseyDJordan&quot; on LinkedIn, Twitter &amp; Facebook
&gt; Cell (585) 348 7399
&gt; Office (585) 239 6060
&gt; Jorsek.com
&gt;
&gt;
&gt; This message is intended only for the use of the Addressee(s) and may
&gt; contain information that is privileged, confidential, and/or exempt from
&gt; disclosure under applicable law.  If you are not the intended recipient,
&gt; please be advised that any disclosure  copying, distribution, or use of
&gt; the information contained herein is prohibited.  If you have received
&gt; this communication in error, please destroy all copies of the message,
&gt; whether in electronic or hard copy format, as well as attachments, and
&gt; immediately contact the sender by replying to this e-mail or by phone.
&gt; Thank you.</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/201007/msg1000314338.html</link>
</item><item>
<title>Looking for better way to determine &quot;Insert-able Elements&quot; - DOM3   - 7/22/2010 4:38:00 PM</title>
<description><![CDATA[<pre>Hi group,

I have implemented the DOM3 Validation spec in JavaScript, but am running
into some efficiency issues.

Mainly with methods like: allowedNextSiblings(), allowedPreviousSiblings(),
allowedFirstChildren()

All of these methods are created to let the user determine what elements
that can be inserted at a given point.

For instance a simplified example would work as follows.

&lt;instance&gt;
 &lt;c1/&gt;
&lt;/instance&gt;

&lt;sequence&gt;
 &lt;element name=&quot;c1&quot;/&gt;
 &lt;element name=&quot;c2&quot;/&gt;
 &lt;element name=&quot;c3&quot;/&gt;
&lt;/sequence&gt;

Thus if I was to ask &quot;What elements can be inserted after &lt;c1/&gt;, I would get
&lt;c2/&gt;.

IE &lt;c1&gt;.allowedNextSiblings() == NameList(&lt;c2/&gt;)

So here is my problem, the only way I have been able to reliably get the
correct results is by inserting and validating for each element.

The steps look something like this:

1.) Determine all the elements that can be child nodes of the parent node.
IE DOM3 Validtion allowedChildren()
2.) Insert an empty element for each one at every possible insertion point
and validate.
3.) When insertion produces a valid structure, that element is flagged as
insert-able at given point.

This is extremely accurate, and will work with very complex patterns, but
also *extremely inefficient*, especially in JavaScript.

I would be really appreciative if anyone could help me better understand how
this can be done more efficiently.

Thanks,

Casey


-- 
--
Casey Jordan
Jorsek Software LLC.
&quot;CaseyDJordan&quot; on LinkedIn, Twitter &amp; Facebook
Cell (585) 348 7399
Office (585) 239 6060
Jorsek.com


This message is intended only for the use of the Addressee(s) and may
contain information that is privileged, confidential, and/or exempt from
disclosure under applicable law.  If you are not the intended recipient,
please be advised that any disclosure  copying, distribution, or use of
the information contained herein is prohibited.  If you have received
this communication in error, please destroy all copies of the message,
whether in electronic or hard copy format, as well as attachments, and
immediately contact the sender by replying to this e-mail or by phone.
Thank you.</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/201007/msg1000314334.html</link>
</item><item>
<title>Re: Optimizing a schema. - 7/22/2010 11:54:00 AM</title>
<description><![CDATA[<pre>Casey,

The only formal method is to create a series of style rules to evaluate input against.  To improve processing speed I recommend setting the input to an array and splitting each element into its own index of that array.  When the presence of an element fails one of your style rules convert that element into an empty string, but do not remove the index.  Splicing arrays is extremely slow in JavaScript.  DOM methods are also extremely slow, so do not use them.  Instead use the join method on your array and output the array using a single innerHTML method if in a browser or document.write from a command line interpreter.  Eliminating DOM methods from JavaScript will reduce processing time to as much as one forth the original time.  Eliminating a series of splice methods in addition to removing DOM methods from your JavaScript can push your code from being four times faster to as much as six times faster to evaluate.

I recommend passing through the entire array once without any recursive logic and performing separate iterative evaluations, such as a function call from inside a loop that returns prematurely only when changes no longer occur.

If possible I would avoid my prior suggestions as much as possible by forcing as much of this automation into your XSLT engine and performing as little effort as possible within your JS code.

Austin Cheney</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/201007/msg1000314330.html</link>
</item><item>
<title>Re: Optimizing a schema. - 7/22/2010 2:52:00 AM</title>
<description><![CDATA[<pre>Austin,

Thanks for the reply. You have a neat little tool I will deficiently use it.

I kinda understand what you mean (and I am kinda starting to do that) but I
think I should probably be more specific on how I am doing this. Right now I
am pre-processing the schema with XQuery and XSLT. The steps look something
like this.

1. Resolve all xs:imports and xs:includes
2. Organize elements with respect to thier namespaces
3. expand all xs:extensions and xs:restrictions, xs:groups and xs:attribute
groups.
4. Globalize all complex types ( for inline complex types I generate a
unique name and globalize under thier namespace )
5. optimize by removing redundent structures
6. Convert to JSON to be used on the client.

This process is not the most efficient but I can cache the result on the
server and it has been working pretty well until recently (very large schema
lots and lots of nested groups. What I really need to do is to optimize step
5 with something more formal.

Currently I am building a stylesheet to do the &quot;optimization&quot;. Its very
simple right now and looks something like this:

(..striped out identity template for readability..)

&lt;xsl:template match=&quot;xs:choice[name(..) != 'xs:complexType' and
not(@minOccurs) and not(@maxOccurs) and count(xs:*) = 1]&quot;&gt;
        &lt;xsl:apply-templates/&gt;
 &lt;/xsl:template&gt;

 &lt;xsl:template match=&quot;xs:sequence[name(..) != 'xs:complexType' and
not(@minOccurs) and not(@maxOccurs) and count(xs:*) = 1]&quot;&gt;
        &lt;xsl:apply-templates/&gt;
 &lt;/xsl:template&gt;

Which strips out simple redundant structures like my last example. This
probably needs to be improved to help simplify things like:

&lt;sequence&gt;
   &lt;choice&gt;
     &lt;.../&gt;
   &lt;/choice&gt;
   &lt;choice&gt;
     &lt;.../&gt;
   &lt;/choice&gt;
   &lt;choice&gt;
     &lt;.../&gt;
   &lt;/choice&gt;
&lt;/sequence&gt;

which I believe is equivalent to

&lt;sequence&gt;
     &lt;.../&gt;
     &lt;.../&gt;
     &lt;.../&gt;
&lt;/sequence&gt;

but I really don't want to be guessing here. I need a formal method for
reducing complexity and have yet to find one online or in a technical
publication.

Right now my javascript validator does quite well on moderatly complex
structures ( &lt; 2ms) but since its recursive as the number of nested
structures grows the time grows exponentially.

I know thats a lot of information but hopefully it helps.

Cheers,

Casey

On Wed, Jul 21, 2010 at 6:29 PM, Cheney, Edward A SSG RES USAR USARC &lt;
austin.cheney@us.army.mil&gt; wrote:

&gt; Casey,
&gt;
&gt; I had trouble reading your example until I beautified it with my Pretty
&gt; Diff tool.  It is also written in JavaScript, so can likely consume it into
&gt; your application.  Just choose the markup and beautify options.
&gt;
&gt; http://prettydiff.com/
&gt;
&gt; What you are going to have to do is test for singleton elements that are
&gt; absent any attributes and empty elements.  Once those elements are detected
&gt; you will need to remove them from the output.  The test needs to be
&gt; recursive as removing elements will result in empty parents.  I am sure this
&gt; can be done with ease even using JavaScript as I have written similar code
&gt; before.
&gt;
&gt; Austin Cheney
&gt;



-- 
--
Casey Jordan
Jorsek Software LLC.
&quot;CaseyDJordan&quot; on LinkedIn, Twitter &amp; Facebook
Cell (585) 348 7399
Office (585) 239 6060
Jorsek.com


This message is intended only for the use of the Addressee(s) and may
contain information that is privileged, confidential, and/or exempt from
disclosure under applicable law.  If you are not the intended recipient,
please be advised that any disclosure  copying, distribution, or use of
the information contained herein is prohibited.  If you have received
this communication in error, please destroy all copies of the message,
whether in electronic or hard copy format, as well as attachments, and
immediately contact the sender by replying to this e-mail or by phone.
Thank you.</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/201007/msg1000314322.html</link>
</item><item>
<title>Re: Optimizing a schema. - 7/21/2010 10:31:00 PM</title>
<description><![CDATA[<pre>Casey,

I had trouble reading your example until I beautified it with my Pretty Diff tool.  It is also written in JavaScript, so can likely consume it into your application.  Just choose the markup and beautify options.

http://prettydiff.com/

What you are going to have to do is test for singleton elements that are absent any attributes and empty elements.  Once those elements are detected you will need to remove them from the output.  The test needs to be recursive as removing elements will result in empty parents.  I am sure this can be done with ease even using JavaScript as I have written similar code before.

Austin Cheney</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/201007/msg1000314321.html</link>
</item><item>
<title>Optimizing a schema. - 7/21/2010 7:53:00 PM</title>
<description><![CDATA[<pre>Hi folks,

I have a need to optimize an xml schema into its simplest DFA form.
Currently I have a number of xslt stylesheets that I wrote which essentially
flattens a schema and converts the whole thing to a state automaton in JSON
to be used in a client side validator I wrote.

However, the schemas I am working with right now (From the DITA open
toolkit) when flattened have a ton of unnecessary nested structures, for
instance things like this pop up:

&lt;xs:sequence&gt;
 &lt;xs:choice&gt;
  &lt;xs:sequence&gt;
   &lt;xs:choice&gt;
    &lt;xs:sequence&gt;
     &lt;xs:sequence&gt;
      &lt;xs:element/&gt;
      &lt;/xs:sequence&gt;
     &lt;xs:sequence&gt;
      &lt;xs:element/&gt;
      &lt;/xs:sequence&gt;
     &lt;/xs:sequence&gt;
    &lt;/xs:choice&gt;
   &lt;/xs:sequence&gt;
  &lt;/xs:choice&gt;
 &lt;/xs:sequence&gt;

The validator works great on smaller schemas, but as its written in
javascript these huge unnecessary structures slow it down a lot.

I am assuming that other schema processors simplify things like this and
before I wrote my own wanted to check with the community.

Cheers,

Casey
-- 
--
Casey Jordan
Jorsek Software LLC.
&quot;CaseyDJordan&quot; on LinkedIn, Twitter &amp; Facebook
Cell (585) 348 7399
Office (585) 239 6060
Jorsek.com


This message is intended only for the use of the Addressee(s) and may
contain information that is privileged, confidential, and/or exempt from
disclosure under applicable law.  If you are not the intended recipient,
please be advised that any disclosure  copying, distribution, or use of
the information contained herein is prohibited.  If you have received
this communication in error, please destroy all copies of the message,
whether in electronic or hard copy format, as well as attachments, and
immediately contact the sender by replying to this e-mail or by phone.
Thank you.</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/201007/msg1000314319.html</link>
</item><item>
<title>Re: Processing xs:group as a finite automata same as processing   - 7/20/2010 7:22:00 PM</title>
<description><![CDATA[<pre>That is good to know.

It looks like for efficiency purposes I am going to pre-process the schema
and flatten/resolve all group declarations into choice|sequence|all. For
schemas with heavy use of groups it will mean a little more wait time up
front but for validations on the client it will save considerable time.

Thanks guys this helps alot.

Cheers,

Casey

On Tue, Jul 20, 2010 at 2:14 PM, Michael Kay &lt;mike@saxonica.com&gt; wrote:

&gt; If a group has minOccurs = maxOccurs = 1, you can just replace the group
&gt; reference by the content of the group.
&gt;
&gt; In other cases, you can treat it the same as a singleton sequence or a
&gt; singleton choice - there's no difference, but a sequence seems conceptually
&gt; simpler, since a singleton choice gives you no choice at all.
&gt;
&gt; Michael Kay
&gt; Saxonica
&gt;
&gt;
&gt; On 20/07/2010 18:17, Casey Jordan wrote:
&gt;
&gt;&gt; Friends,
&gt;&gt;
&gt;&gt; I have been writing an XML schema validator in javascript. I am done with
&gt;&gt; everything but the required processing for xs:group element.
&gt;&gt;
&gt;&gt; It seems to me that an xs:group can be processed identically to an
&gt;&gt; xs:choice declaration.
&gt;&gt;
&gt;&gt; The spec is kinda ambigious so I just wanted to make sure I was right. If
&gt;&gt; anyone can substantiate this that would be great.
&gt;&gt;
&gt;&gt; Cheers,
&gt;&gt;
&gt;&gt; Casey
&gt;&gt;
&gt;&gt;
&gt;&gt; --
&gt;&gt; --
&gt;&gt; Casey Jordan
&gt;&gt; Jorsek Software LLC.
&gt;&gt; &quot;CaseyDJordan&quot; on LinkedIn, Twitter &amp; Facebook
&gt;&gt; Cell (585) 348 7399
&gt;&gt; Office (585) 239 6060
&gt;&gt; Jorsek.com
&gt;&gt;
&gt;&gt;
&gt;&gt; This message is intended only for the use of the Addressee(s) and may
&gt;&gt; contain information that is privileged, confidential, and/or exempt from
&gt;&gt; disclosure under applicable law.  If you are not the intended recipient,
&gt;&gt; please be advised that any disclosure  copying, distribution, or use of
&gt;&gt; the information contained herein is prohibited.  If you have received
&gt;&gt; this communication in error, please destroy all copies of the message,
&gt;&gt; whether in electronic or hard copy format, as well as attachments, and
&gt;&gt; immediately contact the sender by replying to this e-mail or by phone.
&gt;&gt; Thank you.
&gt;&gt;
&gt;
&gt;


-- 
--
Casey Jordan
Jorsek Software LLC.
&quot;CaseyDJordan&quot; on LinkedIn, Twitter &amp; Facebook
Cell (585) 348 7399
Office (585) 239 6060
Jorsek.com


This message is intended only for the use of the Addressee(s) and may
contain information that is privileged, confidential, and/or exempt from
disclosure under applicable law.  If you are not the intended recipient,
please be advised that any disclosure  copying, distribution, or use of
the information contained herein is prohibited.  If you have received
this communication in error, please destroy all copies of the message,
whether in electronic or hard copy format, as well as attachments, and
immediately contact the sender by replying to this e-mail or by phone.
Thank you.</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/201007/msg1000314311.html</link>
</item><item>
<title>Re: Processing xs:group as a finite automata same as processing    - 7/20/2010 6:15:00 PM</title>
<description><![CDATA[<pre>If a group has minOccurs = maxOccurs = 1, you can just replace the group 
reference by the content of the group.

In other cases, you can treat it the same as a singleton sequence or a 
singleton choice - there's no difference, but a sequence seems 
conceptually simpler, since a singleton choice gives you no choice at all.

Michael Kay
Saxonica

On 20/07/2010 18:17, Casey Jordan wrote:
&gt; Friends,
&gt;
&gt; I have been writing an XML schema validator in javascript. I am done 
&gt; with everything but the required processing for xs:group element.
&gt;
&gt; It seems to me that an xs:group can be processed identically to an 
&gt; xs:choice declaration.
&gt;
&gt; The spec is kinda ambigious so I just wanted to make sure I was right. 
&gt; If anyone can substantiate this that would be great.
&gt;
&gt; Cheers,
&gt;
&gt; Casey
&gt;
&gt;
&gt; -- 
&gt; --
&gt; Casey Jordan
&gt; Jorsek Software LLC.
&gt; &quot;CaseyDJordan&quot; on LinkedIn, Twitter &amp; Facebook
&gt; Cell (585) 348 7399
&gt; Office (585) 239 6060
&gt; Jorsek.com
&gt;
&gt;
&gt; This message is intended only for the use of the Addressee(s) and may
&gt; contain information that is privileged, confidential, and/or exempt from
&gt; disclosure under applicable law.  If you are not the intended recipient,
&gt; please be advised that any disclosure  copying, distribution, or use of
&gt; the information contained herein is prohibited.  If you have received
&gt; this communication in error, please destroy all copies of the message,
&gt; whether in electronic or hard copy format, as well as attachments, and
&gt; immediately contact the sender by replying to this e-mail or by phone.
&gt; Thank you.</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/201007/msg1000314310.html</link>
</item><item>
<title>Re: Processing xs:group as a finite automata same as processing    - 7/20/2010 5:39:00 PM</title>
<description><![CDATA[<pre>Hi Casey,

No, a group may be a sequence, choice, or all group.  You might try 
reworking your question so as to focus on getting clarification on the 
part of the spec that you don't understand or find to be ambiguous.

Regards,
Kevin
-- 
Objective Systems, Inc.
REAL WORLD ASN.1 AND XML SOLUTIONS
http://www.obj-sys.com

On 7/20/2010 1:17 PM, Casey Jordan wrote:
&gt; Friends,
&gt;
&gt; I have been writing an XML schema validator in javascript. I am done 
&gt; with everything but the required processing for xs:group element.
&gt;
&gt; It seems to me that an xs:group can be processed identically to an 
&gt; xs:choice declaration.
&gt;
&gt; The spec is kinda ambigious so I just wanted to make sure I was right. 
&gt; If anyone can substantiate this that would be great.
&gt;
&gt; Cheers,
&gt;
&gt; Casey
&gt;
&gt;
&gt; -- 
&gt; --
&gt; Casey Jordan
&gt; Jorsek Software LLC.
&gt; &quot;CaseyDJordan&quot; on LinkedIn, Twitter &amp; Facebook
&gt; Cell (585) 348 7399
&gt; Office (585) 239 6060
&gt; Jorsek.com
&gt;
&gt;
&gt; This message is intended only for the use of the Addressee(s) and may
&gt; contain information that is privileged, confidential, and/or exempt from
&gt; disclosure under applicable law.  If you are not the intended recipient,
&gt; please be advised that any disclosure  copying, distribution, or use of
&gt; the information contained herein is prohibited.  If you have received
&gt; this communication in error, please destroy all copies of the message,
&gt; whether in electronic or hard copy format, as well as attachments, and
&gt; immediately contact the sender by replying to this e-mail or by phone.
&gt; Thank you.</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/201007/msg1000314309.html</link>
</item><item>
<title>Processing xs:group as a finite automata same as processing   - 7/20/2010 5:20:00 PM</title>
<description><![CDATA[<pre>Friends,

I have been writing an XML schema validator in javascript. I am done with
everything but the required processing for xs:group element.

It seems to me that an xs:group can be processed identically to an xs:choice
declaration.

The spec is kinda ambigious so I just wanted to make sure I was right. If
anyone can substantiate this that would be great.

Cheers,

Casey


-- 
--
Casey Jordan
Jorsek Software LLC.
&quot;CaseyDJordan&quot; on LinkedIn, Twitter &amp; Facebook
Cell (585) 348 7399
Office (585) 239 6060
Jorsek.com


This message is intended only for the use of the Addressee(s) and may
contain information that is privileged, confidential, and/or exempt from
disclosure under applicable law.  If you are not the intended recipient,
please be advised that any disclosure  copying, distribution, or use of
the information contained herein is prohibited.  If you have received
this communication in error, please destroy all copies of the message,
whether in electronic or hard copy format, as well as attachments, and
immediately contact the sender by replying to this e-mail or by phone.
Thank you.</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/201007/msg1000314308.html</link>
</item><item>
<title>Periphery: A brief history of calendars - 7/19/2010 11:51:00 AM</title>
<description><![CDATA[<pre>It may not be a great concern to most subscribers, but I found the following 
history of calendars interesting:

http://www.obliquity.com/calendar/

It explains the 'g' in xs:gYear.  But not why there's no 'g' in xs:date and 
xs:dateTime :-)

Pete Cordell
Codalogic Ltd
Interface XML to C++ the easy way using XML C++
data binding to convert XSD schemas to C++ classes.
Visit http://codalogic.com/lmx/ or http://www.xml2cpp.com
for more info</pre>]]></description>
<link>http://www.altova.com/list/xmlschema-dev/201007/msg1000314299.html</link>
</item>

</channel>
</rss>
