• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

parsing in Xalan

 
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Guys! I need to transform an XML document to HTML. However, as there are many different XML documents that I need to transform I do not and cannot maintain a CSS or an XSL for each of them. Therefore, I am sacrificing that cosmetic finishing which is acceptable. The HTML i get is also acceptable. However, the javax.xml.transform.Transformer class provided by Xalan, which I am using for transformation produces lot of attributes and places them before the html tag in the generated HTML. This is how I create my transformer, tFactory.newTransformer().

This effect is removed when I use an XSL when creating a transformer class through tFactory.newTransformer(xslDocument) and only the correct HTML is produced. If I dont pass an xsl, it gives me unneeded stuff(comments) some of which I paste here. Please inform how can I remove this unnecessary data?


Black = #000000 Green = #008000
Silver = #C0C0C0 Lime = #00FF00
Gray = #808080 Olive = #808000
White = #FFFFFF Yellow = #FFFF00
Maroon = #800000 Navy = #000080
Red = #FF0000 Blue = #0000FF
Purple = #800080 Teal = #008080
Fuchsia= #FF00FF Aqua = #00FFFF
--><!--=================== Generic Attributes ===============================--><!-- core attributes common to most elements



id document-wide unique id
class space separated list of classes
style associated style info
title advisory title/amplification
--><!-- internationalization attributes
lang language code (backwards compatible)
xml:lang language code (as per XML 1.0 spec)
dir direction for weak/neutral text
--><!-- attributes for common UI events
onclick a pointer button was clicked
ondblclick a pointer button was double clicked
 
I found a beautiful pie. And a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic