XML tagging

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hi

I'm having problems to format a Word document in XML: it seems that I cannot
freely decide where the elements of the XML Schema the document is attached
to start and end.

This is the XML Schema that I built and that is attached to the Word document:

<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2005 rel. 3 U (http://www.altova.com) by Jorge
(None) -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";
elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:element name="tree">
<xs:complexType>
<xs:sequence>
<xs:element ref="branch" minOccurs="1" maxOccurs="unbounded">
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="branch">
<xs:complexType>
<xs:sequence>
<xs:element name="leaf" type="xs:string" minOccurs="1"
maxOccurs="unbounded">
</xs:element>
<xs:element ref="branch" minOccurs="0" maxOccurs="unbounded">
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>

These are the contents of my document:

text text<line break>
texttext text text<line break>
<line break>
text texttext text text<line break>
<line break>
text<line break>

I first applied the XML element "tree" to the whole text and it worked fine.
Then I tried to add the XML element "branch" to the first 3 lines and the
first 4 characters of the 4th line:

text text<line break>
texttext text text<line break>
<line break>
text

It didn't allow me to do this. Instead it just included the first 3 lines
and forgot about the 4 characters of the 4th line.
If I replace the line breaks for "soft line breaks", it works fine.

I guess there could be a conflict with WordML or something.

Thanks in advance.
.



Relevant Pages

  • Re: word webpages
    ... I suppose the problem is that XML, HTML in Word is intended for another thing as opposed to website material. ... My experience with DreamWeaver is very, ... HTML simply isn't powerful enough to describe a Word document. ...
    (microsoft.public.mac.office.word)
  • Re: word webpages
    ... both Word and DreamWeaver will enable the user ... to decide that they don't need some parts of the Word document in their web ... XML all versions ... When Microsoft first included the ...
    (microsoft.public.mac.office.word)
  • Re: XML tagging
    ... Steve Hudson - Word Heretic ... >I'm having problems to format a Word document in XML: ... >This is the XML Schema that I built and that is attached to the Word document: ... >text texttext text text ...
    (microsoft.public.word.vba.general)
  • Re: How to get data from txt file into table of word template thro
    ... However,for this time, I Just assume that I need to populate the info into ... derived directly from the XML? ... not all customer info need to be in the word document. ... There's no way to answer the question about whether VBA is the best ...
    (microsoft.public.word.vba.general)
  • Re: How to get data from txt file into table of word template thro
    ... "Jezebel" wrote: ... However,for this time, I Just assume that I need to populate the info into ... derived directly from the XML? ... not all customer info need to be in the word document. ...
    (microsoft.public.word.vba.general)