From: Дмитрий С. <sd...@ma...> - 2013-06-10 10:00:20
|
Hi! I am trying to develop automatic batch importing of non-MW XML data dumps into SMW store properties. Via generating wikipages with templates, not directly via SMW API because SF also should be used. The problem is that non-MW XML property values contain arbitrary HTML in CDATA sections. Some of that html is successfully stored by SMW as property value. But some another html data becomes invalid or empty value. Neither CDATA nor <nowiki> escaping (wrapping) worked to avoid such problem. I cannot think of anything besides base64 encode these, which is ugly. Or to convert source html into wikitext, which is not trivial (is there a ready solutions for that?). Also converting to wikitext may potentionally lose some data. The third most complex way is to store all as base64 and write such "encoded BLOB" type of property extension for SMW / SF. But that would take too much of time, probably. Dmitriy |
From: Yaron K. <ya...@wi...> - 2013-06-10 14:30:27
|
Hi Dmitriy, SMW should be able to store any arbitrary text, so I don't know why that error would happen. Can you give an example of a value that isn't being stored correctly? Also, I would try two things: - Use the "Code" type for that property (or properties), instead of "Text". I don't know if it stores values any differently, but it will display the value in a pre-formatted way, which is probably what you want. - Try adding the following to LocalSettings.php, below the inclusion of SMW: $smwgLinksInValues = true; -Yaron On Mon, Jun 10, 2013 at 6:00 AM, Дмитрий Синцов <sd...@ma...> wrote: > Hi! > I am trying to develop automatic batch importing of non-MW XML data dumps > into SMW store properties. Via generating wikipages with templates, not > directly via SMW API because SF also should be used. > > The problem is that non-MW XML property values contain arbitrary HTML in > CDATA sections. Some of that html is successfully stored by SMW as property > value. But some another html data becomes invalid or empty value. Neither > CDATA nor <nowiki> escaping (wrapping) worked to avoid such problem. I > cannot think of anything besides base64 encode these, which is ugly. Or to > convert source html into wikitext, which is not trivial (is there a ready > solutions for that?). Also converting to wikitext may potentionally lose > some data. > The third most complex way is to store all as base64 and write such > "encoded BLOB" type of property extension for SMW / SF. But that would take > too much of time, probably. > Dmitriy > > > ------------------------------------------------------------------------------ > How ServiceNow helps IT people transform IT departments: > 1. A cloud service to automate IT design, transition and operations > 2. Dashboards that offer high-level views of enterprise services > 3. A single system of record for all IT processes > http://p.sf.net/sfu/servicenow-d2d-j > _______________________________________________ > Semediawiki-user mailing list > Sem...@li... > https://lists.sourceforge.net/lists/listinfo/semediawiki-user > -- WikiWorks · MediaWiki Consulting · http://wikiworks.com |
From: Дмитрий С. <sd...@ma...> - 2013-06-11 06:52:23
|
Понедельник, 10 июня 2013, 10:30 -04:00 от Yaron Koren <ya...@wi...>: >Hi Dmitriy, > >SMW should be able to store any arbitrary text, so I don't know why that error would happen. Can you give an example of a value that isn't being stored correctly? > >Also, I would try two things: > >- Use the "Code" type for that property (or properties), instead of "Text". I don't know if it stores values any differently, but it will display the value in a pre-formatted way, which is probably what you want. > >- Try adding the following to LocalSettings.php, below the inclusion of SMW: > >$smwgLinksInValues = true; > > Hi Yaron. $smwgLinksInValues = true; did not help, I'll send the definition of value of property in private separate mail because it's a private project. Hope that's ok. Dmitriy |