Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: AW: [xsl] Detecting carriage return and newline feed in XML Data

From: "Michael Kay" <mike@------------>
To:
Date: 11/1/2004 10:20:00 AM
XML input is processed by the XML parser before it gets anywhere near the
XSLT processor. The only way to prevent XML's normalization of whitespace
characters (whether in element or attribute content) is to write the
characters as character references, e.g. &#x0D; You can of course do that by
preprocessing the file in some non-XML-aware tool before submitting it to
the XML parser.

Are you really sure you need to do this? Somehow, you're not using XML the
way it was intended to be used and that's always bad news. I've forgotten
what your original problem was, if you ever explained it.

Michael Kay
http://www.saxonica.com/ 

> -----Original Message-----
> From: michella@xxxxxxx [mailto:michella@xxxxxxx] 
> Sent: 01 November 2004 10:00
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: AW: AW: [xsl] Detecting carriage return and newline 
> feed in XML Data
> 
> 
> 
> 
> 
> > The carriage return appears in the XML source data. Aren't there any
> > technics to treat them in a custom way while parsing?(eg. 
> by passing a
> > parameter to the parser)?
> 
> yes, place the string in element content not an attribute value.
> Then they will be normalised to a single #10 character.
> 
> David
> 
> ----> Is it possible to convert the selected attribut field 
> into element
> while processing the stylesheet ? E.g. using the xsl:element or
> something like that?
> 
> Regards
> 
> Lawrence


transparent
Print
Mail
Like It
Disclaimer
.

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.

.
.

transparent

transparent