Project

Profile

Help

Suppress line breaks within tags

Added by Anonymous about 14 years ago

Legacy ID: #8180442 Legacy Poster: Beat Minder (bminder)

Hello I'm having a problem with indenting when transforming a document with XSLT. Attributes are sometimes split into separate records. I receive ... <Tag Attrib1="value1" Attrib2="value2" Attrib3="value3/> ... but need this: ... <Tag Attrib1="value1" Attrib2="value2" Attrib3="value3/> ... I need to transform XML as input for an application with very poor xml-support. The application requires that all tags are on the same line. Is there a way to suppress the additional line breaks within a tag? Thanks in advance for any help.


Replies (4)

Please register to reply

RE: Suppress line breaks within tags - Added by Anonymous about 14 years ago

Legacy ID: #8180485 Legacy Poster: Michael Kay (mhkay)

I have implemented a serialization property to define the maximum line length, which will enable you to suppress this behaviour by setting the line length to a very large value. But this is for the next release. In the meantime your options are indentation or no-indentation, and if you choose indentation you have to take it as it comes. If you want to get into the detail, you can customize the Saxon serializer by subclassing its components - but a much better solution would be to change the downstream application so that it uses a real XML parser.

RE: Suppress line breaks within tags - Added by Anonymous about 14 years ago

Legacy ID: #8180515 Legacy Poster: Beat Minder (bminder)

wow, thank you very much for your fast answer. Unfortunately the application cannot be changed. Is there any time line, when the next release is published resp. when the new serialization property is available in saxon-ee?

RE: Suppress line breaks within tags - Added by Anonymous about 14 years ago

Legacy ID: #8180536 Legacy Poster: Michael Kay (mhkay)

Is there any time line I've always avoided being date-driven. The release is ready when it's ready. Probably this summer some time.

RE: Suppress line breaks within tags - Added by Anonymous about 14 years ago

Legacy ID: #8180558 Legacy Poster: Beat Minder (bminder)

That would be perfect. Thanks a lot

    (1-4/4)

    Please register to reply