ValueOf in sub-section header

Jan 22, 2010 at 3:31 PM

 

I am attempting to use ForEach without a table and create titles for document sections.
The xml would be
<data>
  <logic_solver_summary>
<node>
<name>FIRSTONE<name>
</node>
<node>
<name>SECONDONE<name>
</node>
  </logic_solver_summary>
<data>
Flex doc works fine when I setup my template where the name is not part of the header
[ForEach] with path=/d:data/d:logic_solver_summary/d:node
1.1 Node
[ValueOf] with path=d:/name
[ForEach]
which gives me the output
The output in the MSWord document would be
1. Logic SolverSummary
1.1 Node
FIRSTONE
1.2 Node
SECONDONE
however I would like to put the name in the sub-section header
[ForEach] with path=/d:data/d:logic_solver_summary/d:node
1.1 Node - [ValueOf] with path=d:/name
[ForEach]
so the MSWord document would be
1. Logic SolverSummary
1.1 Node - FIRSTONE
1.2 Node - SECONDONE
when I run the app. I get the following
************** Exception Text **************
System.IO.InvalidDataException: Package validation errors/warnings:/word/document.xml (xpath: /w:document[1]/w:body[1]/w:p[28]/w:bookmarkStart[1]): [Semantic] Attribute 'http://schemas.openxmlformats.org/wordprocessingml/2006/main:id' should have unique value. Its current value '1' duplicates with others.
/word/document.xml (xpath: /w:document[1]/w:body[1]/w:p[28]/w:bookmarkStart[2]): [Semantic] Attribute 'http://schemas.openxmlformats.org/wordprocessingml/2006/main:id' should have unique value. Its current value '2' duplicates with others.
/word/document.xml (xpath: /w:document[1]/w:body[1]/w:p[28]/w:bookmarkEnd[1]): [Semantic] Attribute 'http://schemas.openxmlformats.org/wordprocessingml/2006/main:id' should have unique value. Its current value '1' duplicates with others.
Has anyone attempted to embed ValueOf in a header?

I am attempting to use ForEach without a table and create titles for document sections. The xml would be

<data>

<logic_solver_summary>

<node>

<name>FIRSTONE<name>

</node>

<node>

<name>SECONDONE<name>

</node>

  </logic_solver_summary>

<data>

fleXdoc works fine when I setup my template where the name is not part of the sub-section header

1 Logic Solver Summary

[ForEach] with path=/d:data/d:logic_solver_summary/d:node

1.1 Node

[ValueOf] with path=d:/name

[ForEach]

The output in tMSWord document looks like

1. Logic SolverSummary

1.1 Node

FIRSTONE

1.2 Node

SECONDONE

 

however I would like to put the name in the sub-section header

[ForEach] with path=/d:data/d:logic_solver_summary/d:node

1.1 Node - [ValueOf] with path=d:/name

[ForEach]

when I do this the ValueOf changes color and an exception is thrown when running the app

************** Exception Text **************

System.IO.InvalidDataException: Package validation errors/warnings:/word/document.xml (xpath: /w:document[1]/w:body[1]/w:p[28]/w:bookmarkStart[1]): [Semantic] Attribute 'http://schemas.openxmlformats.org/wordprocessingml/2006/main:id' should have unique value. Its current value '1' duplicates with others.

/word/document.xml (xpath: /w:document[1]/w:body[1]/w:p[28]/w:bookmarkStart[2]): [Semantic] Attribute 'http://schemas.openxmlformats.org/wordprocessingml/2006/main:id' should have unique value. Its current value '2' duplicates with others.

/word/document.xml (xpath: /w:document[1]/w:body[1]/w:p[28]/w:bookmarkEnd[1]): [Semantic] Attribute 'http://schemas.openxmlformats.org/wordprocessingml/2006/main:id' should have unique value. Its current value '1' duplicates with others.

Has anyone attempted to embed ValueOf in a header?

 I am looking for this type of output.

1. Logic Solver Summary

1.1 Node - FIRSTONE

1.2 Node - SECONDONE

 

Coordinator
Jan 22, 2010 at 3:40 PM

Does the content of the foreach contain a bookmark?

There's a known issue with bookmark-id's: these need to be unique and when they are inserted multiple times (eg: when inside a foreach), fleXdoc needs to renumber them.

I haven't fixed it yet, because there's usually a way to get around it and it probably doesn't make sense to have the same bookmark exist multiple times. Also: even though the document is not valid OOXML, Word has no problem opening it (no error message), rendering this issue low priority.

In other words: remove the bookmark for now.

Feb 1, 2010 at 12:11 AM

removing the 'hidden bookmark' solved the problem. Not sure why there was a bookmark in the section. 

Thanks for the reply