List Info

Thread: Imagedata and XInclude




Imagedata and XInclude
user name
2007-11-05 15:02:40
Greetings!
I am puzzled by the benign error that I get in validating XIncluded content with Oxygen. Here is the section of code:
 
<equation ><title>Here is a nice equation</title&gt;
<mediaobject>
<imageobject>
<imagedata align="center">
<xi:include xmlnsi="http://www.w3.org/2001/XInclude" href="EEC-Math-template.xml"/&gt;
</imagedata>
</imageobject>
</mediaobject>
</equation>
 
and I get the following error in validation:
 
SystemID: C:docusermanxmlEEC-Section-Template.xml
Location: 300:12
Description: The content of element type "imagedata" must match "EMPTY".
 
I usually do all of my production XML with Docbook 4.5, Saxon 6.5.5 and FOP 0.94 (with the Jeuclid plugin) which produces output just fine. In the past I have cleared up issues of XIncludes by using the stuff in Stayton's book (http://www.sagehill.net/docbookxsl/ValidXinclude.html), but in this case, I'm not sure what to add to my ENTITYs to clear this up, as it looks like <imagedata> doesn't like xiinclude'd files.
 
I do not believe that this is an oXygen issue, I believe that this is a Docbook modular issue where the Docbook "modularity" support only goes down a few layers?
 
Thoughts and guidance?

Dean Nelson&nbsp; &nbsp;
Sr. Software Engineer
Enterprise Electronics Corp
http://www.EECradar.com &nbsp;

"A pessimist is a person that complains of the noise when opportunity knocks" - Cleon Lyles


This e-mail, including attachments, may include confidential and/or proprietary information, and may be used only by the person or entity to which it is addressed.  If the reader of this e-mail is not the intended recipient or his or her authorized agent, the reader is hereby notified that any dissemination, distribution or copying of this e-mail is prohibited.  If you have received this e-mail in error, please notify the sender by replying to this  message and delete this e-mail immediately.

 
Re: Imagedata and XInclude
user name
2007-11-06 01:53:18
Nelson, Dean wrote:
> Greetings!
> I am puzzled by the benign error that I get in
validating XIncluded
> content with Oxygen. Here is the section of code:
>  
> <equation ><title>Here is a nice
equation</title>
> <mediaobject>
> <imageobject>
> <imagedata align="center">
> <xi:include xmlnsi=&qu
ot;http://www.w3.o
rg/2001/XInclude"
> href="EEC-Math-template.xml"/>
> </imagedata>
> </imageobject>
> </mediaobject>
> </equation>
>  
> and I get the following error in validation:
>  
> SystemID: C:docusermanxmlEEC-Section-Template.xml
> Location: 300:12
> Description: The content of element type
"imagedata" must match "EMPTY".

Take a look at the schema.
The imagedata element *must* be empty.

regards




-- 
Dave Pawson
XSLT, XSL-FO and Docbook FAQ
http://www.dpawson.co.uk



------------------------------------------------------------
---------
To unsubscribe, e-mail: docbook-apps-unsubscribelists.oasis-open.org
For additional commands, e-mail: docbook-apps-helplists.oasis-open.org


RE: Imagedata and XInclude
user name
2007-11-06 06:44:17
OK - does "empty" mean that there should be
another wrapper that wraps the MathML code?
 
I am assuming that "empty" does not mean
"nothing", as that would be senseless?
 

________________________________

From: Dave Pawson [mailto:davepdpawson.co.uk]
Sent: Tue 11/6/2007 1:53 AM
To: Nelson, Dean
Cc: docbook-appslists.oasis-open.org
Subject: Re: [docbook-apps] Imagedata and XInclude



Nelson, Dean wrote:
> Greetings!
> I am puzzled by the benign error that I get in
validating XIncluded
> content with Oxygen. Here is the section of code:
> 
> <equation ><title>Here is a nice
equation</title>
> <mediaobject>
> <imageobject>
> <imagedata align="center">
> <xi:include xmlnsi=&qu
ot;http://www.w3.o
rg/2001/XInclude"
> href="EEC-Math-template.xml"/>
> </imagedata>
> </imageobject>
> </mediaobject>
> </equation>
> 
> and I get the following error in validation:
> 
> SystemID: C:docusermanxmlEEC-Section-Template.xml
> Location: 300:12
> Description: The content of element type
"imagedata" must match "EMPTY".

Take a look at the schema.
The imagedata element *must* be empty.

regards




--
Dave Pawson
XSLT, XSL-FO and Docbook FAQ
http://www.dpawson.co.uk
<http://www.dpawson.co.u
k/> 




------------------------------------------------------------
---------
To unsubscribe, e-mail: docbook-apps-unsubscribelists.oasis-open.org
For additional commands, e-mail: docbook-apps-helplists.oasis-open.org


Re: Imagedata and XInclude
user name
2007-11-06 07:23:53
Dear Dean,

Place the caret on imagedata
Contextual menu (right click on Windows, CTRL+click on Mac)
Select the last entry: Show Definition

should get you to

<!--doc:Pointer to external image data.
This element points to an external entity containing
graphical image 
data.-->
<!ELEMENT imagedata %ho; EMPTY>

The ho parameter entity is defined as

<!ENTITY % ho "">

So, the content of imagedata is empty as in nothing.

Best Regards,
George
------------------------------------------------------------
---------
George Cristian Bina - http://aboutxml.blogspo
t.com/
<oXygen/> XML Editor, Schema Editor and XSLT
Editor/Debugger
http://www.oxygenxml.com



Nelson, Dean wrote:
> OK - does "empty" mean that there should be
another wrapper that wraps the MathML code?
>  
> I am assuming that "empty" does not mean
"nothing", as that would be senseless?
>  
> 
> ________________________________
> 
> From: Dave Pawson [mailto:davepdpawson.co.uk]
> Sent: Tue 11/6/2007 1:53 AM
> To: Nelson, Dean
> Cc: docbook-appslists.oasis-open.org
> Subject: Re: [docbook-apps] Imagedata and XInclude
> 
> 
> 
> Nelson, Dean wrote:
>> Greetings!
>> I am puzzled by the benign error that I get in
validating XIncluded
>> content with Oxygen. Here is the section of code:
>>
>> <equation ><title>Here is a nice
equation</title>
>> <mediaobject>
>> <imageobject>
>> <imagedata align="center">
>> <xi:include xmlnsi=&qu
ot;http://www.w3.o
rg/2001/XInclude"
>> href="EEC-Math-template.xml"/>
>> </imagedata>
>> </imageobject>
>> </mediaobject>
>> </equation>
>>
>> and I get the following error in validation:
>>
>> SystemID:
C:docusermanxmlEEC-Section-Template.xml
>> Location: 300:12
>> Description: The content of element type
"imagedata" must match "EMPTY".
> 
> Take a look at the schema.
> The imagedata element *must* be empty.
> 
> regards
> 
> 
> 
> 
> --
> Dave Pawson
> XSLT, XSL-FO and Docbook FAQ
> http://www.dpawson.co.uk
<http://www.dpawson.co.u
k/> 
> 
> 
> 
> 
>
------------------------------------------------------------
---------
> To unsubscribe, e-mail: docbook-apps-unsubscribelists.oasis-open.org
> For additional commands, e-mail: docbook-apps-helplists.oasis-open.org
> 

------------------------------------------------------------
---------
To unsubscribe, e-mail: docbook-apps-unsubscribelists.oasis-open.org
For additional commands, e-mail: docbook-apps-helplists.oasis-open.org


RE: Imagedata and XInclude
user name
2007-11-06 07:34:00
George
Is there a better way to include MathML in Docbook equations
that will validate in oXygen? It works well under SAXON
6.5.5 & FOP 0.94 from the command line but it won't
vaildate with Oxygen 9 (or 8.2).
 
BTW: the new oXygen version is a resounding success here at
work.
 
Dean

________________________________

From: George Cristian Bina [mailto:georgeoxygenxml.com]
Sent: Tue 11/6/2007 7:23 AM
To: Nelson, Dean
Cc: davepJUNKTHISdpawson.co.uk; docbook-appslists.oasis-open.org
Subject: Re: [docbook-apps] Imagedata and XInclude



Dear Dean,

Place the caret on imagedata
Contextual menu (right click on Windows, CTRL+click on Mac)
Select the last entry: Show Definition

should get you to

<!--doc:Pointer to external image data.
This element points to an external entity containing
graphical image
data.-->
<!ELEMENT imagedata %ho; EMPTY>

The ho parameter entity is defined as

<!ENTITY % ho "">

So, the content of imagedata is empty as in nothing.

Best Regards,
George
------------------------------------------------------------
---------
George Cristian Bina - http://aboutxml.blogspo
t.com/
<oXygen/> XML Editor, Schema Editor and XSLT
Editor/Debugger
http://www.oxygenxml.com
<http://www.oxygenxml.co
m/> 


Nelson, Dean wrote:
> OK - does "empty" mean that there should be
another wrapper that wraps the MathML code?
> 
> I am assuming that "empty" does not mean
"nothing", as that would be senseless?
> 
>
> ________________________________
>
> From: Dave Pawson [mailto:davepdpawson.co.uk]
> Sent: Tue 11/6/2007 1:53 AM
> To: Nelson, Dean
> Cc: docbook-appslists.oasis-open.org
> Subject: Re: [docbook-apps] Imagedata and XInclude
>
>
>
> Nelson, Dean wrote:
>> Greetings!
>> I am puzzled by the benign error that I get in
validating XIncluded
>> content with Oxygen. Here is the section of code:
>>
>> <equation ><title>Here is a nice
equation</title>
>> <mediaobject>
>> <imageobject>
>> <imagedata align="center">
>> <xi:include xmlnsi=&qu
ot;http://www.w3.o
rg/2001/XInclude"
>> href="EEC-Math-template.xml"/>
>> </imagedata>
>> </imageobject>
>> </mediaobject>
>> </equation>
>>
>> and I get the following error in validation:
>>
>> SystemID:
C:docusermanxmlEEC-Section-Template.xml
>> Location: 300:12
>> Description: The content of element type
"imagedata" must match "EMPTY".
>
> Take a look at the schema.
> The imagedata element *must* be empty.
>
> regards
>
>
>
>
> --
> Dave Pawson
> XSLT, XSL-FO and Docbook FAQ
> http://www.dpawson.co.uk
<http://www.dpawson.co.u
k/>  <http://www.dpawson.co.u
k/>
>
>
>
>
>
------------------------------------------------------------
---------
> To unsubscribe, e-mail: docbook-apps-unsubscribelists.oasis-open.org
> For additional commands, e-mail: docbook-apps-helplists.oasis-open.org
>



------------------------------------------------------------
---------
To unsubscribe, e-mail: docbook-apps-unsubscribelists.oasis-open.org
For additional commands, e-mail: docbook-apps-helplists.oasis-open.org


Re: Imagedata and XInclude
user name
2007-11-06 08:00:30
Nelson, Dean wrote:
> OK - does "empty" mean that there should be
another wrapper that wraps the MathML code?
>  
> I am assuming that "empty" does not mean
"nothing", as that would be senseless?

Which version of DocBook you are using 4.x or 5.0? MathML
embedded
inside imagedata is supported only in 5.0.

-- 
------------------------------------------------------------
------
  Jirka Kosek      e-mail: jirkakosek.cz      http://xmlguru.cz
------------------------------------------------------------
------
       Professional XML consulting and training services
  DocBook customization, custom XSLT/XSL-FO document
processing
------------------------------------------------------------
------
 OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34
member
------------------------------------------------------------
------

RE: Imagedata and XInclude
user name
2007-11-06 08:01:50
I am using 4.5. 
 
I suspect that moving to 5 is not a quick move, is it?

________________________________

From: Jirka Kosek [mailto:jirkakosek.cz]
Sent: Tue 11/6/2007 8:00 AM
To: Nelson, Dean
Cc: davepJUNKTHISdpawson.co.uk; docbook-appslists.oasis-open.org
Subject: Re: [docbook-apps] Imagedata and XInclude



Nelson, Dean wrote:
> OK - does "empty" mean that there should be
another wrapper that wraps the MathML code?
> 
> I am assuming that "empty" does not mean
"nothing", as that would be senseless?

Which version of DocBook you are using 4.x or 5.0? MathML
embedded
inside imagedata is supported only in 5.0.

--
------------------------------------------------------------
------
  Jirka Kosek      e-mail: jirkakosek.cz      http://xmlguru.cz <http://xmlguru.cz/> 
------------------------------------------------------------
------
       Professional XML consulting and training services
  DocBook customization, custom XSLT/XSL-FO document
processing
------------------------------------------------------------
------
 OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34
member
------------------------------------------------------------
------




------------------------------------------------------------
---------
To unsubscribe, e-mail: docbook-apps-unsubscribelists.oasis-open.org
For additional commands, e-mail: docbook-apps-helplists.oasis-open.org


Re: Imagedata and XInclude
user name
2007-11-06 08:32:31
Hi Dean,

I see that Jirka already responded to your question but I
want to 
address the validation issue.

Please note that Saxon and FOP are not validating your
DocBook file 
against a DTD or against a schema. Saxon will only care to
have an XML 
(that is well formed) document and it will get you from that
to an 
intermediary XSL-FO file that FOP will use as input and get
your PDF 
file. Invalid DocBook documents may very well pass through
this 
processings performed by Saxon and FOP.
This processing will stop only if you have the Saxon
executing an 
xsl:message with terminate="yes" or if you end up
with an XSL-FO file 
that FOP is not able to handle.

oXygen validates the document against the DocBook DTD or
schema and if 
the document passes that validation then you know it is
conforming with 
that DocBook DTD or schema.

The correct solution is to move to DocBook 5. However, if
the document 
passes fine though your processings and the only thing you
want is to 
see it valid then you can customize/change the DTD to accept
for 
instance xi:include inside imagedata. Then you can also add
an XSLT 
customization layer that matches on imagedata containing
something else 
than MathML and issue a termination message specifying that
only MathML 
is accepted inside imagedata.

Best Regards,
George
------------------------------------------------------------
---------
George Cristian Bina - http://aboutxml.blogspo
t.com/
<oXygen/> XML Editor, Schema Editor and XSLT
Editor/Debugger
http://www.oxygenxml.com



Nelson, Dean wrote:
> George
> Is there a better way to include MathML in Docbook
equations that will validate in oXygen? It works well under
SAXON 6.5.5 & FOP 0.94 from the command line but it
won't vaildate with Oxygen 9 (or 8.2).
>  
> BTW: the new oXygen version is a resounding success
here at work.
>  
> Dean
> 
> ________________________________
> 
> From: George Cristian Bina [mailto:georgeoxygenxml.com]
> Sent: Tue 11/6/2007 7:23 AM
> To: Nelson, Dean
> Cc: davepJUNKTHISdpawson.co.uk; docbook-appslists.oasis-open.org
> Subject: Re: [docbook-apps] Imagedata and XInclude
> 
> 
> 
> Dear Dean,
> 
> Place the caret on imagedata
> Contextual menu (right click on Windows, CTRL+click on
Mac)
> Select the last entry: Show Definition
> 
> should get you to
> 
> <!--doc:Pointer to external image data.
> This element points to an external entity containing
graphical image
> data.-->
> <!ELEMENT imagedata %ho; EMPTY>
> 
> The ho parameter entity is defined as
> 
> <!ENTITY % ho "">
> 
> So, the content of imagedata is empty as in nothing.
> 
> Best Regards,
> George
>
------------------------------------------------------------
---------
> George Cristian Bina - http://aboutxml.blogspo
t.com/
> <oXygen/> XML Editor, Schema Editor and XSLT
Editor/Debugger
> http://www.oxygenxml.com
<http://www.oxygenxml.co
m/> 
> 
> 
> Nelson, Dean wrote:
>> OK - does "empty" mean that there should
be another wrapper that wraps the MathML code?
>>
>> I am assuming that "empty" does not mean
"nothing", as that would be senseless?
>>
>>
>> ________________________________
>>
>> From: Dave Pawson [mailto:davepdpawson.co.uk]
>> Sent: Tue 11/6/2007 1:53 AM
>> To: Nelson, Dean
>> Cc: docbook-appslists.oasis-open.org
>> Subject: Re: [docbook-apps] Imagedata and XInclude
>>
>>
>>
>> Nelson, Dean wrote:
>>> Greetings!
>>> I am puzzled by the benign error that I get in
validating XIncluded
>>> content with Oxygen. Here is the section of
code:
>>>
>>> <equation ><title>Here is a nice
equation</title>
>>> <mediaobject>
>>> <imageobject>
>>> <imagedata align="center">
>>> <xi:include xmlnsi=&qu
ot;http://www.w3.o
rg/2001/XInclude"
>>> href="EEC-Math-template.xml"/>
>>> </imagedata>
>>> </imageobject>
>>> </mediaobject>
>>> </equation>
>>>
>>> and I get the following error in validation:
>>>
>>> SystemID:
C:docusermanxmlEEC-Section-Template.xml
>>> Location: 300:12
>>> Description: The content of element type
"imagedata" must match "EMPTY".
>> Take a look at the schema.
>> The imagedata element *must* be empty.
>>
>> regards
>>
>>
>>
>>
>> --
>> Dave Pawson
>> XSLT, XSL-FO and Docbook FAQ
>> http://www.dpawson.co.uk
<http://www.dpawson.co.u
k/>  <http://www.dpawson.co.u
k/>
>>
>>
>>
>>
>>
------------------------------------------------------------
---------
>> To unsubscribe, e-mail:
docbook-apps-unsubscribelists.oasis-open.org
>> For additional commands, e-mail:
docbook-apps-helplists.oasis-open.org
>>
> 
> 

------------------------------------------------------------
---------
To unsubscribe, e-mail: docbook-apps-unsubscribelists.oasis-open.org
For additional commands, e-mail: docbook-apps-helplists.oasis-open.org


Re: Imagedata and XInclude
user name
2007-11-06 09:23:04
George Cristian Bina wrote:
> Hi Dean,
> 
> I see that Jirka already responded to your question but
I want to 
> address the validation issue.
> 
> Please note that Saxon and FOP are not validating your
DocBook file 
> against a DTD or against a schema. Saxon will only care
to have an XML 
> (that is well formed) document and it will get you from
that to an 
> intermediary XSL-FO file that FOP will use as input and
get your PDF 
> file. Invalid DocBook documents may very well pass
through this 
> processings performed by Saxon and FOP.


Which is very easy to forget.
I've since added validation into my script that calls up
docbook
for transformation to address this.
Validate (and stop on errors), then transform to
html/xsl-fo.

It saves a lot of time in the end!


regards




-- 
Dave Pawson
XSLT, XSL-FO and Docbook FAQ
http://www.dpawson.co.uk



------------------------------------------------------------
---------
To unsubscribe, e-mail: docbook-apps-unsubscribelists.oasis-open.org
For additional commands, e-mail: docbook-apps-helplists.oasis-open.org


[1-9]

about | contact  Other archives ( Real Estate discussion Medical topics )