<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">Having a VB program would be interesting, but it would not be accessible to those of us on other platforms such as Macintosh or Linux, would it?<DIV><BR class="khtml-block-placeholder"></DIV><DIV>Thanks,</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Stuart</DIV><DIV><BR><DIV><DIV>On Jun 12, 2007, at 14:00, Jonathan wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"> Hi Steve,<BR> <BR> Steve Slevinski wrote: <BLOCKQUOTE cite="mid465D9D2D.2070309@signpuddle.net" type="cite"> Hi Jonathan,<BR> <BR> You are right that we need a general format for importing / exporting between SignWriting applications. I'd say that we should clean up SWML-S. I was also working on a SignPuddle Markup Language that I used internally to import the 1.0 dictionaries into 1.5. I never finalized the DTD.<BR> <BR> One question... Should we have 2 different formats? One for dictionaries and another for documents? It might make sense to be able to embed the document markup inside of the dictionary markup, since signs can now have documents attached.<BR> </BLOCKQUOTE> I would prefer 2 different formats. This would make it easier to the end user to know if they are dealing with a dictionary listing or a document. But we could make the internal markup quite similar.<BR> <BLOCKQUOTE cite="mid465D9D2D.2070309@signpuddle.net" type="cite"><BR> I need to improve the export feature in SP1.5. It should export in a variety of formats.<BR> <BR> SBML is for importing into SignBank and below is my rational for using the comma delimited strings. <BR> <BR> Image Importing<BR> ---------------------<BR> SignBank uses images in the FileMaker database for the signs. However, there is no way to import images into SignBank using XML. </BLOCKQUOTE> Including images in XML isn't very common. But I did find some articles that explain how. The image is converted to base64 and stored in the XML. SignBank can't do that so it made sense to just keep the build string together since that's what SignBank needed to get the picture in the first place. <BR> <BLOCKQUOTE cite="mid465D9D2D.2070309@signpuddle.net" type="cite">The round about solution we found was that FileMaker can grab an image off of the internet. So SBML includes the build string and SignBank opens a web image with the build string as a query value.<BR> <BR> Example build string:<BR> 01-01-001-01-01-01,5,5,02-01-001-01-01-01,70,15<BR> <BR> Web image:<BR> <A class="moz-txt-link-freetext" href="http://www.signbank.org/signpuddle1.5/image.php?build=01-01-001-01-01-01,5,5,02-01-001-01-01-01,70,15">http://www.signbank.org/signpuddle1.5/image.php?build=01-01-001-01-01-01,5,5,02-01-001-01-01-01,70,15</A><BR> <BR> SignSpelling Sequences and sorting<BR> ---------------------------------------------<BR> I've been sort the SignSpelling Sequences as strings.<BR> <BR> 01-01-001-01-01-01,01-01-001-01-01-08,<BR> 01-01-001-01-01-01,02-01-001-01-01-08,<BR> 01-01-001-01-01-01,06-01-001-01-01-01,<BR> <BR> Since SBML already used the comma delimited build string, I didn't see a problem with throwing in the sequence as a comma delimited string as well.<BR> <BR> I'm not sure how SignBank is storing the sequence in the database, but Todd Duell was able to use SBML as I created it so I left it alone.<BR> </BLOCKQUOTE> Thanks for explaining. <BLOCKQUOTE cite="mid465D9D2D.2070309@signpuddle.net" type="cite"><BR> Just a bit of background,<BR> -Steve<BR> <BR> Jonathan wrote: <BLOCKQUOTE cite="mid:465C92A5.2030606@yahoo.ca" type="cite"> Hi Steve,<BR> <BR> Steve Slevinski wrote: <BLOCKQUOTE cite="mid4653A6D2.80603@signpuddle.net" type="cite"> 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 moz-do-not-send="true" 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"> 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> </BLOCKQUOTE> </BLOCKQUOTE> <DIV class="moz-signature"> <DIV class="moz-signature"> <ADDRESS><FONT face="Comic Sans MS"><BIG><BR> </BIG></FONT></ADDRESS> </DIV> </DIV> </BLOCKQUOTE></DIV><BR></DIV></BODY></HTML>