Problem with "split" in context menu
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 12
- Joined: Tue Feb 08, 2011 11:40 pm
Problem with "split" in context menu
Here is a snippet from a simple document which is valid in our schema. I have ommitted some elements for clarity:
The issue is, when placing the cursor in position 1 (in author mode), the context menu shows "Split P", which is the desired behavior.
When placing the cursor in position 2, the context menu shows "Split Subcaption", we would like it to be like position 1, "Split P"
Here are the relevant parts of the schema:
Any ideas as to what is causing this, and what could be done to change it?
Thanks, Glenn
Code: Select all
<Body>
<P>Location 1: works correctly</P>
</Body>
<SubCaption>
<P>Location 2: splits subcaption instead of P</P>
</SubCaption>
When placing the cursor in position 2, the context menu shows "Split Subcaption", we would like it to be like position 1, "Split P"
Here are the relevant parts of the schema:
Code: Select all
<xs:complexType name="SubCaptionType">
<xs:sequence maxOccurs="unbounded">
<xs:element ref="tns:P" minOccurs="0" />
<xs:element ref="tns:TextNote" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="BodyType">
<xs:sequence maxOccurs="unbounded">
<xs:element ref="tns:TextNote" minOccurs="0"/>
<xs:element ref="tns:CodNote" minOccurs="0"/>
<xs:element ref="tns:P" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
Thanks, Glenn
-
- Site Admin
- Posts: 2095
- Joined: Thu Jan 09, 2003 2:58 pm
Re: Problem with "split" in context menu
Hi Glenn,
Only block level elements can be split. If your SubCaption element is defined by the CSS as a block element and the P element inside SubCaption is not a block element then oXygen will offer the split action on the SubCaption element. Please make sure your CSS defines also SubCation P as block.
Here it is an example that reproduces your problem
test.xml
test.css
test.xsd
Then, changing the CSS to add
makes the "Split P" action appear also on the second P element.
Best Regards,
George
Only block level elements can be split. If your SubCaption element is defined by the CSS as a block element and the P element inside SubCaption is not a block element then oXygen will offer the split action on the SubCaption element. Please make sure your CSS defines also SubCation P as block.
Here it is an example that reproduces your problem
test.xml
Code: Select all
<?xml-stylesheet type="text/css" href="test.css"?>
<test xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="test.xsd">
<Body>
<P>Location 1: works correctly</P>
</Body>
<SubCaption>
<P>Location 2: splits subcaption instead of P</P>
</SubCaption>
</test>
Code: Select all
test {
display : block;
}
Body {
display : block;
}
SubCaption {
display : block;
}
Body P {
display : block;
}
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xs:element name="test" type="test_type"/>
<xs:complexType name="test_type">
<xs:sequence>
<xs:element name="Body" type="BodyType"/>
<xs:element name="SubCaption" type="SubCaptionType" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="type_x">
<xs:restriction base="xs:string">
</xs:restriction>
</xs:simpleType>
<xs:complexType name="SubCaptionType">
<xs:sequence maxOccurs="unbounded">
<xs:element name="P" minOccurs="0" type="xs:string"></xs:element>
<xs:element name="TextNote" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="BodyType">
<xs:sequence maxOccurs="unbounded">
<xs:element name="TextNote" minOccurs="0"/>
<xs:element name="CodNote" minOccurs="0"/>
<xs:element name="P" minOccurs="0" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
Code: Select all
Body P {
display : block;
}
Best Regards,
George
George Cristian Bina
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ 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