Forum Discussion
Hey Angela,
Yes Document type matches and the standard schema is what we're using as a test area. The auto-application/calling of the Content Generator isn't the issue, I was looking for guidance on the DocumentSchemaElement call as there isn't any examples of a Section or Chapter in the documentation.
For instance, two items in the above content generator code example I gave:
this.Factory.NewText("Title","Introduction")
this.Factory.NewElement("Section")
The Factory call for NewText takes the Schema element (Title) and a value for it (Introduction). The Factory call for a "NewElement" that a Section falls under doesn't accept any "value". I can't find any documentation on the Factory calls.
Does that make sense?
Thanks in advance!
In which XML Schema Element to you use your code?
You can use an Content Generator for "Section" that add the default title as soon as you add a section.
E.g. I used this one for a similar "TOC section" to automatically add an "Title" and a "TOC":
targetElement.AddChild(this.Factory.NewText("Title", "Table Of Contents"));
targetElement.AddChild(this.Factory.NewElement("TOC"));
But I really would suggest you to ask Aras support :).