"This is not allowed in this context" - xml markup in 03

F

Fredrick, HJ

I have attached well-formed and valid schema to my document and am able to tag most of my text successfully. Why does some of the text that I tag result in an error "This is not allowed in this context". What do I need to do to fix this?
 
C

Charles Maxson

HJ,

This is common when the XML mapping in the document does not 'match' the
schema (even if schema is well-formed and valid) . An example would be if
you do not represent XML sequences by order or hierarchy.

Consider the following:

If your schema represents this XML:

<rootElement>

<groupNode>

<childNode1/>

<childNode2/>

</groupNode>

</rootElement>


_____________

(1) Missing context) But in Word you mark up the document missing the
parent node (groupNode) of elements:

(rootElement)

(childNode1) (childNode1)

(childNode2) (childNode2)

(rootElement)


_____________
(2) Invalid order) Or go out of order according to the schema


(rootElement)

(groupNode)

(childNode2) (childNode2)

(childNode1) (childNode1)

(groupNode)

(rootElement)


_____________

You will get the somewhat vague "This is not allowed in this context" error.
Simply fix your mapping to follow the schema at all levels.....

(3) Correct mapping)

(rootElement)

(groupNode)

(childNode1) (childNode1)

(childNode2) (childNode2)

(groupNode)

(rootElement)






--
Charles
www.officezealot.com


I have attached well-formed and valid schema to my document and am able to
tag most of my text successfully. Why does some of the text that I tag
result in an error "This is not allowed in this context". What do I need to
do to fix this?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top