show attributes and xinclude
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 10
- Joined: Mon Mar 05, 2007 5:25 pm
- Location: Hamburg
show attributes and xinclude
Hello all,
I am new to oXygen and XML (have used SGML for some time) and have a question regarding the display of attributes for an element. I am using my own catalog and DocBook 4.5 with the xinclude.mod file from the DB 4.3 supplied with oXygen.
When I don't include the %xinclude; call in the DTD decl, I see the available attributes for a tag when I click it but the <xi:include> elements are highlighted as errors.
If I include the %xinclude (xinclude.mod), then the attributes are not displayed.
Is this related to content completion? The behavior is the same with that checked or unchecked.
Thanks for any and all help. There is really a lot to learn here.
I am new to oXygen and XML (have used SGML for some time) and have a question regarding the display of attributes for an element. I am using my own catalog and DocBook 4.5 with the xinclude.mod file from the DB 4.3 supplied with oXygen.
When I don't include the %xinclude; call in the DTD decl, I see the available attributes for a tag when I click it but the <xi:include> elements are highlighted as errors.
If I include the %xinclude (xinclude.mod), then the attributes are not displayed.
Is this related to content completion? The behavior is the same with that checked or unchecked.
Thanks for any and all help. There is really a lot to learn here.
-- Michael
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Post by sorin_ristache »
Hello,
I get the attributes of the element in the content completion window in both cases. Did you specify the correct path to xinclude.mod? For example if you specify the system ID as here
the path to xinclude.mod will be resolved using the default XML catalog. Did you check that your document is valid before trying to insert attributes with the content completion window? What is the result of the Validate Document action?
Regards,
Sorin
I get the attributes of the element in the content completion window in both cases. Did you specify the correct path to xinclude.mod? For example if you specify the system ID as here
Code: Select all
<!ENTITY % xinclude SYSTEM "http://www.docbook.org/xml/4.4/xinclude.mod">
%xinclude;
Regards,
Sorin
-
- Posts: 10
- Joined: Mon Mar 05, 2007 5:25 pm
- Location: Hamburg
Thank you for your quick reply!
Validation said it could not find the xinclude.mod file. I guess I really don't yet full understand the way catalogs work in XML.
As I mentioned, I am using my own catalog. The xinclude.mod file is specified there as so...
----
<system
systemId="xinclude.mod"
uri="DTD/docbook/xml/xinclude.mod"/>
----
(In SGML, resolution is always from the location of the catalog. Is this not so in XML?)
In my doc I have (had)...
----
<!ENTITY % xinclude SYSTEM "xinclude.mod">
%xinclude;
----
But the validation said in could not find the file in the directory of the xml source file.
I don't really know why, but adding a PUBLIC id and it worked...
----
<public
publicId="xinclude.mod"
uri="DTD/docbook/xml/xinclude.mod"/>
<system
systemId="xinclude.mod"
uri="DTD/docbook/xml/xinclude.mod"/>
----
with
----
<!ENTITY % xinclude PUBLIC "xinclude.mod" "xinclude.mod">
%xinclude;
----
(?)
Thanks again.
Validation said it could not find the xinclude.mod file. I guess I really don't yet full understand the way catalogs work in XML.
As I mentioned, I am using my own catalog. The xinclude.mod file is specified there as so...
----
<system
systemId="xinclude.mod"
uri="DTD/docbook/xml/xinclude.mod"/>
----
(In SGML, resolution is always from the location of the catalog. Is this not so in XML?)
In my doc I have (had)...
----
<!ENTITY % xinclude SYSTEM "xinclude.mod">
%xinclude;
----
But the validation said in could not find the file in the directory of the xml source file.
I don't really know why, but adding a PUBLIC id and it worked...
----
<public
publicId="xinclude.mod"
uri="DTD/docbook/xml/xinclude.mod"/>
<system
systemId="xinclude.mod"
uri="DTD/docbook/xml/xinclude.mod"/>
----
with
----
<!ENTITY % xinclude PUBLIC "xinclude.mod" "xinclude.mod">
%xinclude;
----
(?)
Thanks again.
-- Michael
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Post by sorin_ristache »
Hello,
Regards,
Sorin
The parser will try to find in the catalog a full system ID, that is the absolute system ID obtained from the relative system ID specified in the XML document, in your case SYSTEM "xinclude.mod". The absolute system ID is the absolute location of the folder of the XML document + xinclude.mod. For example if the folder with your document is C:\temp\test the system ID that is searched in the catalog is: file:///C:/temp/test/xinclude.mod. This will never match the systemId attribute of the system element of your XML catalog. In our example the catalog must contain:mdamkier wrote:As I mentioned, I am using my own catalog. The xinclude.mod file is specified there as so...
----
<system
systemId="xinclude.mod"
uri="DTD/docbook/xml/xinclude.mod"/>
----
(In SGML, resolution is always from the location of the catalog. Is this not so in XML?)
In my doc I have (had)...
----
<!ENTITY % xinclude SYSTEM "xinclude.mod">
%xinclude;
----
But the validation said in could not find the file in the directory of the xml source file.
Code: Select all
<system
systemId="file:///C:/temp/test/xinclude.mod"
uri="DTD/docbook/xml/xinclude.mod"/>
Sorin
-
- Posts: 10
- Joined: Mon Mar 05, 2007 5:25 pm
- Location: Hamburg
Hallo sorin,
Thank you for that explaination. That made it a lot clearer. After some experimentation it appears that if my system identifier is already absolute (i.e., "file:///xinclude.mod") that I can use just a SYSTEM resolution in the catalog. So, I guess that relative paths are made absolute (relative to the "calling" file) and absolute paths are, well, absolute.
Thanks again for making the light bulb over my head turn on.
Thank you for that explaination. That made it a lot clearer. After some experimentation it appears that if my system identifier is already absolute (i.e., "file:///xinclude.mod") that I can use just a SYSTEM resolution in the catalog. So, I guess that relative paths are made absolute (relative to the "calling" file) and absolute paths are, well, absolute.
Thanks again for making the light bulb over my head turn on.
-- Michael
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