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.
Fast/Flexible Linux OS Recovery
On Demand Now
In this live one-hour webinar, learn how to enhance your existing backup strategies for complete disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible full-system recovery solution for UNIX and Linux systems.
Join Linux Journal's Shawn Powers and David Huffman, President/CEO, Storix, Inc.
Free to Linux Journal readers.Register Now!
- Ubuntu Online Summit
- Devuan Beta Release
- The Qt Company's Qt Start-Up
- The US Government and Open-Source Software
- May 2016 Issue of Linux Journal
- Download "Linux Management with Red Hat Satellite: Measuring Business Impact and ROI"
- The Death of RoboVM
- Open-Source Project Secretly Funded by CIA
- New Container Image Standard Promises More Portable Apps
- BitTorrent Inc.'s Sync
In modern computer systems, privacy and security are mandatory. However, connections from the outside over public networks automatically imply risks. One easily available solution to avoid eavesdroppers’ attempts is SSH. But, its wide adoption during the past 21 years has made it a target for attackers, so hardening your system properly is a must.
Additionally, in highly regulated markets, you must comply with specific operational requirements, proving that you conform to standards and even that you have included new mandatory authentication methods, such as two-factor authentication. In this ebook, I discuss SSH and how to configure and manage it to guarantee that your network is safe, your data is secure and that you comply with relevant regulations.Get the Guide