Change 'id' parameter value at ref tag

11 views
Skip to first unread message

Samar Ayesh

unread,
Apr 11, 2013, 8:23:23 AM4/11/13
to bungeni...@googlegroups.com, Ashok Hariharan
Hello Ashok ..

I have this inline section "ref"

 <inlineType name="ref">
        <metadatas>
            <metadata name="BungeniMainDocID" />
        </metadatas>
       <output>  
          <content>
            <an:ref id="$BungeniMainDocID" />
          </content>
       </output>
    </inlineType>

this value BungeniMainDocID is a metedata value that I give to the document after saving it ...
I want to get it here in the id parameter for ref

<ref id="PBungeniMainDocID_autogeneratedId " > SOME TEXT </ref>

such that my doc Id =>   BungeniMainDocID = 14182 then the first ref in the document represents like this .... 

<ref id="P14182_1"> SOME TEXT</ref>


how could I get that ??

Ashok Hariharan

unread,
Apr 12, 2013, 2:40:24 AM4/12/13
to Samar Ayesh, bungeni...@googlegroups.com
Isnt the id currently auto-generated ? So if i understand your need , you want to set it to a specific value ?

Samar Ayesh

unread,
Apr 13, 2013, 1:44:18 AM4/13/13
to bungeni...@googlegroups.com, Samar Ayesh
Yes it is autogenerated .. and what I want is a prefix before this auto generation like this "PBungeniMainDocID_autogeneratedId"
P is constant
BungeniMainDocID is a value that I obtain after saving metadata to database ..
autogeneratedId incrementaly generated Id for ref tags ..

could I obtain this?

Ashok Hariharan

unread,
Apr 15, 2013, 1:57:50 AM4/15/13
to bungeni...@googlegroups.com, Samar Ayesh
Let me add support for this ... the currently functionality assumes auto-generation and doesnt provide any user control ...

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,
Apr 15, 2013, 2:03:17 AM4/15/13
to bungeni...@googlegroups.com, Samar Ayesh
that's right .. Is it possible for me to do it? or it's inner configurations that only you can do?
then the support will allow me to get ref id as "P18276_1" as an example?

Ashok Hariharan

unread,
Apr 15, 2013, 7:16:19 AM4/15/13
to bungeni...@googlegroups.com, Samar Ayesh
On 15 April 2013 09:03, Samar Ayesh <smr....@gmail.com> wrote:
that's right .. Is it possible for me to do it? or it's inner configurations that only you can do?
then the support will allow me to get ref id as "P18276_1" as an example?


There is some inner implementation detail to deal with ... but if you don't mind, I think its good if you implement it, since that way you will have a better understanding of how things work ... 

Let me see how to implement it ... and then i send you a step-by-step list of tasks of how you can do it ... 

Ashok 

Samar Ayesh

unread,
Apr 15, 2013, 7:35:52 AM4/15/13
to bungeni...@googlegroups.com, Samar Ayesh
Ok Ashok .. that's fine .. waiting you

Samar Ayesh

unread,
Apr 17, 2013, 4:07:03 AM4/17/13
to bungeni...@googlegroups.com, Samar Ayesh, Ashok Hariharan
Hello Ashok ...

Is there any file that I can start editing on?

Ashok Hariharan

unread,
Apr 17, 2013, 4:09:49 AM4/17/13
to Samar Ayesh, bungeni...@googlegroups.com
I am looking at this right now ... I will send you the info shortly ...

Ashok

Samar Ayesh

unread,
Apr 22, 2013, 5:08:50 AM4/22/13
to bungeni...@googlegroups.com, Samar Ayesh, Ashok Hariharan
Hello Ashok ..

I'm trying to change naming convention for inlineType ref ..
but it's not changing from id="id********"
 where ******** is a random number ...

how could I change id ?
I want it to be P****_* where **** id BungeniMainDocID that I set in metadata
and * is an auto-generated id for ref occurrence in the document ...

Ashok Hariharan

unread,
Apr 22, 2013, 5:17:58 AM4/22/13
to Samar Ayesh, bungeni...@googlegroups.com
Hang on ... just looking at this now ... 

Ashok

Ashok Hariharan

unread,
Apr 22, 2013, 9:43:55 AM4/22/13
to Samar Ayesh, bungeni...@googlegroups.com

Samar Ayesh

unread,
Apr 23, 2013, 3:04:15 AM4/23/13
to bungeni...@googlegroups.com, Samar Ayesh, Ashok Hariharan
Thanks Ashok .. I just get it and updated RefURI to have mainDocId in id attribute

http://code.google.com/p/bungeni-editor/source/detail?r=3016

Ashok Hariharan

unread,
Apr 24, 2013, 7:30:00 AM4/24/13
to Samar Ayesh, bungeni...@googlegroups.com
Your changes are OK for now ... but if you notice that the RefURI implementation is also used by other doc types ... so you should really segment this per -doctype (or better per implementation within your namespaced package ) and refer to your specific implementation via the configuration. 

Ashok
Reply all
Reply to author
Forward
0 new messages