Dear Hussein, Thank you for the support. The solution works! Unfortunately, other attributes for numbered lists, i.e. 'continuation' and 'startingnumber', are now being ignored in the new solution. Is there a way to use both these attributes ánd a role attribute (for a 'special' list with continuation)?
I am sorry we didn't have the correct license. I am now trying to make this purchase. We are a company in the Netherlands (VAT number NL802465237B01), but we do not have a company credit card. A possibility is that I pay with my personal credit card (and get reimbursed by my company). But then the credit card billing address (my personal address) does not match the address that is linked to the VAT number (the company address). Another possibility would be that you send me an invoice and we pay the amount via a bank transfer (IBAN)? Would that be possible? Please find all details attached needed for the invoice, and please let me know if you need additional information. Groetjes, Louise -----Oorspronkelijk bericht----- Van: Hussein Shafie [mailto:huss...@xmlmind.com] Verzonden: donderdag 26 april 2018 12:01 Aan: Louise Prompers CC: 'xmleditor-support@xmlmind.com'; w2x-supp...@xmlmind.com Onderwerp: Re: [XXE] Add a role attribute to a list after the conversion from Word to docbook5? Please note that this level of support is reserved to the customers of "XMLmind Word To XML", http://www.xmlmind.com/w2x/ , a product which is different from "XMLmind XML Editor". You are a customer of "XMLmind XML Editor", which indeed comes with a free to use, fully functional, "Word To XML" add-on. However this does not mean that you'll have the same level of support as "XMLmind Word To XML" customers. Anyway we'll answer your questions to prove our good will. On 04/25/2018 10:31 AM, Louise Prompers wrote: > > > I am trying to add an ordered list with a custom role to a docbook xml > after conversion from a Word .docx. What I do is I apply a custom > style in Word (e.g. list-special) to the list, and follow the > conversion steps. I see that the "single page styled (X)HTML" > generated seems to get the style (as a p class="p-list-special"), so > the problem is not in the first step of the conversion. That's right. > > > > However, the conversion to docbook seems to ignore the style, even > though I added it to the MS-Word style to XML element map in the w2x > options file. Other paragraph styles seem to convert well enough, I > guess the problem is due to the fact that lists are treated a bit > differently as the XHTML paragraphs are not a list, rather paragraphs > where the numbers are incremented using CSS, and some sort of > transformation is used to make this into an ordered list. It's simpler than what you think. The setup assistant of the "Word To XML" add-on () simply does not support mapping MS-Word styles to list and list items. It just supports mapping character and paragraph MS-Word styles to XML text spans and XML paragraphs. > > > > Is there a way to apply such a custom style to list to add a role > attribute to the resulting list after the conversion to docbook5? > > Sure. However this requires writing scripts by hand. See "Customizing the output of w2x, The general case", http://www.xmlmind.com/w2x/_distrib/doc/manual/index.html#general_customize_semantic_xml I gave it a quick shot. (These are not production quality scripts.) My custom list item MS-Word style is called "SpecialList" and I want the DocBook 5 orderedlist to have attribute role="SpecialList". See attached, hand-written, SpecialList.xed --- namespace "http://www.w3.org/1999/xhtml"; namespace html = "http://www.w3.org/1999/xhtml"; namespace g = "urn:x-mlmind:namespace:group"; for-each /html/body//p[get-class("p-SpecialList")] { set-element-name("li"); remove-class("p-SpecialList"); set-attribute("g:id", "SpecialList_item"); set-attribute("g:container", "ol class='SpecialList'"); } group(); --- See attached, hand-written, SpecialList.xslt --- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:h="http://www.w3.org/1999/xhtml" xmlns="http://docbook.org/ns/docbook" exclude-result-prefixes="h"> <xsl:import href="w2x:xslt/docbook5.xslt"/> <xsl:template match="h:ol[@class = 'SpecialList']"> <orderedlist role="SpecialList"> <xsl:call-template name="processCommonAttributes"/> <xsl:apply-templates/> </orderedlist> </xsl:template> </xsl:stylesheet> --- You may use attached, hand-written, SpecialList_options.txt to give this a try: --- -o docbook5 -pu edit.before.lists SpecialList.xed -t SpecialList.xslt --- Simply save SpecialList_options.txt, SpecialList.xed and SpecialList.xslt in the same directory and use as an input attached SpecialList.docx. This should give you attached SpecialList.xml.
Buy Products.pdf
Description: Buy Products.pdf
-- XMLmind XML Editor Support List xmleditor-support@xmlmind.com http://www.xmlmind.com/mailman/listinfo/xmleditor-support