Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Automatic formatting of XML documents (Word 2007)
Hello:
We plan to create/edit XML documents following custom schemas using Word 2007. Is there a way to associate elements to word styles? is it done through a dotx? Basically, whenever we open an XML document (saved by word as docx), we want formatting applied: e.g., - all titles appear bold, Arial, 12pt - figuretitles appear centered, TNS, 10pt - , etc... Your guidance would be much appreciated. Best Regards, Lyteck |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Automatic formatting of XML documents (Word 2007)
Hi ?B?THl0ZWNr?=,
We plan to create/edit XML documents following custom schemas using Word 2007. Is there a way to associate elements to word styles? is it done through a dotx? Basically, whenever we open an XML document (saved by word as docx), we want formatting applied: e.g., - all titles appear bold, Arial, 12pt - figuretitles appear centered, TNS, 10pt - , etc... There's nothing built into Word that can do this, no. You'd have to use a TRANSFORM to put valid WordProcessingML into the file (either as its opening, or you can process without opening in Word). In order to learn the correct syntax, apply the formatting/styles to tags in a document, then view the XML result. Cindy Meister INTER-Solutions, Switzerland http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005) http://www.word.mvps.org This reply is posted in the Newsgroup; please post any follow question or reply in the newsgroup and not by e-mail :-) |
#3
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Automatic formatting of XML documents (Word 2007)
Hi ?B?THl0ZWNr?=
That does look somewhat weird.... |
#4
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Automatic formatting of XML documents (Word 2007)
Thanks Cindy, your confirmation and work around suggestion is most appreciated.
The fact that styles cannot be applied automatically to XML tags seems to be an important omission. A huge benefit of XML in Word 2007 would be to take advantage of structured authoring. One critical benefit of structured authoring is of course to enable constistent formatting of enterprise documents by separating content from formatting; in effect, freeing authors from formatting tasks and letting formatting be applied automatically based on element names, attributes and context. At this time (Word 2007 B2TR), it seems styles can only be applied manually to individual elements. This is not practical for a large set of documents and is likely to lead to formatting inconsistency across documents and possibly within the same document. Cindy is suggesting a good but difficult workaround to provide automation. Does anyone know if the functionality to map styles to elements and save the mapping as a configuration that can be reused for other XML documents conforming to the same schema will be present when Word 2007 is officially released? Thanks, Lyteck Lynhiavu DIGITALENT New York, NY PS: I did notice the ability to attach a CSS to an XML document (under Word 2007DeveloperSchemasTemplates and Add-insLinked CSS tab) but I see the benefit of using CSS over richer Word styles to format a document. "Cindy M." wrote: Hi ?B?THl0ZWNr?=, We plan to create/edit XML documents following custom schemas using Word 2007. Is there a way to associate elements to word styles? is it done through a dotx? Basically, whenever we open an XML document (saved by word as docx), we want formatting applied: e.g., - all titles appear bold, Arial, 12pt - figuretitles appear centered, TNS, 10pt - , etc... There's nothing built into Word that can do this, no. You'd have to use a TRANSFORM to put valid WordProcessingML into the file (either as its opening, or you can process without opening in Word). In order to learn the correct syntax, apply the formatting/styles to tags in a document, then view the XML result. Cindy Meister INTER-Solutions, Switzerland http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005) http://www.word.mvps.org This reply is posted in the Newsgroup; please post any follow question or reply in the newsgroup and not by e-mail :-) |
#5
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Automatic formatting of XML documents (Word 2007)
(typos corrected)
Thanks Cindy, your confirmation and workaround suggestion are most appreciated. The fact that XML tags cannot automatically be associated to styles seems to be a real shortcoming. A huge benefit of XML in Word 2007 would be to take advantage of structured authoring. One core benefit of structured authoring is of course to enable constistent formatting of enterprise documents by separating content from formatting; in effect, freeing authors from formatting tasks and letting formatting be applied automatically based on element names, attributes and context. As of this writing (Word 2007 B2TR), it seems styles can only be applied manually to individual elements. This is not practical and is likely to lead to formatting inconsistency across large sets of documents and even within the same document. Cindy is suggesting a good but difficult workaround to provide automation. Does anyone know if the functionality to map styles to elements and save the mapping as a configuration that can be reused for other XML documents conforming to the same schema will be present when Word 2007 is officially released? Thanks, Lyteck Lynhiavu DIGITALENT New York, NY PS: I did notice the ability to attach a CSS to an XML document (under Word 2007DeveloperSchemasTemplates and Add-insLinked CSS tab) but I don't see the benefit of using CSS over richer Word styles to format a document. "Cindy M." wrote: Hi ?B?THl0ZWNr?=, We plan to create/edit XML documents following custom schemas using Word 2007. Is there a way to associate elements to word styles? is it done through a dotx? Basically, whenever we open an XML document (saved by word as docx), we want formatting applied: e.g., - all titles appear bold, Arial, 12pt - figuretitles appear centered, TNS, 10pt - , etc... There's nothing built into Word that can do this, no. You'd have to use a TRANSFORM to put valid WordProcessingML into the file (either as its opening, or you can process without opening in Word). In order to learn the correct syntax, apply the formatting/styles to tags in a document, then view the XML result. Cindy Meister INTER-Solutions, Switzerland http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005) http://www.word.mvps.org This reply is posted in the Newsgroup; please post any follow question or reply in the newsgroup and not by e-mail :-) |
#6
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Automatic formatting of XML documents (Word 2007)
Cindy,
I think what you have suggested is a one time processing job using an XSL transformation that applies styles to WordML elements. However, I understand that this will not be helpful in a scenario where one requires that Word styles be applied to the XML content on the fly as the content is being authored in Word 2007. So for e.g. I author something in the title element, it should by default appear in the style Heading 1 as soon as I type the content. Thanks, Saurabh Aggarwal Gurgaon India |
#7
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Automatic formatting of XML documents (Word 2007)
Hi Saurabh,
I think what you have suggested is a one time processing job using an XSL transformation that applies styles to WordML elements. However, I understand that this will not be helpful in a scenario where one requires that Word styles be applied to the XML content on the fly as the content is being authored in Word 2007. So for e.g. I author something in the title element, it should by default appear in the style Heading 1 as soon as I type the content. If the document is already set up with the XML elements, then the formatting can already have been applied to them. Then text typed into them will have the formatting. In Word 2007 this can also be done using Content Controls. If the user is expected to insert the XML elements while he works, then you need to provide an programmed interface (Ribbon or task pane) that will take care of inserting the elements and formatting them with the required style. Cindy Meister INTER-Solutions, Switzerland http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005) http://www.word.mvps.org This reply is posted in the Newsgroup; please post any follow question or reply in the newsgroup and not by e-mail :-) |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Converting WordPerfect 12 files to Word 2003 | New Users | |||
linking and sequential numbering of tables | Tables | |||
How can Word display full path of a file in the title bar? | Microsoft Word Help | |||
Envelope Address | New Users | |||
Macros - Keyboard Commands | Microsoft Word Help |