RE: [xacml-dev] are < and > forbidden characters in string attributes??

From
"Eaniel Fngovatov"
Date
2004-11-17T18:41:49+00:00
ID
Thread
RE: [xacml-dev] are < and > forbidden characters in string attributes??
"Convenient way" and "XML" in the same sentence? :-)

Unfortunately you seem to be out of luck. That is how XML must encode string values.  

Daniel;

-----Original Message-----
From: Jan bei GMX [mailto:] 
Sent: Wednesday, November 17, 2004 10:37 AM
To: Daniel Engovatov; 
Subject: Re: [xacml-dev] are < and > forbidden characters in string attributes?? 

thats what I did, but it's not a very convienient way. first things become
very unreadable and second I have to transform all my xml docs which I want
to protect into this syntax. Do  you have any idea where the error message
comes from. Is there no way to avoid this work around.

greets
Jan

----- Original Message -----
From: "Daniel Engovatov" <>
To: "Jan Herrmann" <>; <>
Sent: Wednesday, November 17, 2004 7:32 PM
Subject: RE: [xacml-dev] are < and > forbidden characters in string
attributes??

In string values you are supposed to escape the "<" and ">" characters.  You
declared it a string, but gave some XML fragment value.

Use &lt and &gt.  Basic XML.

Daniel;

-----Original Message-----
From: Jan Herrmann [mailto:]
Sent: Wednesday, November 17, 2004 10:28 AM
To: 
Subject: [xacml-dev] are < and > forbidden characters in string attributes??

Hi everybody,

Just a little question:

I'm trying to put the following text in the <AttributeValue> Element.

What I'd like to do is:

<AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">
<gml:Point srsName="http://www.opengis.net/gml/srs/epsg.xml#4326">
  <gml:coordinates decimal="." cs="," ts=" ">-59.478340,-52.226578
</gml:coordinates>
</gml:Point>
</AttributeValue>

Unfortunately I always get an error message when executing the PDP.

Nov 17, 2004 7:10:45 PM com.sun.xacml.finder.impl.FilePolicyModule
loadPolicy
WARNING: Error reading policy from file ../policy/policy_22_9.xml
java.lang.NullPointerException
        at com.sun.xacml.cond.FunctionBase.checkInputs(Unknown Source)
        at com.sun.xacml.cond.Apply.<init>(Unknown Source)
        at com.sun.xacml.cond.Apply.getInstance(Unknown Source)
        at com.sun.xacml.cond.Apply.getInstance(Unknown Source)
        at com.sun.xacml.cond.Apply.getInstance(Unknown Source)
        at com.sun.xacml.cond.Apply.getConditionInstance(Unknown Source)
        at com.sun.xacml.Rule.getInstance(Unknown Source)
        at com.sun.xacml.Policy.<init>(Unknown Source)
        at com.sun.xacml.Policy.getInstance(Unknown Source)
        at com.sun.xacml.finder.impl.FilePolicyModule.loadPolicy(Unknown
Source)
        at com.sun.xacml.finder.impl.FilePolicyModule.init(Unknown Source)
        at com.sun.xacml.finder.PolicyFinder.init(Unknown Source)
        at com.sun.xacml.PDP.<init>(Unknown Source)
        at SimplePDP.<init>(SimplePDP.java:298)
        at SimplePDP.main(SimplePDP.java:358)

When I'm changing the string into the following one than everything works
fine.

<AttributeValue DataType="http://www.w3.org/2001/XMLSchema#string">
&lt;gml:Point srsName="http://www.opengis.net/gml/srs/epsg.xml#4326"&gt;
&lt;gml:coordinates decimal="." cs="," ts=" "&gt;-59.478340,-52.226578
&lt;/gml:coordinates&gt;
&lt;/gml:Point&gt;
</AttributeValue>

What am I doing wrong? I looked through the checkInputs function but I
couldn't find where this error comes from?

Thanks
Jan

--
NEU +++ DSL Komplett von GMX +++ http://www.gmx.net/de/go/dsl
GMX DSL-Netzanschluss + Tarif zum supergünstigen Komplett-Preis!