Re: meta section not shown (template for new doctype )

2 views
Skip to first unread message

Ashok Hariharan

unread,
Jan 17, 2013, 4:30:38 AM1/17/13
to bungeni...@googlegroups.com, say...@birzeit.edu
Hi Samar --

I found the problem -- there 2 issues :

1) root section name : 

  <doctype name="FamilyCourtJudgements"
             template="templates/FamilyCourtJudgements.ott"
             state="1"
             root="FamilyCourtJudgements"
             default-part="main">
  
Your type configuration specifies root section name as FamilyCourtJudgements - but in the document the root section name is judgement. So the culprit is templates/FamilCourtJudgements.ott .  (documented over here : http://code.google.com/p/bungeni-editor/wiki/DocTypeDefinition#doctype_element )

2) The template FamilyCourtJudgements.ott is faulty in a couple of respects. The root section (in your case "FamilyCourtJudgements.ott" )  must always have the SectionType set to "body" for it to work correctly. The easiest way to get that correct is to copy an existing template (e.g. the debatrecord.ott from development_configs/templates/ ) and rename the root section to what you want. (You can do that by opening the copy of the template via File->Templates->Edit in openoffice, then going to Format->Sections and just rename the root section from debaterecord to FamilyCourtJudgements ) . This is not documented unfortunately, I will add it to the wiki.


Ashok


On 17 January 2013 11:32, Samar Ayesh <smr....@gmail.com> wrote:
I attached the odt file


On Monday, January 14, 2013 8:37:34 AM UTC+2, Ashok Hariharan wrote:
Is your config folder on Svn ?

Ashok

On 12 January 2013 10:35, <say...@birzeit.edu> wrote:
Hello Ashok,

I just realized that meta section is not shown for birzeit_configs for judgements ..
This is how the output looks >>
<?xml version="1.0" encoding="UTF-8"?><akomaNtoso xmlns="http://www.akomantoso.org/2.0" xmlns:bodf="http://editor.bungeni.org/1.0/odf/">
   <judgement>
      <heading bodf:sourceId="heading">
         <p>555555555555555555555555555555555</p>
      </heading>
   </judgement>
</akomaNtoso>


I attached odt and xml file generated !!

--
You received this message because you are subscribed to the Google Groups "bungeni-editor" group.
To view this discussion on the web visit https://groups.google.com/d/msg/bungeni-editor/-/p2IwRitAqYoJ.

To post to this group, send email to bungeni...@googlegroups.com.
To unsubscribe from this group, send email to bungeni-edito...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/bungeni-editor?hl=en.

Ashok Hariharan

unread,
Jan 17, 2013, 5:03:53 AM1/17/13
to bungeni...@googlegroups.com, say...@birzeit.edu

Samar Ayesh

unread,
Jan 17, 2013, 5:11:19 AM1/17/13
to bungeni...@googlegroups.com, say...@birzeit.edu
I just copied debaterecord.ott and renamed it to FamilyCourtJudgements.ott with section name in it "FamilyCourtJudgements" ..
and my doc_types.xml for FamilyCourtJudgements doctype is like this >>>
<doctype name="FamilyCourtJudgements"
             template="templates/FamilyCourtJudgements.ott"
             state="1"
             root="FamilyCourtJudgements"
             default-part="main">
        <title xml:lang="eng">Family Court Judgements</title>
        <title xml:lang="spa">dictamen</title>
        <title xml:lang="ara">حكم شرعي </title>
        <uri type="work">~CountryCode~DocumentType~Year-Month-Day</uri>
        <uri type="expression">~CountryCode~DocumentType~Year-Month-Day~LanguageCode@</uri>
        <file-name-scheme>CountryCode~DocumentType~family~JCaseType~JCity~JIssuedOn~JCaseNo</file-name-scheme>
        <metadata-editors>
          
            <title xml:lang="eng">Judgement Metadata</title>
            <title xml:lang="ara">المعلومات الواصفة للحكم</title>

            <metadata-editor class="org.bungeni.editor.metadata.editors.JudgemenMetadataExtra">
                <title xml:lang="eng">Family Court Judgement</title>
                <title xml:lang="ara">الحكم الشرعي</title>
            </metadata-editor>
          
        </metadata-editors>
        <parts>
            <part name="main">
                <title xml:lang="eng">Main</title>
                <title xml:lang="spa">principal</title>
            </part>
            <part name="annex">
                <title xml:lang="eng">Annex</title>
                <title xml:lang="spa">adjuntar</title>
            </part>
        </parts>
    </doctype>


Is there any thing missing ? It is still not working !!

Ashok Hariharan

unread,
Jan 17, 2013, 6:01:30 AM1/17/13
to bungeni...@googlegroups.com, say...@birzeit.edu
You have to markup  a new document created out of this template -- your existing FamilyCourtJudgement type documents will not work since they dont have the root section properties set correctly ...

Ashok

To view this discussion on the web visit https://groups.google.com/d/msg/bungeni-editor/-/V0-qE0zBu_YJ.

Samar Ayesh

unread,
Jan 17, 2013, 6:14:14 AM1/17/13
to bungeni...@googlegroups.com, say...@birzeit.edu, Ashok Hariharan, Ahmad Hajissa Hamo
the section property for FamilyCourtJudgements template is FamilyCourtJudgements !
I attached the template here ..
Is there any thing wrong with it?
FamilyCourtJudgements.ott

Ashok Hariharan

unread,
Jan 17, 2013, 6:30:21 AM1/17/13
to Samar Ayesh, bungeni...@googlegroups.com, say...@birzeit.edu, Ahmad Hajissa Hamo
I think you deleted the existing root section and added a new one - so you have the root section with the right name, but with the SectionProperty not set.

See the attached one, I just renamed "act" to "FamilyCourtJudgements", and its the correct working template

The easiest way to undestand this is to look at XML in the odt, rename it to a zip file and extract it to a folder , this is content.xml in the correct FamilyCourtJudgements.ott (attached) :

            <text:section text:style-name="Sect1" xml:id="id2144137153"
                text:name="FamilyCourtJudgements">
                <text:p text:style-name="heading_5f_subsection"/>
                <text:p text:style-name="Standard"/>
                <text:p text:style-name="Standard"/>
                <text:p text:style-name="Standard"/>
                <text:p text:style-name="Standard"/>
            </text:section>

In yours it was like this : (no xml:id property on the root section)

            <text:section text:style-name="Sect1"
                text:name="FamilyCourtJudgements">
                <text:p text:style-name="heading_5f_subsection"/>
                <text:p text:style-name="Standard"/>
            </text:section>

The xml:id attribute on the section connects it to the rdf metadata, which contains the sectionType mapping :

  <rdf:Description rdf:about="../content.xml#id2144137153">
    <ns1:BungeniSectionID xmlns:ns1="http://editor.bungeni.org/1.0/anx/">fbPPzJQSSl3XsbrhTSyHsh</ns1:BungeniSectionID>
    <ns2:BungeniSectionType xmlns:ns2="http://editor.bungeni.org/1.0/anx/">body</ns2:BungeniSectionType>
  </rdf:Description>


Of course you don't have to know all this -- this is an internal implementation detail,  just so you can understand why your template is broken ...

Ashok
FamilyCourtJudgements.ott

Samar Ayesh

unread,
Jan 17, 2013, 6:46:25 AM1/17/13
to bungeni...@googlegroups.com, say...@birzeit.edu, Ashok Hariharan, Ahmad Hajissa Hamo
aha, I got it !
I was removing the existing section and inserting another one called FamilyCourtJudgements ...

Thanks Ashok
Reply all
Reply to author
Forward
0 new messages