Formatting an XML document using Java

Here should go questions about transforming XML with XSLT and FOP.
sxxx
Posts: 6
Joined: Sun Mar 27, 2005 10:29 pm

Formatting an XML document using Java

Post by sxxx » Sun Apr 03, 2005 10:31 pm

Could anyone help me in writing an XSLT stylesheet to produce a Java program to create the following representation: (Using HashMaps & ArrayLists)

Code: Select all



<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleDisplayName</key>
<string>TextEdit</string>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>rtf</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>rtf.icns</string>
<key>CFBundleTypeMIMETypes</key>
<array>
<string>text/rtf</string>
</array>
<key>CFBundleTypeName</key>
<string>NSRTFPboardType</string>
<key>CFBundleTypeOSTypes</key>
<array>
<string>RTF </string>
</array>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>LSIsAppleDefaultForType</key>
<true/>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>doc</string>
</array>
<key>CFBundleTypeName</key>
<string>Microsoft Word Document</string>
<key>CFBundleTypeOSTypes</key>
<array>
<string>W8BN</string>
<string>W6BN</string>
</array>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>rtfd</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>rtfd.icns</string>
<key>CFBundleTypeName</key>
<string>NSRTFDPboardType</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>LSIsAppleDefaultForType</key>
<true/>
<key>LSTypeIsPackage</key>
<true/>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>txt</string>
<string>text</string>
<string>*</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>txt.icns</string>
<key>CFBundleTypeMIMETypes</key>
<array>
<string>text/plain</string>
</array>
<key>CFBundleTypeName</key>
<string>NSStringPboardType</string>
<key>CFBundleTypeOSTypes</key>
<array>
<string>****</string>
</array>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>LSIsAppleDefaultForType</key>
<true/>
</dict>
<dict>
<key>CFBundleTypeIconFile</key>
<string>txt.icns</string>
<key>CFBundleTypeName</key>
<string>Apple SimpleText document</string>
<key>CFBundleTypeOSTypes</key>
<array>
<string>TEXT</string>
<string>sEXT</string>
<string>ttro</string>
</array>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>LSIsAppleDefaultForType</key>
<true/>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>html</string>
<string>htm</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>html.icns</string>
<key>CFBundleTypeName</key>
<string>Apple HTML document</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>webarchive</string>
</array>
<key>CFBundleTypeName</key>
<string>Apple Web archive</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
</array>
<key>CFBundleExecutable</key>
<string>TextEdit</string>
<key>CFBundleHelpBookFolder</key>
<string>TextEditHelp</string>
<key>CFBundleHelpBookName</key>
<string>TextEdit Help</string>
<key>CFBundleIconFile</key>
<string>Edit.icns</string>
<key>CFBundleIdentifier</key>
<string>com.apple.TextEdit</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>TextEdit</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.4</string>
<key>CFBundleSignature</key>
<string>ttxt</string>
<key>CFBundleVersion</key>
<string>220</string>
<key>NSAppleScriptEnabled</key>
<string>YES</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 1995-2005, Apple Computer, Inc.,
All Rights Reserved.</string>
<key>NSMainNibFile</key>
<string>Edit</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>NSServices</key>
<array>
<dict>
<key>NSMenuItem</key>
<dict>
<key>default</key>
<string>TextEdit/New Window Containing Selection</string>
</dict>
<key>NSMessage</key>
<string>openSelection</string>
<key>NSPortName</key>
<string>TextEdit</string>
<key>NSSendTypes</key>
<array>
<string>NSRTFDPboardType</string>
<string>NSRTFPboardType</string>
<string>NSStringPboardType</string>
</array>
</dict>
<dict>
<key>NSMenuItem</key>
<dict>
<key>default</key>
<string>TextEdit/Open Selected File</string>
</dict>
<key>NSMessage</key>
<string>openFile</string>
<key>NSPortName</key>
<string>TextEdit</string>
<key>NSSendTypes</key>
<array>
<string>NSStringPboardType</string>
</array>
</dict>
</array>
</dict>
</plist>