Posts Tagged ‘ JavaScript ’

Finding the best way to query news items

The XSLT code for the site is done! Now I am focusing more on different ways the user can search for different news items. As mentioned in a previous post, I’ve been looking at using a multi-level JavaScript drop-down menu, a search box or a combination of the two.

An attempt to present all the countries and cities that appear in the scraped RSS XML makes for a drop-down or scroll-down menu that is way too long to be practical. Also, instead of using a menu for sorting stories by format (text, video, audio, et. al.) I’d rather use the simple icon key explained in that same post. Thus, menus for my project are a no go for now.

Another minor issue I’d like to work out is how to present overlapping file types. For example, I want to be able to present the link to a story that has text with an embedded video as having video and text. So far I’m thinking of using another so-called “code scraper” such as HtmlCleaner, which turns HTML code into plain text. Continue reading

Advertisements

Making it work

Each format may contain one or more of these iconsI’ve been plugging away at the XSL loop for a solid week now. I think I’ve nearly exhausted all that XSLT can do for this project, which I am mainly using to call information from a massive database when certain conditions are met. For example, I was able to make it so that when “Israel” is selected as the location, all of the stories involving Israel will show up with the news item’s headline (wrapped in the story’s permalink), over the publication date, the lede and icons corresponding to the news item’s format (text, audio, video and commentary).

Although I include the publication date as part of each item’s presentation, it will not bear any impact the site’s organizing principle. Each item’s story location(s) will also show up as a dot on a world map. Hovering over either a dot or its corresponding news item’s box brings focus to both the news item and the dot (i.e. by fading out all other story items and dots). Continue reading