Getting generated XML file valid to AkomaNtoso

14 views
Skip to first unread message

Samar Ayesh

unread,
May 9, 2013, 7:01:44 AM5/9/13
to bungeni...@googlegroups.com, Ashok Hariharan
Hello Ashok,

I'm in the last phase of getting the outputted xml file valid to AkomaNtoso2.0

There are some modifications that I need to apply but I can't find how or from where?

first one is "proprietary" must have the attribute source=""
 <proprietary source="">


another one is for the generated "Preface" sectionType look like this>>
 <preface id="preface">**********</preface>

but this isn't valid to AN .. It must be
        <preface>
            <longTitle>
                <block name="longTitle">*****</block>
            </longTitle>
        </preface>

so how could I append longTitle and block to preface ..

I know that I can add them via adding more sectionTypes the same way as preface sectionType was implemented
 but I want all three tags : preface, longTitle, block be added on a single user click on a toolbar ..

Also block tag must be available inside sectionTypes: preamble, content .. to have valid AN

Ashok Hariharan

unread,
May 10, 2013, 3:58:04 AM5/10/13
to Samar Ayesh, bungeni...@googlegroups.com
On 9 May 2013 14:01, Samar Ayesh <smr....@gmail.com> wrote:
Hello Ashok,

I'm in the last phase of getting the outputted xml file valid to AkomaNtoso2.0

There are some modifications that I need to apply but I can't find how or from where?

first one is "proprietary" must have the attribute source=""
 <proprietary source="">

You can just add this in your sectionType configuration to the <proprietary> output ... 

 



another one is for the generated "Preface" sectionType look like this>>
 <preface id="preface">**********</preface>

but this isn't valid to AN .. It must be
        <preface>
            <longTitle>
                <block name="longTitle">*****</block>
            </longTitle>
        </preface>

so how could I append longTitle and block to preface ..


This is quite easy too ... 

add a sectionType for longTitle .. set the output to :

<longTitle>
    <block name="longTitle" />
</longTitle>

. Then Add the markup toolbar actions to enable marking up long title within the preface.

Alternatively you could also have a sectionType defined for the block and you markup the block within the longTitle. 

 
I know that I can add them via adding more sectionTypes the same way as preface sectionType was implemented
 but I want all three tags : preface, longTitle, block be added on a single user click on a toolbar ..


Have you tried setting this as the output for the preface ? : 

        <preface>
            <longTitle>
                <block name="longTitle" />
            </longTitle>
        </preface>

 
that should markup all three in one click ... 


Also block tag must be available inside sectionTypes: preamble, content .. to have valid AN


I would suggest the sectionType route for adding blocks within those types ... 

Ashok

Samar Ayesh

unread,
May 11, 2013, 2:49:49 AM5/11/13
to bungeni...@googlegroups.com, Ashok Hariharan
Yes I tried this
<preface>
            <longTitle>
                <block name="longTitle" />
            </longTitle>
        </preface>


but preface section didn't appear at all into xml file !!

Samar Ayesh

unread,
May 11, 2013, 3:12:10 AM5/11/13
to bungeni...@googlegroups.com, Ashok Hariharan
attached a screen shot for the xml file error when adding source attribute to proprietary tag ..
Untitled.jpg

Ashok Hariharan

unread,
May 13, 2013, 4:34:32 AM5/13/13
to Samar Ayesh, bungeni...@googlegroups.com
Samar --
The above 2 revisions should address both your issues.

One thing to note , remember all output elements should be prefixed with the namesapce :

<an:preface>
            <an:longTitle>
                <an:block name="longTitle" />
            </an:longTitle>
        </an:preface>




Samar Ayesh

unread,
May 14, 2013, 3:36:17 AM5/14/13
to bungeni...@googlegroups.com, Samar Ayesh
I updated runtime_required then clean & build but source attribute not shown in proprietary metadata ..

<an:preface>
       <an:longTitle>
           <an:block name="longTitle" />
       </an:longTitle>
</an:preface>

worked fine but I committed some lines here (type_generator.xsl) >>
   <xsl:variable name="elemname"  select="local-name()"/>
        <xmeta:element name="{$elemname}">
<!--            <xmeta:if test="@id">
                <xmeta:attribute name="bodf:sourceId" select="concat('{lower-case($elemname)}', '-', @id)"/>
            </xmeta:if>-->

           
            <xsl:for-each select="@*">


because I don't want
bodf:sourceId attribute to be displayed in each section Type.


another thing left is to ave block tag inside preamble and content tags ..


Ashok Hariharan

unread,
May 14, 2013, 3:42:39 AM5/14/13
to bungeni...@googlegroups.com
On 14 May 2013 10:36, Samar Ayesh <smr....@gmail.com> wrote:
I updated runtime_required then clean & build but source attribute not shown in proprietary metadata ..


Let me check that .. I actually didnt test the proprietary fix when i committed it .. 

 

Samar Ayesh

unread,
May 14, 2013, 4:48:13 AM5/14/13
to bungeni...@googlegroups.com
<xsl:template match="bodf:sourceId" />  in cleanup.xsl didn't work!!

Ashok Hariharan

unread,
May 14, 2013, 4:58:50 AM5/14/13
to bungeni...@googlegroups.com
That should be : 

<xsl:template match="@bodf:sourceId" />

since you want to match the attribute ... 

--
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,
May 14, 2013, 6:27:17 AM5/14/13
to bungeni...@googlegroups.com
aha, thnx alot :)

Samar Ayesh

unread,
May 16, 2013, 7:44:46 AM5/16/13
to bungeni...@googlegroups.com
Does this line :

<xsl:template match="@bodf:sourceId" />

caused "id" attribute not to appear for Article, section, part, hcontainer tags ??

Ashok Hariharan

unread,
May 16, 2013, 7:57:43 AM5/16/13
to bungeni...@googlegroups.com
On 16 May 2013 14:44, Samar Ayesh <smr....@gmail.com> wrote:
Does this line :

<xsl:template match="@bodf:sourceId" />

caused "id" attribute not to appear for Article, section, part, hcontainer tags ??



No shouldnt impact that   ...

Ashok

Samar Ayesh

unread,
May 18, 2013, 3:09:53 AM5/18/13
to bungeni...@googlegroups.com
Then where it should be determined?

Article section type is like this .. numstyle is serial and prefix is A .. by default I was getting <article id="A1">
but now there's no id attribute !!

<sectionType name="Article" prefix="A" numstyle="serial" background="0xf0f0f0"
                 indent-left=".3" indent-right="0" visibility="user">
        <numbering scheme="NUMERIC" decorator="flowerBracket"/>
        <output>
            <content>
                <an:article />
            </content>
        </output>
    </sectionType>

Ashok Hariharan

unread,
May 20, 2013, 7:30:19 AM5/20/13
to bungeni...@googlegroups.com
Svn up in config_folder/generators

though I think the id generation can be further improved ...

ashok

Samar Ayesh

unread,
May 21, 2013, 3:19:46 AM5/21/13
to bungeni...@googlegroups.com
Thank you Ashok ...

but still source attribute for proprietary tag not existing

Ashok Hariharan

unread,
May 21, 2013, 3:24:27 AM5/21/13
to bungeni...@googlegroups.com
Ah yes ... let me fix that too
Reply all
Reply to author
Forward
0 new messages