Posts

Showing posts from March, 2009

DOS prompt batch

Was trying out something on batch file, quite interesting though has limited features. But would be a quick way to delivery some solutions. Always check what batch can do before want to write a program for it. Good place to start on batch programming at -> http://www.allenware.com/icsw/icswidx.htm SET MYLOCATION = C:\Folder REM A reversible CD command where you can go back where you REM came from. pushd %MYLOCATION% REM check for file existent if not exist *.txt goto ERROR for %%file in (*txt) do type "%%file" >> mySingleFile.txt IF ERRORLEVEL 1 goto ERROR popd :ERROR echo Error occurredEXIT /B 1

XSL - Altering child attribute with original parent attribute

XML <?xml version="1.0" encoding="utf-8"?> <Items xmlns="http://www.abc.com" xmlns:myns="http://www.abc.com"> <Item attr="1"> <field1>My Content 1</field1> </Item> <Item attr="2"> <field1>My Content 1</field1> </Item> <Item attr="3"> <field1>My Content 1</field1> <field2 innerAttr="a">My Content 2</field2> </Item> </Items> XSL <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:myns="http://www.abc.com" xmlns="http://www.abc.com" > <xsl:output omit-xml-declaration="no" indent="yes"/> <xsl:namespace-alias stylesheet-prefix="#default" result-prefix="#default...