OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] Something like an attribute-set, but different


Well, I'm not sure what's different today, but everything works fine  
when I do this:

<xsl:param name="transitive.colours.document">
   <xsl:choose>

     <xsl:when test="/db:book/db:info/db:xdocconfidentiality/ 
@level='Secret'">
       <xsl:value-of select="$transitive.colours.secret"/>
     </xsl:when>

      <xsl:when test="/db:book/db:info/db:xdocconfidentiality/ 
@level='Confidential'">
        <xsl:value-of select="$transitive.colours.confidential"/>
      </xsl:when>

      <xsl:otherwise>
        <xsl:value-of select="$transitive.colours.unclassified"/>
      </xsl:otherwise>

    </xsl:choose>
</xsl:param>

Could have sworn that's exactly what I'd tried on Friday, but never  
mind, all is well now.  Bob, Dave, Thomas - thanks very much for all  
your help.

Cheers,

Geraint North
Principal Engineer
Transitive
* The leader in cross-platform virtualization

On 15 Dec 2007, at 7:14, Bob Stayton wrote:

> Indeed, "/book" should not match if your document is in the DocBook  
> 5 namespace.  Perhaps a short sample document and short  
> customization layer would provide us with more information to sort  
> this out.
>
> Bob Stayton
> Sagehill Enterprises
> bobs@sagehill.net
>
>
> ----- Original Message ----- From: "Geraint North" <geraint@transitive.com 
> >
> To: "Thomas Schraitle" <tom_schr@web.de>
> Cc: "Bob Stayton" <bobs@sagehill.net>; <docbook-apps@lists.oasis-open.org 
> >
> Sent: Friday, December 14, 2007 6:54 AM
> Subject: Re: [docbook-apps] Something like an attribute-set, but  
> different
>
>
>> Hi Tom,
>>
>> On 14 Dec 2007, at 12:56, Thomas Schraitle wrote:
>>> Hi,
>>>
>>>> I'm having difficulty getting the desired effect, though (either  
>>>> with
>>>> params or attribute sets), which I think is due to my
>>>> misunderstanding of Xpath query syntax.  I've constructed a very
>>>> small case that illustrates my misunderstanding.
>>>>
>>>> Within an attribute-set, the following evaluates as true
>>>>
>>>>   <xsl:when test="/book">
>>>>
>>>> But the following does not:
>>>>
>>>>   <xsl:when test="/book/info[1]">
>>>> nor does
>>>>   <xsl:when test="/book/info">
>>>
>>> The info element looks like you are using DocBook 5, right?
>>> In this case the above test is expected to fail, because the
>>> element belongs to no namespace. You need the DocBook5 namespace
>>> for each element. Insert the following line in <xsl:stylesheet>:
>>>
>>>  xmlns:d="http://docbook.org/ns/docbook";
>>>
>>> You have to change the XPath expression a bit to take care of the
>>> DocBook5 namespace:
>>>
>>>  <xsl:when test="/d:book/d:info[1]">
>>
>>
>> Thanks for taking the time to answer, but I'm afraid that I'd tried  
>> adding namespaces and that didn't work.  Once I've added the  
>> correct namespace declaration, the following test won't match:
>>
>> <xsl:when test="/d:book">
>>
>> Let alone anything more complicated.  Making the docbook namespace   
>> the default namespace doesn't help either.
>>
>> I'm a bit confused that "/book" _does_ match - if it were a  
>> namespace issue, then I wouldn't expect that to be matching either?
>>
>> Thanks,
>>
>> Geraint North
>> Principal Engineer
>> Transitive
>> * The leader in cross-platform virtualization
>>
>> This E-mail and any attachments hereto are strictly confidential  
>> and intended solely for the addressee. If you are not the intended   
>> addressee please notify the sender by return and delete the  
>> message.  You must not disclose, forward or copy this E-mail or  
>> attachments to  any third party without the prior consent of the  
>> sender.
>>
>>
>>
>>
>



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]