You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "Brian Minchau (JIRA)" <xa...@xml.apache.org> on 2005/05/31 05:26:55 UTC

[jira] Created: (XALANJ-2130) cdata-section-elements are not properly set via JAXP

cdata-section-elements are not properly set via JAXP
----------------------------------------------------

         Key: XALANJ-2130
         URL: http://issues.apache.org/jira/browse/XALANJ-2130
     Project: XalanJ2
        Type: Bug
    Reporter: Brian Minchau




Section 16. of the XSLT 1.0 recommendation ( see http://www.w3.org/TR/xslt )
says this:
<<
A stylesheet may contain multiple xsl:output elements and may include or import stylesheets that also contain xsl:output elements. All the xsl:output elements occurring in a stylesheet are merged into a single effective xsl:output element. For the cdata-section-elements attribute, the effective value is the union of the specified values. For other attributes, the effective value is the specified value with the highest import precedence. It is an error if there is more than one such value for an attribute. An XSLT processor may signal the error; if it does not signal the error, if should recover by using the value that occurs last in the stylesheet. 
>>

Even after this is done one can use the JAXP API Transformer.setOutputProperty(name,value) or Transformer.setOutputProperty(java.util.Properties) to override values in the stylesheet, that would be in its "single effective merged xsl:output element".

In the spirit of what the stylesheet does, it would seem that if a cdata-section-elements property is set, it should not override the stylesheets set of sections, but be a union with it, just as the xsl:output cdata-sections-elements form an effective union. This is unlike other xsl:output attributes.

The effective xsl:output attributes can be modified with mulitple calls to 
Transformer.setOuputProperty(String name, String value) and/or 
Transformer.setOutputProperty(java.util.Properties)

However the serializer is brittle with respect to multiple such calls namely:
- cdata-section-elements from JAXP do merge with the stylesheets values, they
replace the stylesheets values
- Writers can be lost
- properties with namespaces, where the name part of the property is of the form 
"{uri}localname"  are not properly handled, (i.e. it doesn't parse the uri from within the curly braces).

The code needs some re-work to make it robust.



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Commented: (XALANJ-2130) cdata-section-elements are not properly set via JAXP

Posted by "Brian Minchau (JIRA)" <xa...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XALANJ-2130?page=comments#action_66890 ]
     
Brian Minchau commented on XALANJ-2130:
---------------------------------------

Two things don't work properly. First we can't set cdata-section-names using the {uri}localname format within the stylesheet, e.g.:
<?xml version='1.0'?>
<xsl:stylesheet version='1.0'>    xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
    xmlns:xalan='http://xml.apache.org/xalan'
    xmlns:prfx='uri1'>
  <xsl:output method='xml' indent='yes' xalan:indent-amount='3' 
     cdata-section-elements='{uri1}b1 b2' />
<xsl:template match='/'>
<out>
<prfx:b1>in b1</prfx:b1>
<b2>in b2</b2>
<prfx:b3>in b3</prfx:b3>
<b4>in b4</b4>
</out>
</xsl:template>
</xsl:stylesheet>

This works for Xalan-J interpretive, but XSLTC doesn't like the 
'{uri1}b1 b2' attribute value.  So a fix is needed for that.
Secondly, with that fixed, the override from JAXP does not work properly,
also due to it not parsing the {} at all.
Here is a testcase for that:
   static void case2() throws TransformerException, IOException {
      final javax.xml.transform.TransformerFactory tFactory;
      tFactory = new org.apache.xalan.xsltc.trax.TransformerFactoryImpl();


        final javax.xml.transform.Transformer transformer;
        
        StringReader sheet = new StringReader(
        "<?xml version='1.0'?>\n"+
        "<xsl:stylesheet version='1.0'\n"+
        "    xmlns:xsl='http://www.w3.org/1999/XSL/Transform'\n"+
        "    xmlns:xalan='http://xml.apache.org/xalan'\n"+
        "    xmlns:prfx='uri1'>\n"+
        "\n"+
        "<xsl:output method='xml' indent='yes' xalan:indent-amount='3' \n"+
        "  cdata-section-elements='{uri1}b1 b2' />\n" +
        "<xsl:template match='/'>\n"+
        "<out>\n"+
        "<prfx:b1>in b1</prfx:b1>\n"+
        "<b2>in b2</b2>\n"+
        "<prfx:b3>in b3</prfx:b3>\n"+
        "<b4>in b4</b4>\n"+
        "</out>\n"+
        "</xsl:template>\n"+
        "</xsl:stylesheet>");
            
        StreamSource  stylesheet  = new StreamSource(sheet);
        transformer = tFactory.newTransformer(stylesheet);

        transformer.setOutputProperty(
            "cdata-section-elements","b4 {uri1}b3");
        

                
        StringWriter sw = new StringWriter();
        StringReader sr = new StringReader(
            "<?xml version='1.0' ?><doc/>");
        StreamResult  strmrslt = new StreamResult(sw);
        StreamSource  strmsrc  = new StreamSource(sr);
        
        transformer.transform(strmsrc, strmrslt);
        
        
        sw.flush();
        String out = sw.toString();
        sw.close();
        System.out.println("=================================");
        System.out.println(out);
        System.out.println("=================================");
    }


> cdata-section-elements are not properly set via JAXP
> ----------------------------------------------------
>
>          Key: XALANJ-2130
>          URL: http://issues.apache.org/jira/browse/XALANJ-2130
>      Project: XalanJ2
>         Type: Bug
>     Reporter: Brian Minchau
>     Assignee: Brian Minchau

>
> Section 16. of the XSLT 1.0 recommendation ( see http://www.w3.org/TR/xslt )
> says this:
> <<
> A stylesheet may contain multiple xsl:output elements and may include or import stylesheets that also contain xsl:output elements. All the xsl:output elements occurring in a stylesheet are merged into a single effective xsl:output element. For the cdata-section-elements attribute, the effective value is the union of the specified values. For other attributes, the effective value is the specified value with the highest import precedence. It is an error if there is more than one such value for an attribute. An XSLT processor may signal the error; if it does not signal the error, if should recover by using the value that occurs last in the stylesheet. 
> >>
> Even after this is done one can use the JAXP API Transformer.setOutputProperty(name,value) or Transformer.setOutputProperty(java.util.Properties) to override values in the stylesheet, that would be in its "single effective merged xsl:output element".
> In the spirit of what the stylesheet does, it would seem that if a cdata-section-elements property is set, it should not override the stylesheets set of sections, but be a union with it, just as the xsl:output cdata-sections-elements form an effective union. This is unlike other xsl:output attributes.
> The effective xsl:output attributes can be modified with mulitple calls to 
> Transformer.setOuputProperty(String name, String value) and/or 
> Transformer.setOutputProperty(java.util.Properties)
> However the serializer is brittle with respect to multiple such calls namely:
> - cdata-section-elements from JAXP do merge with the stylesheets values, they
> replace the stylesheets values
> - Writers can be lost
> - properties with namespaces, where the name part of the property is of the form 
> "{uri}localname"  are not properly handled, (i.e. it doesn't parse the uri from within the curly braces).
> The code needs some re-work to make it robust.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Updated: (XALANJ-2130) cdata-section-elements are not properly set via JAXP

Posted by "Brian Minchau (JIRA)" <xa...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XALANJ-2130?page=all ]

Brian Minchau updated XALANJ-2130:
----------------------------------

    Attachment: cdata-section-elements.patch.jira2130.txt

Attaching patch.

> cdata-section-elements are not properly set via JAXP
> ----------------------------------------------------
>
>          Key: XALANJ-2130
>          URL: http://issues.apache.org/jira/browse/XALANJ-2130
>      Project: XalanJ2
>         Type: Bug
>   Components: XSLTC
>     Reporter: Brian Minchau
>     Assignee: Brian Minchau
>  Attachments: cdata-section-elements.patch.jira2130.txt
>
> Section 16. of the XSLT 1.0 recommendation ( see http://www.w3.org/TR/xslt )
> says this:
> <<
> A stylesheet may contain multiple xsl:output elements and may include or import stylesheets that also contain xsl:output elements. All the xsl:output elements occurring in a stylesheet are merged into a single effective xsl:output element. For the cdata-section-elements attribute, the effective value is the union of the specified values. For other attributes, the effective value is the specified value with the highest import precedence. It is an error if there is more than one such value for an attribute. An XSLT processor may signal the error; if it does not signal the error, if should recover by using the value that occurs last in the stylesheet. 
> >>
> Even after this is done one can use the JAXP API Transformer.setOutputProperty(name,value) or Transformer.setOutputProperty(java.util.Properties) to override values in the stylesheet, that would be in its "single effective merged xsl:output element".
> In the spirit of what the stylesheet does, it would seem that if a cdata-section-elements property is set, it should not override the stylesheets set of sections, but be a union with it, just as the xsl:output cdata-sections-elements form an effective union. This is unlike other xsl:output attributes.
> The effective xsl:output attributes can be modified with mulitple calls to 
> Transformer.setOuputProperty(String name, String value) and/or 
> Transformer.setOutputProperty(java.util.Properties)
> However the serializer is brittle with respect to multiple such calls namely:
> - cdata-section-elements from JAXP do merge with the stylesheets values, they
> replace the stylesheets values
> - Writers can be lost
> - properties with namespaces, where the name part of the property is of the form 
> "{uri}localname"  are not properly handled, (i.e. it doesn't parse the uri from within the curly braces).
> The code needs some re-work to make it robust.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Updated: (XALANJ-2130) cdata-section-elements are not properly set via JAXP

Posted by "Brian Minchau (JIRA)" <xa...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XALANJ-2130?page=all ]

Brian Minchau updated XALANJ-2130:
----------------------------------

    Description: 
Section 16. of the XSLT 1.0 recommendation ( see http://www.w3.org/TR/xslt )
says this:
<<
A stylesheet may contain multiple xsl:output elements and may include or import stylesheets that also contain xsl:output elements. All the xsl:output elements occurring in a stylesheet are merged into a single effective xsl:output element. For the cdata-section-elements attribute, the effective value is the union of the specified values. For other attributes, the effective value is the specified value with the highest import precedence. It is an error if there is more than one such value for an attribute. An XSLT processor may signal the error; if it does not signal the error, if should recover by using the value that occurs last in the stylesheet. 
>>

Even after this is done one can use the JAXP API Transformer.setOutputProperty(name,value) or Transformer.setOutputProperty(java.util.Properties) to override values in the stylesheet, that would be in its "single effective merged xsl:output element".

In the spirit of what the stylesheet does, it would seem that if a cdata-section-elements property is set, it should not override the stylesheets set of sections, but be a union with it, just as the xsl:output cdata-sections-elements form an effective union. This is unlike other xsl:output attributes.

The effective xsl:output attributes can be modified with mulitple calls to 
Transformer.setOuputProperty(String name, String value) and/or 
Transformer.setOutputProperty(java.util.Properties)

However the serializer is brittle with respect to multiple such calls namely:
- cdata-section-elements from JAXP do merge with the stylesheets values, they
replace the stylesheets values
- Writers can be lost
- properties with namespaces, where the name part of the property is of the form 
"{uri}localname"  are not properly handled, (i.e. it doesn't parse the uri from within the curly braces).

The code needs some re-work to make it robust.



  was:

Section 16. of the XSLT 1.0 recommendation ( see http://www.w3.org/TR/xslt )
says this:
<<
A stylesheet may contain multiple xsl:output elements and may include or import stylesheets that also contain xsl:output elements. All the xsl:output elements occurring in a stylesheet are merged into a single effective xsl:output element. For the cdata-section-elements attribute, the effective value is the union of the specified values. For other attributes, the effective value is the specified value with the highest import precedence. It is an error if there is more than one such value for an attribute. An XSLT processor may signal the error; if it does not signal the error, if should recover by using the value that occurs last in the stylesheet. 
>>

Even after this is done one can use the JAXP API Transformer.setOutputProperty(name,value) or Transformer.setOutputProperty(java.util.Properties) to override values in the stylesheet, that would be in its "single effective merged xsl:output element".

In the spirit of what the stylesheet does, it would seem that if a cdata-section-elements property is set, it should not override the stylesheets set of sections, but be a union with it, just as the xsl:output cdata-sections-elements form an effective union. This is unlike other xsl:output attributes.

The effective xsl:output attributes can be modified with mulitple calls to 
Transformer.setOuputProperty(String name, String value) and/or 
Transformer.setOutputProperty(java.util.Properties)

However the serializer is brittle with respect to multiple such calls namely:
- cdata-section-elements from JAXP do merge with the stylesheets values, they
replace the stylesheets values
- Writers can be lost
- properties with namespaces, where the name part of the property is of the form 
"{uri}localname"  are not properly handled, (i.e. it doesn't parse the uri from within the curly braces).

The code needs some re-work to make it robust.



       reviewer: zongaro@ca.ibm.com

Reviewer set to Henry Z.

> cdata-section-elements are not properly set via JAXP
> ----------------------------------------------------
>
>          Key: XALANJ-2130
>          URL: http://issues.apache.org/jira/browse/XALANJ-2130
>      Project: XalanJ2
>         Type: Bug
>   Components: XSLTC
>     Reporter: Brian Minchau
>     Assignee: Brian Minchau
>  Attachments: cdata-section-elements.patch.jira2130.txt
>
> Section 16. of the XSLT 1.0 recommendation ( see http://www.w3.org/TR/xslt )
> says this:
> <<
> A stylesheet may contain multiple xsl:output elements and may include or import stylesheets that also contain xsl:output elements. All the xsl:output elements occurring in a stylesheet are merged into a single effective xsl:output element. For the cdata-section-elements attribute, the effective value is the union of the specified values. For other attributes, the effective value is the specified value with the highest import precedence. It is an error if there is more than one such value for an attribute. An XSLT processor may signal the error; if it does not signal the error, if should recover by using the value that occurs last in the stylesheet. 
> >>
> Even after this is done one can use the JAXP API Transformer.setOutputProperty(name,value) or Transformer.setOutputProperty(java.util.Properties) to override values in the stylesheet, that would be in its "single effective merged xsl:output element".
> In the spirit of what the stylesheet does, it would seem that if a cdata-section-elements property is set, it should not override the stylesheets set of sections, but be a union with it, just as the xsl:output cdata-sections-elements form an effective union. This is unlike other xsl:output attributes.
> The effective xsl:output attributes can be modified with mulitple calls to 
> Transformer.setOuputProperty(String name, String value) and/or 
> Transformer.setOutputProperty(java.util.Properties)
> However the serializer is brittle with respect to multiple such calls namely:
> - cdata-section-elements from JAXP do merge with the stylesheets values, they
> replace the stylesheets values
> - Writers can be lost
> - properties with namespaces, where the name part of the property is of the form 
> "{uri}localname"  are not properly handled, (i.e. it doesn't parse the uri from within the curly braces).
> The code needs some re-work to make it robust.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Assigned: (XALANJ-2130) cdata-section-elements are not properly set via JAXP

Posted by "Brian Minchau (JIRA)" <xa...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XALANJ-2130?page=all ]

Brian Minchau reassigned XALANJ-2130:
-------------------------------------

    Assign To: Brian Minchau

> cdata-section-elements are not properly set via JAXP
> ----------------------------------------------------
>
>          Key: XALANJ-2130
>          URL: http://issues.apache.org/jira/browse/XALANJ-2130
>      Project: XalanJ2
>         Type: Bug
>     Reporter: Brian Minchau
>     Assignee: Brian Minchau

>
> Section 16. of the XSLT 1.0 recommendation ( see http://www.w3.org/TR/xslt )
> says this:
> <<
> A stylesheet may contain multiple xsl:output elements and may include or import stylesheets that also contain xsl:output elements. All the xsl:output elements occurring in a stylesheet are merged into a single effective xsl:output element. For the cdata-section-elements attribute, the effective value is the union of the specified values. For other attributes, the effective value is the specified value with the highest import precedence. It is an error if there is more than one such value for an attribute. An XSLT processor may signal the error; if it does not signal the error, if should recover by using the value that occurs last in the stylesheet. 
> >>
> Even after this is done one can use the JAXP API Transformer.setOutputProperty(name,value) or Transformer.setOutputProperty(java.util.Properties) to override values in the stylesheet, that would be in its "single effective merged xsl:output element".
> In the spirit of what the stylesheet does, it would seem that if a cdata-section-elements property is set, it should not override the stylesheets set of sections, but be a union with it, just as the xsl:output cdata-sections-elements form an effective union. This is unlike other xsl:output attributes.
> The effective xsl:output attributes can be modified with mulitple calls to 
> Transformer.setOuputProperty(String name, String value) and/or 
> Transformer.setOutputProperty(java.util.Properties)
> However the serializer is brittle with respect to multiple such calls namely:
> - cdata-section-elements from JAXP do merge with the stylesheets values, they
> replace the stylesheets values
> - Writers can be lost
> - properties with namespaces, where the name part of the property is of the form 
> "{uri}localname"  are not properly handled, (i.e. it doesn't parse the uri from within the curly braces).
> The code needs some re-work to make it robust.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Updated: (XALANJ-2130) cdata-section-elements are not properly set via JAXP

Posted by "Brian Minchau (JIRA)" <xa...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XALANJ-2130?page=all ]

Brian Minchau updated XALANJ-2130:
----------------------------------

    Description: 

Section 16. of the XSLT 1.0 recommendation ( see http://www.w3.org/TR/xslt )
says this:
<<
A stylesheet may contain multiple xsl:output elements and may include or import stylesheets that also contain xsl:output elements. All the xsl:output elements occurring in a stylesheet are merged into a single effective xsl:output element. For the cdata-section-elements attribute, the effective value is the union of the specified values. For other attributes, the effective value is the specified value with the highest import precedence. It is an error if there is more than one such value for an attribute. An XSLT processor may signal the error; if it does not signal the error, if should recover by using the value that occurs last in the stylesheet. 
>>

Even after this is done one can use the JAXP API Transformer.setOutputProperty(name,value) or Transformer.setOutputProperty(java.util.Properties) to override values in the stylesheet, that would be in its "single effective merged xsl:output element".

In the spirit of what the stylesheet does, it would seem that if a cdata-section-elements property is set, it should not override the stylesheets set of sections, but be a union with it, just as the xsl:output cdata-sections-elements form an effective union. This is unlike other xsl:output attributes.

The effective xsl:output attributes can be modified with mulitple calls to 
Transformer.setOuputProperty(String name, String value) and/or 
Transformer.setOutputProperty(java.util.Properties)

However the serializer is brittle with respect to multiple such calls namely:
- cdata-section-elements from JAXP do merge with the stylesheets values, they
replace the stylesheets values
- Writers can be lost
- properties with namespaces, where the name part of the property is of the form 
"{uri}localname"  are not properly handled, (i.e. it doesn't parse the uri from within the curly braces).

The code needs some re-work to make it robust.



  was:


Section 16. of the XSLT 1.0 recommendation ( see http://www.w3.org/TR/xslt )
says this:
<<
A stylesheet may contain multiple xsl:output elements and may include or import stylesheets that also contain xsl:output elements. All the xsl:output elements occurring in a stylesheet are merged into a single effective xsl:output element. For the cdata-section-elements attribute, the effective value is the union of the specified values. For other attributes, the effective value is the specified value with the highest import precedence. It is an error if there is more than one such value for an attribute. An XSLT processor may signal the error; if it does not signal the error, if should recover by using the value that occurs last in the stylesheet. 
>>

Even after this is done one can use the JAXP API Transformer.setOutputProperty(name,value) or Transformer.setOutputProperty(java.util.Properties) to override values in the stylesheet, that would be in its "single effective merged xsl:output element".

In the spirit of what the stylesheet does, it would seem that if a cdata-section-elements property is set, it should not override the stylesheets set of sections, but be a union with it, just as the xsl:output cdata-sections-elements form an effective union. This is unlike other xsl:output attributes.

The effective xsl:output attributes can be modified with mulitple calls to 
Transformer.setOuputProperty(String name, String value) and/or 
Transformer.setOutputProperty(java.util.Properties)

However the serializer is brittle with respect to multiple such calls namely:
- cdata-section-elements from JAXP do merge with the stylesheets values, they
replace the stylesheets values
- Writers can be lost
- properties with namespaces, where the name part of the property is of the form 
"{uri}localname"  are not properly handled, (i.e. it doesn't parse the uri from within the curly braces).

The code needs some re-work to make it robust.



     Xalan info: [PatchAvailable]
      Component: XSLTC

> cdata-section-elements are not properly set via JAXP
> ----------------------------------------------------
>
>          Key: XALANJ-2130
>          URL: http://issues.apache.org/jira/browse/XALANJ-2130
>      Project: XalanJ2
>         Type: Bug
>   Components: XSLTC
>     Reporter: Brian Minchau
>     Assignee: Brian Minchau
>  Attachments: cdata-section-elements.patch.jira2130.txt
>
> Section 16. of the XSLT 1.0 recommendation ( see http://www.w3.org/TR/xslt )
> says this:
> <<
> A stylesheet may contain multiple xsl:output elements and may include or import stylesheets that also contain xsl:output elements. All the xsl:output elements occurring in a stylesheet are merged into a single effective xsl:output element. For the cdata-section-elements attribute, the effective value is the union of the specified values. For other attributes, the effective value is the specified value with the highest import precedence. It is an error if there is more than one such value for an attribute. An XSLT processor may signal the error; if it does not signal the error, if should recover by using the value that occurs last in the stylesheet. 
> >>
> Even after this is done one can use the JAXP API Transformer.setOutputProperty(name,value) or Transformer.setOutputProperty(java.util.Properties) to override values in the stylesheet, that would be in its "single effective merged xsl:output element".
> In the spirit of what the stylesheet does, it would seem that if a cdata-section-elements property is set, it should not override the stylesheets set of sections, but be a union with it, just as the xsl:output cdata-sections-elements form an effective union. This is unlike other xsl:output attributes.
> The effective xsl:output attributes can be modified with mulitple calls to 
> Transformer.setOuputProperty(String name, String value) and/or 
> Transformer.setOutputProperty(java.util.Properties)
> However the serializer is brittle with respect to multiple such calls namely:
> - cdata-section-elements from JAXP do merge with the stylesheets values, they
> replace the stylesheets values
> - Writers can be lost
> - properties with namespaces, where the name part of the property is of the form 
> "{uri}localname"  are not properly handled, (i.e. it doesn't parse the uri from within the curly braces).
> The code needs some re-work to make it robust.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Commented: (XALANJ-2130) cdata-section-elements are not properly set via JAXP

Posted by "Henry Zongaro (JIRA)" <xa...@xml.apache.org>.
    [ http://issues.apache.org/jira/browse/XALANJ-2130?page=comments#action_12316479 ] 

Henry Zongaro commented on XALANJ-2130:
---------------------------------------

>From a note I sent to Brian privately:

«I started to review your patch for XALANJ-2130, and was a bit confused about the change to Output.java.  It's handling URIs in braces, but the code in that class never puts URIs in braces.  Try this example, and you'll see what I mean:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  <xsl:output method="xml" cdata-section-elements="me:thou" xmlns:me="uri1"/>
  <xsl:output method="xml" cdata-section-elements="we:you" xmlns:we="uri2"/>
</xsl:stylesheet>
»

I just wanted to record the comment so it wouldn't get lost.

> cdata-section-elements are not properly set via JAXP
> ----------------------------------------------------
>
>          Key: XALANJ-2130
>          URL: http://issues.apache.org/jira/browse/XALANJ-2130
>      Project: XalanJ2
>         Type: Bug
>   Components: XSLTC
>     Reporter: Brian Minchau
>     Assignee: Brian Minchau
>  Attachments: cdata-section-elements.patch.jira2130.txt
>
> Section 16. of the XSLT 1.0 recommendation ( see http://www.w3.org/TR/xslt )
> says this:
> <<
> A stylesheet may contain multiple xsl:output elements and may include or import stylesheets that also contain xsl:output elements. All the xsl:output elements occurring in a stylesheet are merged into a single effective xsl:output element. For the cdata-section-elements attribute, the effective value is the union of the specified values. For other attributes, the effective value is the specified value with the highest import precedence. It is an error if there is more than one such value for an attribute. An XSLT processor may signal the error; if it does not signal the error, if should recover by using the value that occurs last in the stylesheet. 
> >>
> Even after this is done one can use the JAXP API Transformer.setOutputProperty(name,value) or Transformer.setOutputProperty(java.util.Properties) to override values in the stylesheet, that would be in its "single effective merged xsl:output element".
> In the spirit of what the stylesheet does, it would seem that if a cdata-section-elements property is set, it should not override the stylesheets set of sections, but be a union with it, just as the xsl:output cdata-sections-elements form an effective union. This is unlike other xsl:output attributes.
> The effective xsl:output attributes can be modified with mulitple calls to 
> Transformer.setOuputProperty(String name, String value) and/or 
> Transformer.setOutputProperty(java.util.Properties)
> However the serializer is brittle with respect to multiple such calls namely:
> - cdata-section-elements from JAXP do merge with the stylesheets values, they
> replace the stylesheets values
> - Writers can be lost
> - properties with namespaces, where the name part of the property is of the form 
> "{uri}localname"  are not properly handled, (i.e. it doesn't parse the uri from within the curly braces).
> The code needs some re-work to make it robust.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org


[jira] Commented: (XALANJ-2130) cdata-section-elements are not properly set via JAXP

Posted by "Brian Minchau (JIRA)" <xa...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XALANJ-2130?page=comments#action_66874 ]
     
Brian Minchau commented on XALANJ-2130:
---------------------------------------

After investigation I find that the only problem is that the format of the name "{uri}local" is not handled by the XSLTC code. I don't see any other problems. So that is the bug to fix here.

> cdata-section-elements are not properly set via JAXP
> ----------------------------------------------------
>
>          Key: XALANJ-2130
>          URL: http://issues.apache.org/jira/browse/XALANJ-2130
>      Project: XalanJ2
>         Type: Bug
>     Reporter: Brian Minchau
>     Assignee: Brian Minchau

>
> Section 16. of the XSLT 1.0 recommendation ( see http://www.w3.org/TR/xslt )
> says this:
> <<
> A stylesheet may contain multiple xsl:output elements and may include or import stylesheets that also contain xsl:output elements. All the xsl:output elements occurring in a stylesheet are merged into a single effective xsl:output element. For the cdata-section-elements attribute, the effective value is the union of the specified values. For other attributes, the effective value is the specified value with the highest import precedence. It is an error if there is more than one such value for an attribute. An XSLT processor may signal the error; if it does not signal the error, if should recover by using the value that occurs last in the stylesheet. 
> >>
> Even after this is done one can use the JAXP API Transformer.setOutputProperty(name,value) or Transformer.setOutputProperty(java.util.Properties) to override values in the stylesheet, that would be in its "single effective merged xsl:output element".
> In the spirit of what the stylesheet does, it would seem that if a cdata-section-elements property is set, it should not override the stylesheets set of sections, but be a union with it, just as the xsl:output cdata-sections-elements form an effective union. This is unlike other xsl:output attributes.
> The effective xsl:output attributes can be modified with mulitple calls to 
> Transformer.setOuputProperty(String name, String value) and/or 
> Transformer.setOutputProperty(java.util.Properties)
> However the serializer is brittle with respect to multiple such calls namely:
> - cdata-section-elements from JAXP do merge with the stylesheets values, they
> replace the stylesheets values
> - Writers can be lost
> - properties with namespaces, where the name part of the property is of the form 
> "{uri}localname"  are not properly handled, (i.e. it doesn't parse the uri from within the curly braces).
> The code needs some re-work to make it robust.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org