Re: xml preserve whitespace in node text

"Arnaud Desitter" <[email protected]>
Newsgroups gmane.comp.web.html-tidy.user
Message-ID <[email protected]>
Hi,

Although I have not tried, you could add the the needed
attributexml:space="preserve" where needed, process the data with tidy
and remove the added attribute.

Regards,

2009/1/1 dinges <[email protected]>:
>
>
> 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.
>
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.