Re: xml preserve whitespace in node text

Thanks, Arnoud and Eric for your trouble.
First of all Happy New Year.

I do not want tidy to add attributes, and the option add-xml-space would do
that. Furthermore, according to the documentation the option only works with
elements such as <PRE>, <STYLE> and <SCRIPT>, so I did'nt bother to try it.
Now I did, just to experiment, and sure enough, no attribute was added by
tidy, because I don't have those elements.

I'm not allowed to add attributes because I'm generating an XBRL instance,
and there are rules to be followed. 

The input for tidy is this:
<bd-bedr:DescriptionDeviatingBusinessAssetsStartFinancialYear
contextRef="cd0">Gecorrigeerd vermogen                                                 
Correctie op de omzet                                                 
Toevoeging van reserves                                              
</bd-bedr:DescriptionDeviatingBusinessAssetsStartFinancialYear>

And the output I get from is this:
<bd-bedr:DescriptionDeviatingBusinessAssetsStartFinancialYear
contextRef="cd0">Gecorrigeerd vermogen Correctie op de omzet Toevoeging van
reserves</bd-bedr:DescriptionDeviatingBusinessAssetsStartFinancialYear>

When I use XmlSpy with the input, the instance is pretty-printed while
whitespace is preserved, so it should be possible to get the result I want.

If tidy cannot do this, could you suggest other programs that work on the
command line? I'm calling tidy from another program.

Regards,
 


Arnaud Desitter-2 wrote:
> 
> Hi,
> Try to add the attribute "xml:space" set to "preserve" on the related
> elements.
> Tidy option "add-xml-space" may help.
> 
> Regards,
> 

-- 
View this message in context: http://www.nabble.com/xml-preserve-whitespace-in-node-text-tp21221443p21239869.html
Sent from the w3.org - html-tidy mailing list archive at Nabble.com.

Received on Thursday, 1 January 2009 08:44:49 UTC