Outputting globally set metadatA (was Re: proprietary metadata configuration)

7 views
Skip to first unread message

Ashok Hariharan

unread,
Jan 28, 2013, 8:21:02 AM1/28/13
to bungeni...@googlegroups.com, Samar Ayesh
Hi Samar -- 

This is now supported -- 

If you want to see how I fixed the issue, these are all the changes (all of the changes were to the XSLT middleware )  :


You use it by declaring your metadata as usual in the <meta> block ...except you have to declare the global metadata in a particular place the sectionType called "meta" --

it used to have just : 


<sectionType name="meta" prefix="meta" numstyle="single"> <output>
<content>
<an:meta />
</content>
</output>
</sectionType>
 
Now it supports this : 

   <sectionType name="meta"
        prefix="meta"
        numstyle="single">
        <output>
           <metadatas>
              <metadata name="BungeniExpAuthor" />
              <metadata name="BungeniExpAuthorURI" />
           </metadatas>
           <meta>
            <references>
                <an:TLCPerson name="$BungeniExpAuthor"  href="$BungeniExpAuthorURI" />
            </references>
            </meta>
            <content>
                <an:meta />
            </content>
        </output>
    </sectionType>

In the example above BungeniExpAuthor and BungeniExpAuthorURI are metadata properties set on the document (not on a section ) . So any custom property visible via File -> Properties in openoffice on a document can be set globally in this way . 

Remember that "meta" is not a real sectionType .. i.e. there is no document section on the document which has this type ... its just a pure configuration artifact. 

You will have to do svn up in the <your config>\system\generators folder to get these changes.

Ashok


On 28 January 2013 10:48, Samar Ayesh <smr....@gmail.com> wrote:
yes I mean the fields in metadata-panels to be reflected into global metadata section in xml 


Samar Ayesh

unread,
Jan 29, 2013, 4:04:47 AM1/29/13
to bungeni...@googlegroups.com, Samar Ayesh, Ashok Hariharan, Ahmad Hajissa Hamo
Thank you Ashok,
I tried exactly those lines and they worked perfect and I changed metadata variables and every thing is Ok..
but when I replaced the lines above with those>>


 <sectionType name="meta"
                 prefix="meta"
                 numstyle="single">
        <output>
            <metadatas>
                <metadata name="BungeniSourceNo" />
            </metadatas>
            <meta>
                <proprietary source="#muq"  xmlns:muqid="http://muqtafi.birzeit.edu/proprietary">
                    <muqid:AdditionalInfo>
                        <muqid:BungeniSourceNo value="$BungeniSourceNo"></muqid:BungeniSourceNo>
                    </muqid:AdditionalInfo>
                </proprietary>
            </meta>
            <content>
                <an:meta />
            </content>
        </output>
    </sectionType>

it didn't work !!
what I want is those lines in addition to the other fields filled in metadata panels..
what other requirements I should have to get it to work?

Ashok Hariharan

unread,
Jan 29, 2013, 5:19:37 AM1/29/13
to Samar Ayesh, bungeni...@googlegroups.com, Ahmad Hajissa Hamo
Aha .. I didnt enable proprietary metadata on the meta type . Let me do it .

Ashok

Samar Ayesh

unread,
Feb 2, 2013, 6:29:33 AM2/2/13
to bungeni...@googlegroups.com, Samar Ayesh, Ahmad Hajissa Hamo
What about proprietary metadata, Is it enabled??

Ashok Hariharan

unread,
Feb 4, 2013, 4:00:35 AM2/4/13
to bungeni...@googlegroups.com, Samar Ayesh, Ahmad Hajissa Hamo
This is supported now ...

See http://code.google.com/p/bungeni-editor/source/detail?r=2900 for changes only to the middleware
See http://code.google.com/p/bungeni-editor/source/detail?r=2901 for an example, the way you declare is identical to how you do it on a regular section , just here you declare it on the sectionType = meta ...

Ashok

--
You received this message because you are subscribed to the Google Groups "bungeni-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bungeni-edito...@googlegroups.com.
To post to this group, send email to bungeni...@googlegroups.com.
Visit this group at http://groups.google.com/group/bungeni-editor?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Samar Ayesh

unread,
Feb 4, 2013, 6:38:24 AM2/4/13
to bungeni...@googlegroups.com, Samar Ayesh, Ahmad Hajissa Hamo
Thanks Ashok,

But my output is like this :

<?xml version="1.0" encoding="UTF-8"?><akomaNtoso><act><meta>
         <identification xmlns:bodf="http://editor.bungeni.org/1.0/odf/" xmlns:bungeni="http://editor.bungeni.org/1.0/anx/">
            
            <FRBRWork><FRBRthis value="PS/cnst/2013-02-19/main"/><FRBRuri value="PS/cnst/2013-02-19"/><FRBRauthor href="#pna" as="#"/><FRBRdate date="2013-02-19" name="Issuing"/></FRBRWork>
            <FRBRExpression><FRBRthis value="PS/cnst/2013-02-19/ar@/main"/><FRBRuri value="PS/cnst/2013-02-19/ar@"/><FRBRauthor href="#pna" as="#"/><FRBRdate date="2013-02-19" name="Issuing"/></FRBRExpression>
            <FRBRManifestation><FRBRthis value="PS/cnst/2013-02-19/ar@.akn/main"/><FRBRuri value="PS/cnst/2013-02-19/ar@.akn"/><FRBRauthor href="#IoL" as="#"/><FRBRdate date="2013-02-19" name="Generation"/></FRBRManifestation>
         </identification>
         
            
            
            
         
         <references xmlns:bodf="http://editor.bungeni.org/1.0/odf/" xmlns:bungeni="http://editor.bungeni.org/1.0/anx/"><TLCPerson xmlns:office="http://www.metalex.org/1.0" xmlns="http://www.metalex.org/1.0" href="user.Samar" name="pna"/></references>
         <proprietary xmlns:office="http://www.metalex.org/1.0" xmlns="http://www.metalex.org/1.0">
               <muqid:AdditionalInfo xmlns:muqid="http://www.proprietary.org" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:anx="http://anx.akomantoso.org/1.0" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:ooo="http://openoffice.org/2004/office" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bodf="http://editor.bungeni.org/1.0/odf/" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:rpt="http://openoffice.org/2005/report" xmlns:bungeni="http://editor.bungeni.org/1.0/anx/">
                  <muqid:BungeniSourceNo>pna23</muqid:BungeniSourceNo>
               </muqid:AdditionalInfo>
            </proprietary>
      </meta></act></akomaNtoso>

how could I be sure that I'm getting the last updates ..
there's extra data appearing as muqid:AdditionalInfo parameters!!
where's the content section? 

Ashok Hariharan

unread,
Feb 4, 2013, 8:30:21 AM2/4/13
to bungeni...@googlegroups.com, Samar Ayesh, Ahmad Hajissa Hamo
Your birzeit_configs/system/templates folder is out of date .. I noticed you have locally checked in files there - these are pure system imports, you should always import the files from externals, like its done in my example configuration here :

http://bungeni-editor.googlecode.com/svn/BungeniEditor_configs/development_configs/system/templates/externals.txt

Also I noticed you have checked in your trans_cache and gen_cache folders ... its of no use checking these in as the contents are overwritten during startup ...

Ashok

Ashok Hariharan

unread,
Feb 4, 2013, 9:12:46 AM2/4/13
to bungeni...@googlegroups.com, Samar Ayesh, Ahmad Hajissa Hamo
the three folders under config_folder/system :

generator
templates
transformer

these three folders should have only external imports via svn , and not have any of your modifications..

This way you will have upto date stuff ..

Ashok

Samar Ayesh

unread,
Feb 5, 2013, 3:16:00 AM2/5/13
to bungeni...@googlegroups.com, Samar Ayesh, Ahmad Hajissa Hamo
Yes I did update for system folder.. it's working fine now ..
Reply all
Reply to author
Forward
0 new messages