 |
 |
 |
It's probably worth noting that all three examples are supposed to be output
as
<code>
abc<nl/>
def<nl/>
</code>
i.e. "soft" newlines are inserted at the beginning and after each <nl/>.
This is done to aid human readability (as our humans are imperfect XML
parsers). OK, this isn't necessary nor pure, but it ought to be possible.
The original stylesheet (thru Saxon) did this nicely, i.e. it roundtripped.
Splitting the XPath expression into two conditions is not roundtripping
correctly, instead the output is gaining one space per line per invocation.
Cheers
Trevor
-----Original Message-----
<snip>
we're looking at code samples where spaces are significant, and line breaks
are inserted into the text with <nl/> elements. The following three XML
fragments need to produce identical output:
<code>
abc<nl/>
def<nl/>
</code>
<code> abc<nl/> def</nl></code>
<code> abc<nl/>
def<nl/></code>
|
 | 

|  |
These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.
|  |
| |
 |
 |
 |