On 23 Feb 2009, at 14:07, George Cristian Bina wrote:
Dear Bram,
The error should be obtained when you validate the info.xml file and
not the manual.xml file, right? At least this is the behavior I can
reproduce.
Correct, that's what i ment to say . :-)
This is an interesting case. The problem is that the DocBook grammar
does not specify info as one of the allowed start elements and thus
the error. There are two solutions, both possible with oXygen:
- use a modified DocBook schema that allows info as root
- validate the info.xml file in the context it is used from
In the first case you can include the DocBook schema and then add a
choice start pattern like below:
<grammar xmlns="http://relaxng.org/ns/structure/1.0">
<include href="docbookxi.rng"/>
<start combine="choice">
<ref name="db.info"/>
</start>
</grammar>
In the second case you just need to define a validation scenario and
add an entry to validate manual.xml with the default engine. Thus,
intsead of validating info.xml directly oXygen will validate
starting from manual.xml and info.xml will be validated in the
context it is used.
They both seem interesting solutions, For now the powers that be have
decided that it makes sense to have the info block live in the top
file, but will prob go with your first strategie in the end.
Although i am pondering about dropping the docbook list a line to
figure out what their plans are.
bram
Best Regards,
George
--
George Cristian Bina
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Bram Vogelaar wrote:
Hello All
i am trying to separate one of our docbook projects into smaller
xml files using the following structure
manual.xml
<?xml version="1.0" encoding="UTF-8"?>
<?oxygen RNGSchema="http://www.oasis-open.org/docbook/xml/5.0/rng/docbookxi.rng
" type="xml"?>
<book xmlns="http://docbook.org/ns/docbook" xmlns:xi="http://www.w3.org/2001/XInclude
"
xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0">
<xi:include href="parts/info.xml"
xmlns:xi="http://www.w3.org/2001/XInclude">
</xi:include>
<xi:include href="parts/part1.xml"
xmlns:xi="http://www.w3.org/2001/XInclude">
</xi:include>
........
</book>
info.xml
<?xml version="1.0" encoding="UTF-8"?>
<info xmlns="http://docbook.org/ns/docbook" version="5.0">
.......
</info>
which results in the following error
"E [oNVDL] element "info" from namespace "http://docbook.org/ns/docbook
" not allowed in this context"
While including the info block straight in the manual.xml (copy &
paste) there is no such error. Nor is this error triggered by
any of the other xi:included files.
could some one please point me in the right direction to x::include
the info.xml file?
with regards
Bram
_______________________________________________
oXygen-user mailing list
[email protected]
http://www.oxygenxml.com/mailman/listinfo/oxygen-user
_______________________________________________
oXygen-user mailing list
[email protected]
http://www.oxygenxml.com/mailman/listinfo/oxygen-user