Wednesday, April 18, 2012
MXSL Framework for VB.NET
to render html, xml, PDF, ..whatever in a read-only format on the web.
I started work on a framework that allows a strong-typed List object in .NET to be easily transformed to html with an XSL stylesheet.
Advantages:
A User Control can have a public property of XSLURL which can be set to point to different XSL stylesheets on the fly.
XML is stored in memory or on a hard drive.
XML or XSL can come cross domain from a remote server.
Strong type objects can be embedded to create a nested XML document.
If you would like to help with framework construction, hit me up.
Saturday, June 11, 2011
Preceding-Sibling | The Easy Way
Keeping on track with my previous post regarding the preceding-sibling approach to getting unique values with XSL, I prefer to not have to do the Muench method whenever possible. I like to keep it simple. Here is a really simple way to get a unique or distinct list of categories and sub-categories from an xml file:
<xsl:for-each select="item">
<xsl:variable name="thisNodeCategory" select="Category"/>
<xsl:if test="not(preceding-sibling::item[Category=$thisNodeCategory])">
<span class="Category">
<a href="">
<xsl:value-of select="Category" />
</a>
</span>
<br/>
</xsl:if>
<xsl:if test="SubCategory > ''">
<span class="subCategory">
- <a href="">
<xsl:value-of select="SubCategory" />subcategory
</a>
</span>
<br/>
</xsl:if>
</xsl:for-each>
Friday, June 10, 2011
Easier than preceding-sibling::
I don't like to use preceeding-sibling. It doesn't work when I want it to. So, I created a method that works just like it:
This method is a lot easier to implement. But, it doesn't work with <xsl:sort>. It requires the XML be in the correct sort order before doing the XSL Transform. If you don't have this luxury, you can use the method I will post in the following blog post. Or, if you are really brave, you can use the Muench Method. I think I posted how to do that in a previous post. Well, anyway you decide to do it, good luck.
<xsl:variable name="thisChildNode" select="Category"/>
<xsl:variable name="lastNodePosition" select="position() - 1"/>
<xsl:if test="not(/grandParentNode/parentNode[$lastNodePosition]/childNode = $thisChildNode)">
<h2><xsl:value-of select="childNode" /></h2>
</xsl:if>
Sunday, March 13, 2011
PORDL Mobile Pages Released
Example:
Pastor's Blog
You can point your cell phone directly to the page or setup a sub-domain for your website to point to the page.
It is also really easy to create a mobile website by adding html navigation to the top or bottom of your XSL stylesheets and pointing the nav links to other PORDL transforms.
Sunday, February 27, 2011
Nested List Sitemap From a Flat XML File
I decided to do a template for each level of the sitemap and trigger each template recursively at each level till no more items were available on the level.
It took about 15 hours of staring at code that didn't work till I got it right.
Here is my solution:
Nested Sitemap from a Flat XML File
Thursday, February 17, 2011
Creating SQL Statements from an XML File
Here is my order of events:
I saved the Excel File as a .csv file.
I used creativyst.com to change the .csv to an XML file.
I put a XML header on the file:
I saved the XML file to a web server where I could access it with a URL.
I used PORDL to create a new feed transform with the following XSL:
The output was a clean SQL Update Statement I could use to do a mass update of records on an OsCommerce database.
Friday, February 11, 2011
Grouping XSL Search Results
It took a while to figure this out because no one on the internet had a really good example that was easy to port over for my uses. So, I created an XSL sheet that can easily be ported to most any application.
Saturday, January 29, 2011
Embed Any Google News Search Result on Any Website or Blog
http://news.google.com/news?q=web&output=rss
where the "web" portion of the string is your web search terms.
The output can look like the following example, or any way you desire:
http://pordl.com/transform.aspx?id=528
depending on the XSL template you use.
Tuesday, January 18, 2011
Site Map XSL : Valid for SiteMap.org Specification XML
Here is a really simple version of the XSL required to render the Site Map XML (with valid namespace) as HTML:
I, also, added this XSL as one of the many default XSL choices when setting up feed transforms on PORDL.com.
Monday, January 10, 2011
Friday, January 7, 2011
Scrolling Feeds are Now Available
Now, you also have PORDL's feed scroller. It's everything Google's code doesn't do and more. Here is a sample:
http://pordl.com/scroller_demo.aspx
Wednesday, January 5, 2011
New Generic RSS XSLT Sheet
Twitter XSLT Stylesheet
Thursday, December 23, 2010
Two Simple Ways to XSL an RSS Feed
Either of these methods could be used as a default XSL stylesheet that works for most RSS feeds on the net.
Method 1:
Method 2:
NOTE: with this method, you can easily drop an xsl:if type statement inside the xsl:for-each.
PORDL - How to XSL
Wednesday, October 13, 2010
PORDL Version 0.7 Launched
The latest version of PORDL has been launched. Updates include: feed quantities in the navigation, style changes to the feed page and navigation, and enhancements to the Administrative section. Please have fun embedding stuff.
-Jason
Sunday, September 19, 2010
New Picasa Slideshow Gallery XSL Sheet
Friday, August 27, 2010
New XSL Stylesheet - Ticker Style RSS Feed
I created a new XSLT stylesheet for PORDL that allows you to embed a ticker-style feed on a site or blog. It wraps the feed in a styleable box. The ticker pauses when you hover over it with your mouse.
New XSL Stylesheets for FlickR RSS feeds
I worked up a new XSLT sheet that ouputs a rotating gallery of image thumbnails from a FlickR feed. Hover over the image and the rotation stops. Click on the image and it opens in a new window. Pretty basic. You can use the default stylesheet on the Edit Stylesheet page or use it as a base for your own XSLT idea.