nunojob:~ dscape/08$ echo The Black Sheep

Posts tagged ‘xforms’

METS Standard with IBM DB2 Express C using XForms as user-interface and Ruby on Rails as a Rest Web-services

HIGH QUALITY VERSION DOWNLOAD HERE

Well, here is the long promised screen-cast. The amount of topics covered is simply huge. To get you ready for the screen-cast I prepared some other more introductory screen-cast as well as some articles on these subjects. I’m sorry that I don’t have the time to document the REST, but I really advice to invest some time learning it as it’s a very pragmatic way of delivering high quality web services.

I strongly advice you to download this screen-cast from rapidshare as both Youtube and Google Videos quality is really awful. You can download it from here.

This work was really fun to do. So I hope to have the opportunity to develop it further and manage nested rest routes like /mets/1/agents to return the agents of the first submission information package (sip) using some cool DB2 pureXML features. I really feel that with a good plugin to help users take full advantage of DB2 pureXML features and a little of imagination this web-service could be of some use.

I also expect to complete the xforms model as it is not indexing a fileptr to each category when such is selected. I hope to implement this soon enough.

Here are the associated resources I developed:

And here are the other two screencasts I produced to introduce you to XForms and METS:

I also advice you to take a look at this articles. All of them where very helpful to my work.

xForms Example (CSS)

Sample Xforms Application using cssSo here comes my first ever XForms sample. If you are interested in testing them out I’ll have to give you some pointers. First off all your browser probably can’t render XForms. So you need to find a specific add-on for your browser to make it work. As this XForms where made in Mozilla Firefox with this add-on I strongly recommend that you use it to get the same results. This is not my fault, XForms is not as mature as HTML or CSS and therefor these things tend to happen. You will see what I’m talking about when I get to the Know Issues! :PNow two short notes:

  • For the load/save button to work you will need to change the path in the code. Just look for xforms:submission and replace the filepath for the one in your computer.
  • You need to comment what’s between this for the load button to work. Why? The bind is interfering with the instance replace. How do you fix it? If i knew I would have. I think that when I do remove the bind and add the schema this behavior will be fixed..

<!– remove this lines to erase load bug. Using a schema will fix this –><!– EOB: End of bug –>

Credits for the icons go to famfamfam.Here is the list of known issues (any help is welcome):

  • Not binded to the schema. That’s because I’m lasy and METS is hard work.
  • xforms:select1 won’t hide the scroll on overflow:hidden. I’m not sure this is my responsibility as the add-on doesn’t represent a full XForms implementation.
  • Submission not implemented. That was really not the point.
  • Submission button is relevant when no authorid or workid is given. Anyone?
  • Can’t style ‘add’ and ‘remove’ trigger differently from the other xforms|trigger. I tried creating a class for them having as result a weird inverted triagle. To replicate this bug you need to find a trigger and add style=”border:100px;”.

For now: that’s all folks! Have a nice week.

Creating a User Interface for XML Schema using xForms

We use XSLT all the time to convert a XML document into another format. XML Schemas are XML documents and I think it would be interesting to create the user interface and model for that specific schema using xForms. This would drastically decrease development time and would allow a quick view on what that XML Schema is all about. In other words, this would do for xForms what JAXB does for Java.

Why xForms? xForms is W3C recommendation for creating user interfaces and it’s based on the MVC pattern. This is enough to convince me, I’m all for standards.

While researching I found some works on this subject [here, here] but they are mostly on conference proceedings and therefor I thought no one had really implemented a Generic Schema to xForms transformation engine. Before giving up I asked Vítor Rodrigues about this, as IBM is know for their XML Alphaworks. Guess what? Now I have the solution.

Here’s what you need create an xForm from a Schema:

  • Download Eclipse WTP
  • Open Eclipse and browse to Help > Software Updates > Find and Install
  • Click New Remote Site
  • Name: Emerging Technologies Toolkit (ETTK) Updates
    URL: http://awwebx04.alphaworks.ibm.com/ettktechnologies/updates
  • Select it and click Finish
  • Now select Emerging Technologies Toolkit (ETTK) Updates > Emerging Technologies Toolkit – Technologies > Visual XForms Designer
  • Click next.
  • Accept the license, install the software and restart eclipse.

Now for the Visual XForms Designer I made a little screen-cast. Just click here to see it.

xForms Resources

We will post a xForms/METS/DB2 screen-cast in this website soon. To get you prepared for this I advice you to download this firefox plugin and read the following articles:

In case you are looking for good examples you can visit this wikibook or better yet… Open your console, and create a directory in your home folder. Enter the folder and write this:

svn checkout http://xforms-examples.googlecode.com/svn/trunk/ xforms-examples-read-only

These are some great samples from Google Code. Believe me I’m saving you time with this advice. You won’t need to spend hours on badly executed examples from companies that are supposed to be building xForms implementations. Outch!?

Piada do dia

You’ll also be installing an XForms extension that lets you view XForms documents directly in current versions of Firefox, Internet Explorer, Seamonkey, or Mozilla. If you don’t currently have one of these excellent, standards-compliant browsers installed, now’s a good time to get one.

em: http://www.ibm.com/developerworks/xml/library/x-xformsintro1

O Internet Explorer 8 deverá ser a primeira versão do browser a suportar totalmente os padrões web como CSS e RSS, uma vez que passou no teste de padrões web Acid2 Browser Test.

em: http://www.webtuga.com/Primeira-beta-do-Internet-Explorer-8-devera-chegar-em-meados-de-2008.wtuga

Misturar Microsoft e standards na mesma frase é, para mim, sempre uma boa piada. E, já agora, que raio é o Acid2 Browser Test? Santa ignorância. A minha, claro!

[EDIT: Se estão interessados em saber um pouco mais sobre o assunto podem ler o excelente contributo que o André Luís deixou como comentário]

A Mais Alta Arvore de Natal da Europa

A Mais Alta Arvore de Natal da EuropaVenho agora da cidade da Arvore de Natal Mais Alta da Europa! Temos o GP Histórico, temos o RedBull Air Race e agora a Arvore de Natal Mais Alta da Europa. É daquelas coisas que dá orgulho de ser portuense! Ter um governante assim dá gosto. Uma pessoa incorruptível, uma pessoa que jamais fecharia a Câmara ao Futebol Clube do Porto se fossem campeões europeus, uma pessoa incapaz de despejar velhinhos que viveram toda a sua vida na mesma ilha, uma pessoa que seria incapaz de emitir um despacho que proibisse todas as pessoas que vivem em bairros sociais de mudarem para outro. Afinal quem mais que ele percebe como é morar na torre 1 do Aleixo com dois filhos com menos de 7 anos. Não percebe senhor Rui Rio? Claro que percebe. (A continuar assim manda alguém dar pancada a uns camionistas na ponte do Freixo e ainda acaba como presidente da republica!)

Tenho muito orgulho em dizer que quando estava no décimo segundo ano e era representante dos alunos da minha escola me recusei a estender a minha mão e cumprimentar este senhor. Valeu a pena o raspanete que levei do director, a minha mãe sempre me ensinou a não me dar com escumalha.

Mas afinal quem é que quer saber da merda da maior arvore natal da Europa? Quem??? Quero Eu. Tenho aulas amanhã e tive que ir até Campanhã apanhar o comboio para Braga porque os parolos todos sairam a rua para ver o raio da arvore. É um pinheiro pessoal, atinjam, um pinheiro. Falso ainda por cima. Um pinheiro! Querem que soletre? Não tem duendes mágicos, não oferecem rebuçados, não estão lá as meninas da netcabo, nem sequer os famosos Microsofties talibans de quem o Mário Lopes tanto gosta. É apenas e só um pinheiro. Falso.
Agora que não venha agora alguém da câmara com chantagens para o meu email, isso é so-last-week. Actualizem-se.

Pelo menos na viagem tive a oportunidade de acabar o The Semantic Web da Wiley. O livro aborda muitos dos temas que são leccionados no meu mestrado, na unidade curricular de Engenharia de Linguagens. É uma leitura porreira para quem não saiba rigorosamente nada dos standards do W3 consortium, nem de ontologias ou abordagens à inteligência artificial. Mas se o vosso objectivo era o mesmo que o meu, ver algumas aplicações da tão famosa Sematic Web, comprem/requisitem outro livro. Neste não vão ver nada disso. O que tirei daqui foi que misturar soap/xml/xsd/svg/xforms da para muita coisa. E eu vou fazê-lo para o meu projecto de mestrado!

Entrentanto vou dando feedback aqui no blog.