On Tuesday 27 November 2001 09:49, Lionel Mayaud wrote:
> I am also using only Batik's CSS capabilities to parse CSS file and
> generate an XML File.
> But I have another problem.
> Batik seems to refuse parsing CSS values which contains spaces like:
>       background-position: center left;
> which is a valid CSS identifier.
> Its stops parsing after the <space> caracter between center and left and
> throws a "invalid.identifier" exception while trying to parse "center"
> Every thing else works perfectly.
> Is it a normal behaviour ? Did I mistake something ?

You must register a factory which handles a list of identifiers: an 
IdentifierFactory requires a single identifier. You should have a look at 
org/apache/batik/css/value/TextDecorationFactory.java to see how to handle 
lists.

> Thank you for your help. I am new to Batik and have been using it for
> only two days.
> this is where the exception is thrown:
>
> in the AbstractIdentifierFactory class: The value of the String s is
> "center", which is not contained by the Property Map returned by the
> getIdentifiers() method, but it contains "center left"...
>
> public ImmutableValue createValue(LexicalUnit lu) throws DOMException {
>       switch (lu.getLexicalUnitType()) {
>       case LexicalUnit.SAC_INHERIT:
>           return INHERIT;
>       case LexicalUnit.SAC_IDENT:
>             String s = lu.getStringValue().toLowerCase().intern();
>           Object v = getIdentifiers().get(s);
>           if (v == null) {
>               throw CSSDOMExceptionFactory.createDOMException
>                   (DOMException.INVALID_ACCESS_ERR,
>                    "invalid.identifier",
>                    new Object[] { lu.getStringValue(),
>                                     getPropertyName() });
>           }
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to