Not so trivial if the style name is not a valid xml element name. For instance you can't have a space in the name so "Heading 1" will need to become "Heading1". If your styles include potentially problematic characters like &* or begin with a number or underscore then you might also run in to problems.
You might need to include a function to ensure only xml valid names get in the tags.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
|