Virtual Filesystems Are Virtual Office Documents
Listing 10. Developing and Debugging New Stylesheets
$ ferrisls -R --xml-xsltfs-debug \ --show-ea=name,content,myattr \ example.xml/root <?xml version="1.0" encoding="UTF-8" standalone="no" ?> <ferrisls> <root name="root" url="file:///tmp/KK/example.xml/root"> <file1 content="" myattr=" " name="file1" url="file:///tmp/KK/example.xml/root/file1"/> <file3 content="filesystems inside XML?" myattr=" " name="file3" url="file:///tmp/KK/example.xml/root/file3"/> <file7 content="Something blue" myattr="foo" name="file7" url="file:///tmp/KK/example.xml/root/file7"/> </root> </ferrisls> $ ferrisls -R --xml-xsltfs-debug \ --show-ea=name,content,myattr \ example.xml/root >| input.xml $ FerrisXalanTransform -s example.xsl -m input.xml transform XML:input.xml with xsl:example.xsl <?xml version="1.0" encoding="UTF-8"?><root> <context original-url="file:///tmp/KK/example.xml/root/file3" name="file3">filesystems inside XML? </context> <context original-url="file:///tmp/KK/example.xml/root/file7" name="file7">foo </context> </root> $ export LIBFERRIS_XSLTFS_SHEETS_URL=`pwd` $ URL=xsltfs://context/file/tmp/example/example.xml/ ↪root?stylesheet=example.xsl $ fcat $URL <?xml version="1.0" encoding="UTF-8" standalone="no" ?> <root> <context name="file3" original-url="file:///home/ben/xsltfs/ ↪example.xml/root/file3">filesystems inside XML? </context> <context name="file7" original-url="file:///home/ben/ ↪xsltfs/example.xml/root/file7">foo </context> </root> $ fcat $URL >| translated.xml $ vi translated.xml ...make changes to test reverse sheet ...inserting CHANGE_A and changeB into the elements $ FerrisXalanTransform -s example-rev.xsl \ -m translated.xml transform XML:translated.xml with xsl:example-rev.xsl <?xml version="1.0" encoding="UTF-8"?> <explicit-updates> <context url="file:///home/ben/xsltfs/example.xml/root/file3" >filesystems inside CHANGE_A XML? </context> <attribute url="file:///home/ben/xsltfs/example.xml/root/file7" name="myattr">foo changeB </attribute> </explicit-updates>
The major planned feature is the automatic derivation of the reverse stylesheet. This would make setting up xsltfs:// mountpoints much simpler. Things, such as duplicating nodes in the forward XSL file, would require an explicit reverse XSL file to resolve conflicts where each duplicate was edited in the transformed filesystem.
More plugins for ferris-filesystem-to-xsltfs-sheets are in the cards. For example, being able to edit data from common LDAP schemas, such as user authentication in OpenOffice.org, would be nice. Support for creating virtual OpenOffice.org zip files as the target of xsltfs:// would allow the creation of native OpenOffice.org documents.
More of the command-line options of patch probably will become available for the reverse stylesheet to use.
Resources for this article: /article/9513.
Ben Martin has been working on filesystems for more than ten years. He is currently working toward a PhD at the University of Wollongong, Australia, combining Semantic Filesystems with Formal Concept Analysis to improve human-filesystem interaction.
Practical Task Scheduling Deployment
July 20, 2016 12:00 pm CDT
One of the best things about the UNIX environment (aside from being stable and efficient) is the vast array of software tools available to help you do your job. Traditionally, a UNIX tool does only one thing, but does that one thing very well. For example, grep is very easy to use and can search vast amounts of data quickly. The find tool can find a particular file or files based on all kinds of criteria. It's pretty easy to string these tools together to build even more powerful tools, such as a tool that finds all of the .log files in the /home directory and searches each one for a particular entry. This erector-set mentality allows UNIX system administrators to seem to always have the right tool for the job.
Cron traditionally has been considered another such a tool for job scheduling, but is it enough? This webinar considers that very question. The first part builds on a previous Geek Guide, Beyond Cron, and briefly describes how to know when it might be time to consider upgrading your job scheduling infrastructure. The second part presents an actual planning and implementation framework.
Join Linux Journal's Mike Diehl and Pat Cameron of Help Systems.
Free to Linux Journal readers.Register Now!
- SUSE LLC's SUSE Manager
- Murat Yener and Onur Dundar's Expert Android Studio (Wrox)
- My +1 Sword of Productivity
- Tech Tip: Really Simple HTTP Server with Python
- Returning Values from Bash Functions
- Non-Linux FOSS: Caffeine!
- Managing Linux Using Puppet
- Doing for User Space What We Did for Kernel Space
- Rogue Wave Software's Zend Server
- Google's SwiftShader Released
With all the industry talk about the benefits of Linux on Power and all the performance advantages offered by its open architecture, you may be considering a move in that direction. If you are thinking about analytics, big data and cloud computing, you would be right to evaluate Power. The idea of using commodity x86 hardware and replacing it every three years is an outdated cost model. It doesn’t consider the total cost of ownership, and it doesn’t consider the advantage of real processing power, high-availability and multithreading like a demon.
This ebook takes a look at some of the practical applications of the Linux on Power platform and ways you might bring all the performance power of this open architecture to bear for your organization. There are no smoke and mirrors here—just hard, cold, empirical evidence provided by independent sources. I also consider some innovative ways Linux on Power will be used in the future.Get the Guide