odd customization not working?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

odd customization not working?

Eduard Drenth
Dear all,

When I customize my odd like this in a teipublisher generated app:

                <elementSpec ident="body" mode="change">
                    <model behaviour="omit" predicate="/TEI/teiHeader/fileDesc/publicationStmt/availability[@status='restricted']" >
                        <desc>don't show restricted material.</desc>
                    </model>
                </elementSpec>

and compile the odd I still see the content of a restricted document.

Also other odd customizations do not seem to have any effect. What can be the problem?

Eduard Drenth, Software Architekt

[hidden email]

Doelestrjitte 8
8911 DX  Ljouwert
+31 58 234 30 47

gpg: https://sks-keyservers.net/pks/lookup?op=get&search=0x065EF82A1E02CC43

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: odd customization not working?

Wolfgang Meier-2
> When I customize my odd like this in a teipublisher generated app:
>
>                <elementSpec ident="body" mode="change">
>                    <model behaviour="omit" predicate="/TEI/teiHeader/fileDesc/publicationStmt/availability[@status='restricted']" >
>                        <desc>don't show restricted material.</desc>
>                    </model>
>                </elementSpec>
>
> and compile the odd I still see the content of a restricted document.

I would avoid using an absolute path in the predicate. Always use a path relative to the context node instead. Try predicate="ancestor::TEI/teiHeader/…“ or predicate="root(.)/TEI/teiHeader…“.

Wolfgang
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: odd customization not working?

Eduard Drenth
Thanks for the tip, but no it doesn't work.

Also changing the behaviour from metadata to block in the elementSpec for teiHeader seems to have no effect.

Maybe I am facing the same issue as this one: http://gitlab.exist-db.org/tei-publisher/tei-publisher-app/issues/77?

Eduard Drenth, Software Architekt

[hidden email]

Doelestrjitte 8
8911 DX  Ljouwert
+31 58 234 30 47

gpg: https://sks-keyservers.net/pks/lookup?op=get&search=0x065EF82A1E02CC43

________________________________________
From: Wolfgang Meier <[hidden email]>
Sent: Sunday, April 9, 2017 10:13 AM
To: Eduard Drenth
Cc: [hidden email]
Subject: Re: [Exist-open] odd customization not working?

> When I customize my odd like this in a teipublisher generated app:
>
>                <elementSpec ident="body" mode="change">
>                    <model behaviour="omit" predicate="/TEI/teiHeader/fileDesc/publicationStmt/availability[@status='restricted']" >
>                        <desc>don't show restricted material.</desc>
>                    </model>
>                </elementSpec>
>
> and compile the odd I still see the content of a restricted document.

I would avoid using an absolute path in the predicate. Always use a path relative to the context node instead. Try predicate="ancestor::TEI/teiHeader/…“ or predicate="root(.)/TEI/teiHeader…“.

Wolfgang

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Loading...