DocBook: attribute 'float' not allowed here validation error
Questions about XML that are not covered by the other forums should go here.
-
- Posts: 4
- Joined: Thu Jul 03, 2014 3:14 pm
DocBook: attribute 'float' not allowed here validation error
With this code
Oxygen XML Editor 13.2, build 2012040515 is giving me the error
Why am I getting that validation error? The red squiggly lines are on this line . I also tried adding the attribute like this which didn't change anything.
Why am I getting the "attribute "float" not allowed here" error even though I am not even using that attribute?
How am I supposed to fix that?
Code: Select all
<sect3>
<title>A Title</title>
<para>Some text::</para>
<para>
<figure id="my_id">
<title>Figure title</title>
<mediaobject>
<imageobject>
<imagedata
fileref="images/blah.png"
/>
</imageobject>
</mediaobject>
</figure></para>
</sect3>
Code: Select all
E [Jing] attribute "float" not allowed here; expected attribute "annotations", "arch", "audience", "condition", "conformance", "dir", "floatstyle", "label", "linkend", "os", "pgwide", "remap", "revision", "revisionflag", "role", "security", "userlevel", "vendor", "version", "wordsize", "xlink:actuate", "xlink:arcrole", "xlink:href", "xlink:role", "xlink:show", "xlink:title", "xlink:type", "xml:base", "xml:id", "xml:lang" or "xreflabel"
Code: Select all
<figure id="my_id">
Code: Select all
float
Code: Select all
<figure id="my_id" float="false">
Why am I getting the "attribute "float" not allowed here" error even though I am not even using that attribute?
How am I supposed to fix that?
-
- Posts: 4
- Joined: Thu Jul 03, 2014 3:14 pm
Re: DocBook: attribute 'float' not allowed here validation e
Adding the "xml" prefix to the "id" didn't help either:
Code: Select all
<figure xml:id="initial_script" float="true">
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: DocBook: attribute 'float' not allowed here validation e
Hi,
Could you post a complete XML sample? I cannot quite reproduce your problem.
Are you using Docbook 5? If so, all IDs should indeed be defined using xml:id instead of id.
I opened a regular installation of Oxygen 13.2 and tried to validate this small XML document (created from your code sample):
and validation reported a problem with the id attribute but no problem with the "float" attribute.
Regards,
Radu
Could you post a complete XML sample? I cannot quite reproduce your problem.
Are you using Docbook 5? If so, all IDs should indeed be defined using xml:id instead of id.
I opened a regular installation of Oxygen 13.2 and tried to validate this small XML document (created from your code sample):
Code: Select all
<?xml-model href="http://docbook.org/xml/5.0/rng/docbook.rng" schematypens="http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="http://docbook.org/xml/5.0/rng/docbook.rng" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?>
<article xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0">
<info>
<title>Article Template Title</title>
<author>
<orgname>Organization Name</orgname>
<address>
<city>City</city>
<street>Street</street>
<postcode>000000</postcode>
<country>Country</country>
</address>
<email>user@example.com</email>
</author>
</info>
<sect1>
<title>Section1 Title</title>
<subtitle>Section1 Subtitle</subtitle>
<para>Text</para>
<sect2>
<title>dsadad</title>
<sect3>
<title>A Title</title>
<para>Some text::</para>
<para>
<figure id="my_id">
<title>Figure title</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/blah.png"/>
</imageobject>
</mediaobject>
</figure>
</para>
</sect3>
</sect2>
</sect1>
</article>
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 4
- Joined: Thu Jul 03, 2014 3:14 pm
Re: DocBook: attribute 'float' not allowed here validation e
Thank you for your quick reply!
Here is the entire XML example. Yes, we are using DocBook 5.
I tried your example and it works without validation error after I added the "xml" prefix to "id":
I supposed that there is a mistake with my nesting of the DocBook XML elements.. or something else. I'll try to figure it out. If you happend to see the problem, I'd be grateful for a hint.
Here is the entire XML example. Yes, we are using DocBook 5.
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<?oxygen RNGSchema="http://www.oasis-open.org/docbook/xml/5.0/rng/docbookxi.rng" type="xml"?>
<sect1 xml:id="test" xmlns="http://docbook.org/ns/docbook"
xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Test</title>
<sect2>
<title>Some title</title>
<para>Some text:</para>
<para>
<figure xml:id="initial_script" float="true">
<title>Some figure title</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/some_image.png"/>
</imageobject>
</mediaobject>
</figure>
</para>
</sect2>
</sect1>
Code: Select all
<figure xml:id="my_id">
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: DocBook: attribute 'float' not allowed here validation e
Hi,
From the XML sample you sent you seem to be using the float attribute on the <figure> element.
If I remove that attribute from there, the XML validates.
Looking at the Docbook 5 specification for figure:
http://docbook.org/tdg5/en/html/figure.html
it seems there is no attribute called float allowed on the element but there is an attribute called floatstyle which you could probably try instead.
Regards,
Radu
From the XML sample you sent you seem to be using the float attribute on the <figure> element.
If I remove that attribute from there, the XML validates.
Looking at the Docbook 5 specification for figure:
http://docbook.org/tdg5/en/html/figure.html
it seems there is no attribute called float allowed on the element but there is an attribute called floatstyle which you could probably try instead.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Return to “General XML Questions”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service