[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: resourcecontent, XPath & namespaces
Hello everybody. I'm using the SunXACML 1.2. I want to extract elements from the resourcecontent using the selector you implemented. The resource content I build is just a list of elements, like the following: <ResourceContent> <Title>myBook</Title> <Genre>Novel</Genre> ... other elements </ResourceContent> I want to extract the value of a element using an XPath function like the following: "//ResourceContent/Genre/text()" but I get error in resolving the element. I saw the sample you put in the sunxacml1.2.zip You make use of namespaces both in the policy (selector.xml) and in the request (resource-content.xml). Do I have use always the "context" namespace in request and and policy to make the selector work? I tried to remove the "documents" "and memos" from tags and function in the next way <ResourceContent> <Memo> <Audience>developers</Audience> <Name>Compute Cycles</Name> <Body> There are now plenty of cycles available on server.example.com. Feel free to use them as needed. </Body> </Memo> </ResourceContent> "//context:ResourceContent/Memo/Audience/text()" But it does not work. Why? Now I build my request using the RequestCtx contructor RequestCtx(Set subjects, Set resource, Set action, Set environment, String resourceContent) With it I can't include namespace declaration in the request. There is any way to do it? Could you suggest me any other idea to access to my data using the selector? Thanks Antonio __________________________________________________________________ Tiscali Adsl 2 Mega Free: l'adsl piu' veloce e' gratis! Naviga libero dai costi fissi con Tiscali Adsl 2 Mega Free, l'adsl Free piu' veloce in Italia. In piu', se ti abboni entro il 7 gennaio 2005, navighi gratis fino al 31 marzo. E il costo di adesione e' GRATIS. http://abbonati.tiscali.it/adsl/
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]