<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Steve,<br>
<br>
Steve Slevinski wrote:
<blockquote cite="mid4653A6D2.80603@signpuddle.net" type="cite">
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
<title></title>
Hi Jonathan,<br>
<br>
The gloss should be a tag and not an attribute. It looks like your
example comes from the SignPuddle 1.0 export, which does not follow the
DTD. That's a defect.<br>
<a class="moz-txt-link-freetext"
href="http://www.signbank.org/signpuddle/swml/swml-s.dtd">http://www.signbank.org/signpuddle/swml/swml-s.dtd</a><br>
<br>
Jonathan wrote:<br>
<blockquote cite="mid:46539851.9050806@yahoo.ca" type="cite">
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
I image
that the "gloss" tag was meant so that there could be several glosses
per sign. Is this right? If it is so then the "symbol" tags should be
withing the "gloss" tag or else we won't know which "symbol" tag
belongs to which "gloss" tag. It isn't enough that the "gloss" tag
come first. <br>
</blockquote>
<br>
Each sign can have multiple glosses and multiple symbols. The glosses
and symbols are not directly related. The symbols make up the sign.
And the gloss describes the sign in English words. <br>
<br>
For example, the sign for the ASL number one has a single symbol, but
multiple glosses.<br>
<sign><br>
<gloss>one</gloss><br>
<gloss>1</gloss><br>
<gloss>uno</gloss><br>
<symbol x="1" y="1">01-01-001-01-01-01</symbol><br>
</sign><br>
<br>
</blockquote>
I had misunderstood the reason for the gloss tag. Thank you for the
explanation. It makes sense to me know.<br>
<blockquote cite="mid4653A6D2.80603@signpuddle.net" type="cite"><br>
<blockquote cite="mid:46539851.9050806@yahoo.ca" type="cite">My other
comment about SBML which I realized was made especially for
SignBank which I am sure works just fine. But SBML uses comma
separated values. Which are fine, I use them all them time. But I
feel that they are out of context in an XML file. As is I can load the
SBML into objects or a dataset but I still have to parse the build and
the sequence to get to the information. But if each comma separated
value has it's own tag, it will load just as fast into an object or
dataset and I don't have to do any parsing to get at the information.
So for a SignWriting exchange format, I strongly suggest staying away
from comma delimited strings.<br>
<br>
</blockquote>
Hmm. I can understand your feeling. I'm not sure which style I'm
going to use for STML. I should probably use the verbose tag style,
but I've never had a case where I was glad I chose the verbose style
over the build format for SWML-S. <br>
</blockquote>
Is this because you find it easier working with comma delimited
structures than objects? I understand your point. Especially if you
don't have an easy way to load the XML into the object or dataset.<br>
<br>
This what I have figured out about XML so far.<br>
<br>
The free IDE for Visual Basic, Microsoft Visual Basic 2005 Express
Edition, has a command line program that will analyze an XML file and
determine it's schema. I was playing around with the SBML format a
while ago and using extensive search and replace, converted it to an
all tag format. See attached file sbml.xml<br>
<br>
I didn't split up the detail though. Then I ran it through <span
id="nsrTitle">XML Schema Definition Tool </span>to create the schema.
See attached file sbml.xsd<br>
<br>
Then I ran the schema specifying that I wanted it to give me a dataset
in VB. See attached file sbml.vb<br>
I used the <MSHelp:link tabindex="0"
keywords="frlrfSystemDataDataSetClassReadXmlTopic">System.Data.DataSet.ReadXml</MSHelp:link>
method.<br>
<br>
I managed to import the whole ASL dictionary into my program this way.<br>
<br>
It can also do classes for objects. <br>
I did one for you. See attached file sbml-object.vb<br>
Then use the <MSHelp:link tabindex="0"
keywords="frlrfSystemXmlSerializationXmlSerializerClassDeserializeTopic">System.Xml.Serialization.XmlSerializer.Deserializer</MSHelp:link>
method to read the XML file.<br>
<br>
The code to load the SBML into the object is<br>
Dim mySbml As sbml<br>
' Construct an instance of the XmlSerializer with the type<br>
' of object that is being deserialized.<br>
Dim mySerializer As Xml.Serialization.XmlSerializer = New
Xml.Serialization.XmlSerializer(GetType(sbml))<br>
' To read the file, create a FileStream.<br>
Dim myFileStream As IO.FileStream = _<br>
New IO.FileStream("E:\Mis Documentos\Jonathan\Visual Studio
2005\Projects\Handwriting\IMWA\bin\Debug\sbmlnew.xml", IO.FileMode.Open)<br>
' Call the Deserialize method and cast to the object type.<br>
mySbml = CType( _<br>
mySerializer.Deserialize(myFileStream), sbml)<br>
<br>
The results of the object look like the attached file "Loaded SBML
object.png". Then you can use code to work with the object just as you
would any other object.<br>
<br>
It is just as easy to go the other way too. Object or Dataset to SBML.<br>
<br>
With the xsd.exe utility, you can also choose from <b>CS</b> (C#,
which is the default), <b>VB</b> (Visual Basic), <b>JS</b> (JScript),
or <b>VJS</b> (Visual J#). <MSHelp:link tabindex="0"
keywords="frlrfSystemCodeDomCompilerCodeDomProviderClassTopic"><br>
<br>
</MSHelp:link>Jonathan<br>
<br>
<br>
</body>
</html>