[brailleblaster] Re: Explanation of UTDML. was: Re: Re: Newdesign build broken...

  • From: "John J. Boyer" <john.boyer@xxxxxxxxxxxxxxxxx>
  • To: brailleblaster@xxxxxxxxxxxxx
  • Date: Wed, 2 Jan 2013 14:34:20 -0600

Hi Keith,

Could you outline the approach you would like to take?

Passing the document through liblouisutdml does not convert it. It 
simply adds the Braille rendering as UTDML.

John

On Wed, Jan 02, 2013 at 08:21:42PM +0000, Keith Creasy wrote:
> Hi John.
> 
> Yes, I think I disagree with this approach rather than misunderstand it. We 
> can go with it I suppose. We'll discuss it at our developers meeting in the 
> morning and I'll get back to you.
> 
> I don't know what you mean by "further up the input stream? It sound like 
> what you are really doing is converting the original document via UTDML, 
> saving it as a temporary file, and then loading that file. Not at all the 
> approach I was hoping for.
> 
> We can do an XML Editor but as things are I see no reason for it to be 
> incorporated into BB, it can be a stand-alone editor and accomplish the same 
> thing.
> 
> Keith Creasy
> Software Developer
> American Printing House for the Blind
> KCreasy@xxxxxxx
> Phone: 502.895.2405
> Skype: keith537
> 
> 
> -----Original Message-----
> From: brailleblaster-bounce@xxxxxxxxxxxxx 
> [mailto:brailleblaster-bounce@xxxxxxxxxxxxx] On Behalf Of John J. Boyer
> Sent: Wednesday, January 02, 2013 3:13 PM
> To: brailleblaster@xxxxxxxxxxxxx
> Subject: [brailleblaster] Re: Explanation of UTDML. was: Re: Re: Newdesign 
> build broken...
> 
> 
> Hi Keith,
> 
> We seem to be thinking from different assumptions. My intention is that the 
> Semantics class should embody the semantics of the whole document. 
> The document is one which has been passed through liblouisutdml to have UTDML 
> added. liblouisutdml produces an output file. That is why the document is 
> passed to the makeDocumentModel method as a file path. 
> Handling documents from zip archives of from the internet is done further up 
> the input stream. 
> 
> Styles apply to the print view and specify layouts. Actions specify things 
> like emphasis, and also apply mostly to the print view. There is one action 
> that causes methods to handle UTDML and the Braille view to be called. Other 
> actions may do things like skip portions of the document we do not wish to 
> consider. This does not remove them from the document.
> 
> Editing of both the print and Braille views will be supported. The details 
> still have to be worked out. Edited Braille will be placed in the original 
> document with markup that is proper for the vocabulary of that document. This 
> markup will be specified in the semantic-action file.
> 
> The approach of using a semantic-action file to specify what should be done 
> for markup in a document is unconventional. However, it avoids the need to 
> transform xml documents, with the possibility of losing information in 
> transforming to a specific vocabulary and back to the original. 
> Semantic-action files are also much easier to write than xslt stylesheets.
> 
> I hope this helps.
> 
> John
> 
> On Wed, Jan 02, 2013 at 07:40:00PM +0000, Keith Creasy wrote:
> > John.
> > 
> > I'm looking through the "documentmodel" code and I see that "Styles" 
> > applies to rendering print and "Semantics" applies to rendering braille.
> > 
> > Again, I'm not sure I understand all this fully but it seems to me that 
> > this is what should happen:
> > 
> > 1. Document builds an XML DOM from an input stream.
> > 2. Based on the document type a semantic action file and styles file are 
> > selected and the appropriate objects are created.
> > 3. The views, for now we assume just braille and print, are updated with 
> > the DOM or some representation of the content. We could also just pass in 
> > the document type and let the view choose the semantic and style objects.
> > 
> > 
> > >From here changes made in either view call a method in the document 
> > >interface that changes the content and then the document class updates the 
> > >views with the modified content. The views use the semantic and style 
> > >objects they have to re-render the content.
> > 
> > 
> > 
> > 
> > Keith Creasy
> > Software Developer
> > American Printing House for the Blind
> > KCreasy@xxxxxxx
> > Phone: 502.895.2405
> > Skype: keith537
> > 
> > 
> > -----Original Message-----
> > From: brailleblaster-bounce@xxxxxxxxxxxxx 
> > [mailto:brailleblaster-bounce@xxxxxxxxxxxxx] On Behalf Of John J. 
> > Boyer
> > Sent: Wednesday, January 02, 2013 12:00 PM
> > To: brailleblaster@xxxxxxxxxxxxx
> > Subject: [brailleblaster] Explanation of UTDML. was: Re: Re: Newdesign 
> > build broken...
> > 
> > Hi Keith,
> > 
> > Thanks for your explanations. I think the first communicationns poroblem to 
> > be solved is the nature of UTDML .
> > 
> > In this design an xml document is first passed to liblouisutdml to get 
> > a trial rendering. This rendering is contained in the UTDML which 
> > liblouisutdml adds to the document. The rendering contains all the 
> > layout information for Braille besides translations. Since the layout 
> > information is already contained in the rendering (in the <brl>
> > subtrees) a Braille CSS is inappropriate. All that has to be done is to use 
> > the information in the <newpage> and <newline> elements in the <brl> 
> > subtrees. ViewPlus does this in their software.
> > 
> > John
> > 
> > On Wed, Jan 02, 2013 at 04:03:55PM +0000, Keith Creasy wrote:
> > > John.
> > > 
> > > I'm not sure I think what you are outlining here is the best way to 
> > > accomplish the braille view. What exactly is the difference between your 
> > > semantic action files, as applied to an XML DOM, and what a style sheet 
> > > does? The document being displayed is not UTDML, it's something else, 
> > > XHTML or DTBook.
> > > 
> > > In fact, the more I think about this process, I think a better approach 
> > > would be to use a braille CSS and XSLT in an HTML editor.
> > > 
> > > The communications problem probably are the result of a couple of 
> > > things. First, I'm really not clear on how you expect all this to 
> > > work; using any vocabulary of XML, directly editing print and 
> > > braille on that document, styling in the views, and very confusing 
> > > is how the semantic actions get applied, when, and where. The second 
> > > problem is that, because I don't entirely follow it, I'm not certain 
> > > it's even the best approach. I'm sure you know what you are doing 
> > > but I'm not sure who else does. G
> > > 
> > > About MVC architecture:
> > > 
> > > M- Model. The data being used such as a database, XML document, or 
> > > something else.
> > > 
> > > V- View, seems self-explanatory except that in this design pattern the 
> > > view only controlls how the data is rendered; i.e. displayed in a window. 
> > > It has methods that perform actions on the data by calling the controller 
> > > and recieves update events from the controller.
> > > 
> > > C- Controller, Provides an interface to the data (Model), performs 
> > > actions on the data based on actions from the views. Notifies the views 
> > > when to update their data and what data to use. In many cases the 
> > > controller has one dataset attached to it; i.e. an XML document and one 
> > > or more views.
> > > 
> > > Here is a simple scenario:
> > > 
> > > 1. An XML document is opened and a DOM created. It is attached to the 
> > > controller.
> > > 2. The controller creates a set of views and they are attached to the 
> > > controller. For BB that might be the braille and print edit controls. The 
> > > controller passes semantic actions to the view when it is created so that 
> > > it can manage the XML data that gets passed in. I think this could also 
> > > be done with CSS and XSLT.
> > > 3. Someone working in the print view adds a new paragraph, inserting a 
> > > new line.
> > > 4. the view calls an "insert" method of the controller.
> > > 5. The controller changes the content, XML DOM, with the new paragraph.
> > > 6. The controller tells each attached view to update using the provided 
> > > data.
> > > 7. Each view takes the modified content and renders it. The braille view 
> > > and the print view would not do exactly the same thing because the 
> > > rendering would be different in each view. 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > Keith Creasy
> > > Software Developer
> > > American Printing House for the Blind KCreasy@xxxxxxx
> > > Phone: 502.895.2405
> > > Skype: keith537
> > > 
> > > 
> > > -----Original Message-----
> > > From: brailleblaster-bounce@xxxxxxxxxxxxx
> > > [mailto:brailleblaster-bounce@xxxxxxxxxxxxx] On Behalf Of John J. 
> > > Boyer
> > > Sent: Wednesday, January 02, 2013 10:27 AM
> > > To: brailleblaster@xxxxxxxxxxxxx
> > > Subject: [brailleblaster] Re: Newdesign build broken...
> > > 
> > > Hi Keith,
> > > 
> > > We will have to give some attention to communicating clearly. I've been 
> > > surprised at how difficult that can be, but maybe it isn't surprising.
> > > 
> > > Everything needed for the Braille view is contained in the UTDML which is 
> > > added to the document by liblouisutdml. Layout information is contained 
> > > in the newpage and newline elements. The xy attribute of the latter gives 
> > > the position of the line on the page and indentation. The UTDML part 
> > > actually contains the rendering of the print document. It is handled by 
> > > the UTD class in the wordprocessor. The only action required is the one 
> > > for calling that class.
> > > 
> > > Could you expand on the mvc model as it applies to BrailleBlaster?
> > > 
> > > Thanks,
> > > John
> > > 
> > > On Wed, Jan 02, 2013 at 03:04:22PM +0000, Keith Creasy wrote:
> > > > OK John. I'll continue on the public list.
> > > > 
> > > > In my opinion this all needs to be done using an MVC architecture.
> > > > 
> > > > The document model is an XML DOM, plain and simple. You are invisioning 
> > > > that it can be any vocabulary/document type. We are planning to use XOM 
> > > > as the interface to the DOM.
> > > > 
> > > > The views are what we have planned on all along; braille, text(or print 
> > > > if you prefer), and HTML. An XMLEditor using tree, attribute, text, and 
> > > > HTML views on the same document.
> > > > 
> > > > The 'C' or "controller" part of this is critical because it is what 
> > > > ties the XML DOM to the views via the semantic actions. 
> > > > 
> > > > Possibly the semantic actions need to be tied in with the braille view? 
> > > > They are responsible for the styling of the content, right? I think you 
> > > > are trying to tie the semantic actions with the actual document but I 
> > > > think it's more part of the view. Explain if that's not right.
> > > > 
> > > > 
> > > > 
> > > > 
> > > > Keith Creasy
> > > > Software Developer
> > > > American Printing House for the Blind KCreasy@xxxxxxx
> > > > Phone: 502.895.2405
> > > > Skype: keith537
> > > > 
> > > > 
> > > > -----Original Message-----
> > > > From: John J. Boyer [mailto:john.boyer@xxxxxxxxxxxxxxxxx]
> > > > Sent: Wednesday, January 02, 2013 9:40 AM
> > > > To: Keith Creasy
> > > > Cc: Chuck Myers; brandon.r.roller@xxxxxxxxx
> > > > Subject: Re: Newdesign build broken...
> > > > 
> > > > Hi Keith,
> > > > 
> > > > This method was removed. It's been compiling for me. I wonder why. 
> > > > There must be an old class around. In any case, this code is to be 
> > > > changed. 
> > > > The DocumentManager class needs extensive rewriting.
> > > > 
> > > > Let's start putting our messages on the BrailleBlaster list instead of 
> > > > writing to each other. That will stimulate interest in a wider 
> > > > commuunity and may give rise to some new ideas.
> > > > 
> > > > Brandon, please subscribe to both the liblouisliblouisxml and 
> > > > brailleblaster lists. Go to http://www.abilitiessoft.com . You will 
> > > > find links to sites where you can subscribe.  Do you have the command 
> > > > for cloning the brailleblaster.newdesign repository?
> > > > 
> > > > To all, I'm working on the documentmodel package. It's coming along 
> > > > rather slowly, but I have confidence in it.
> > > > 
> > > > Thanks,
> > > > John
> > > > 
> > > > On Wed, Jan 02, 2013 at 02:01:50PM +0000, Keith Creasy wrote:
> > > > > John.
> > > > > 
> > > > > The newdesign does not compile. Here is the error. I can make it 
> > > > > build by commenting out the offending code block...
> > > > > 
> > > > >     [javac] 
> > > > > D:\workspace\brailleblaster\src\main\org\brailleblaster\wordprocessor\SaveOptionsDialog.java:55:
> > > > >  error: cannot find symbol
> > > > >     [javac]                              if (BBIni.useUtd()) {
> > > > >     [javac]                                       ^
> > > > >     [javac]   symbol:   method useUtd()
> > > > >     [javac]   location: class BBIni
> > > > >     [javac] 1 error
> > > > >     [javac] 1 warning
> > > > > 
> > > > > 
> > > > > I can probably fix it but need to be sure I understand what this is 
> > > > > supposed to be doing.
> > > > > 
> > > > > Keith Creasy
> > > > > Software Developer
> > > > > American Printing House for the Blind KCreasy@xxxxxxx
> > > > > Phone: 502.895.2405
> > > > > Skype: keith537
> > > > > 
> > > > 
> > > > --
> > > > John J. Boyer; President, Chief Software Developer Abilitiessoft, Inc.
> > > > http://www.abilitiessoft.com
> > > > Madison, Wisconsin USA
> > > > Developing software for people with disabilities
> > > > 
> > > 
> > > --
> > > John J. Boyer; President, Chief Software Developer Abilitiessoft, Inc.
> > > http://www.abilitiessoft.com
> > > Madison, Wisconsin USA
> > > Developing software for people with disabilities
> > > 
> > > 
> > 
> > --
> > John J. Boyer; President, Chief Software Developer Abilitiessoft, Inc.
> > http://www.abilitiessoft.com
> > Madison, Wisconsin USA
> > Developing software for people with disabilities
> > 
> > 
> 
> --
> John J. Boyer; President, Chief Software Developer Abilitiessoft, Inc.
> http://www.abilitiessoft.com
> Madison, Wisconsin USA
> Developing software for people with disabilities
> 
> 

-- 
John J. Boyer; President, Chief Software Developer
Abilitiessoft, Inc.
http://www.abilitiessoft.com
Madison, Wisconsin USA
Developing software for people with disabilities


Other related posts: