![]() ![]() |
Aug 15 2009, 08:16 PM
Post
#1
|
|
|
SuperNova III Member Group: Support Team Posts: 2,141 Joined: 2-November 02 From: Toronto Member No.: 302 ![]() |
i wish firefox bookmark organizer had a counter to see how many bookmarks are sitting in there. even thinking about how big the number could be scares the crap out of me.
as the greatest boss of mine asked for, I looked into my bookmarks & found some precious piece of url to some article which I have summarized it here: if you need to have your xml processor do something fancy for you & if the processor happens to be either of MS ones (MSXML or .Net), then forget about begging old XPATH/XSLT 1.0 to do it for you. write your own nasty piece of code (a .Net language or JS/VB for MSXML) & put it right in the middle of the xslt file & have the processor suck it up! (while saying : you mofo old useless xslt 1.0 junk, now eat this! i don't need ur built-in crap! ) CODE <xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ms="urn:schemas-microsoft-com:xslt" xmlns:havingFun="csharp.xslt.ext"> <xsl:output method="text"/> <ms:script language="C#" implements-prefix="havingFun"> <![CDATA[ public string HaveFun(string str) { return "Having Fun Now with " + str; } ]]> </ms:script> <xsl:template match="/"> <xsl:value-of select="havingFun:HaveFun(/items/item[1])"/> </xsl:template> </xsl:transform> of course the point is that XSLT built-in functions are limited & can't do every crazy thing my boss asks for. I don't know why that article is that long but the whole trick is the CODE <ms:script language="C#" implements-prefix="havingFun"> & there must be a non-MS tag too somewhere out there. |
|
|
|
Sep 13 2009, 05:40 PM
Post
#2
|
|
![]() Boss, my code's compiling (xkcd) Group: Admins Posts: 10,440 Joined: 19-September 01 Member No.: 1 ![]() |
XML tends to be verbose, much like Java, which tends to be a pain in the backside a lot of the time.
-------------------- ![]() ![]() Things that I don't suck at: Photography (flickr, JPG Mag), "Don't bail; the best gold is at the bottom of barrels of crap!" -Randy Pausch I have people-skills goddamnit! What is wrong with you people!!! | www.skyrill.com |
|
|
|
Sep 15 2009, 01:40 AM
Post
#3
|
|
|
SuperNova III Member Group: Support Team Posts: 2,141 Joined: 2-November 02 From: Toronto Member No.: 302 ![]() |
|
|
|
|
Mar 20 2010, 09:40 PM
Post
#4
|
|
|
No way... It compiles? SHIP IT! Group: Moderators Posts: 609 Joined: 27-December 04 From: Thunder Bay, Ontario Canada Member No.: 2,133 ![]() |
XML tends to be verbose, much like Java, which tends to be a pain in the backside a lot of the time. But Java is an ENTERPRISE SOLUTION. Verbosity is needed for something like that This post has been edited by MaD_cOw: Mar 20 2010, 09:49 PM -------------------- -Mad_cow |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 24th May 2013 - 04:34 AM |