Sunday, June 21, 2009

IAT352 Phase I doc: change XSLT

The main objective of this phase is to change the layout/ outlook of the website. I tried to start by playing with the xslt files, eg. index.xsl; however, I was not very successful to come up with a satisfactory layout. It was a mistake to start here, to mix design with implementation. So I a went back to the scratch book, think about what content I want in the website, and what functions I need in the layout to service the content. Then, based on that, I created a layout mock with HTM, and finally went back to xslt files to convert the layout mock into xslt.

In this process of transforming the layout mock into xslt I need, I have met several problems:
  1. The formatting of the the file was very messy, even with help of CSS. There are too many classes and ids in the stylesheet. So I searched and read a few very helpful tutorial on organizing and simplify CSS style.
  2. I find the section of code describing logo and menu are reused again and again, so I tried to turn these two section of coding into a xslt tempalte, and put into header_footer.xslt. However, this was met with error. The problem came from the xml schema - xsl template, logo & menu was not defined in the schema document. Which file generates the xml schema? Failing many times after I tried to change the index.xsd file itself, I realized that the file must be generated by any file.
  3. To find the file that generates the schema file, I traced the code from indexSeverlet.java to JSPUtil.java, and find that XmlApi.createNewElement(paramater); defineds the root element; and XmlApi.createChildElement(paramater); defineds the subquent elements.
So far, I have almost completed design and transforming index.xsl page, except:
  1. I need to find the correct expression (url) for Browse menu button, which is meant to show all games in the website. href="metadata.jsp?action=search&mid={_____}" What should be in the {___} to express all mids?
  2. Metada page is not working - I can not add any entry, and always gets a Exception: null error. I am currently quiet clueless which file (metadata.xsl? MetadataServelet.java? or other?) that is causing the problem. Perhaps I can try to change the error messages to something other than null so I will know, at least what to fix. This must be fixed before I can do anything else, especially for many things in phase II.
  3. I'm keeping Forum in the menu, but I'm a little puzzled whether we need it or not. Beside, it's a broken link.
  4. I also need to design, specific layout for Metadata & Review pages (search, add, edit, browse & view).
[Archive: Project Package jun22 v1.zip]

No comments:

Powered By Blogger