[oXygen-user] Variable names stops working

Adrian Buza
Fri Aug 5 02:51:50 CDT 2011


Hello,

I just wanted to let you know that this problem has been resolved in the 
latest build of Oxygen 12.2, 2011080114:
 > Options declared in an XProc transformation scenario no longer 
overwrite variables with the same name that are declared in an XProc 
script used in that scenario.

 You can download it from our web site:
http://www.oxygenxml.com/download.html

The complete list of bug-fixes for this build can be found here:
http://www.oxygenxml.com/build_history.html#2011080114

Let us know if you encounter further problems with this build.

Regards,
Adrian

Adrian Buza
oXygen XML Editor and Author Support

http://www.oxygenxml.com

Jostein Austvik Jacobsen wrote:
> I found a way to reproduce - and fix the problem!
>
> The variable names that "stopped working" had at some point been 
> defined as options under "configure transformation scenario" > "edit 
> scenario" > "options" (probably by me, so I guess it's my own fault).
>
> To reproduce;
>
> 1. Create this XProc script:
> <p:pipeline xmlns:p="http://www.w3.org/ns/xproc" 
> xmlns:c="http://www.w3.org/ns/xproc-step" version="1.0">
>     <p:variable name="name" select="'this is a variable'"/>
>     <p:add-attribute match="/*" attribute-name="name">
>         <p:with-option name="attribute-value" select="$name"/>
>         <p:input port="source">
>             <p:inline>
>                 <c:result/>
>             </p:inline>
>         </p:input>
>     </p:add-attribute>
> </p:pipeline>
>
> 2. Create a scenario with an option called "name" and the value "this 
> is an option".
>
> 3. Run the scenario on the pipeline. You will get:
> <c:result xmlns:c="http://www.w3.org/ns/xproc-step" name="this is an 
> option"/>
>
> I don't know if this is the intended behavior or not, but I'd prefer 
> it if either;
> - options that were defined in the scenario, but not in the pipeline 
> were ignored,
> - or at the very least if an option is defined in the scenario that 
> has the same name as a variable in the pipeline, an err:XS0004 
> <http://www.w3.org/TR/xproc/#err.S0004> were thrown.
>
> Regards
> Jostein
>
> 2011/7/7 Adrian Buza < <mailto:>>
>
>     Hello,
>
>     We've tested this with Ubuntu 11.04 but could not reproduce the
>     problem you describe.
>
>     Please copy the attached 'log4j.properties' file to the Oxygen
>     installation directory and restart Oxygen. Then reproduce the
>     problem and close Oxygen. You will find a directory named
>     'oxygenLog' in your Desktop directory and inside it the generated
>     log files(oxygen.log.*). Please zip those files and send them to
>     our support email address: 
>     <mailto:>
>
>     The file 'log4j.properties' triggers the debug mode which
>     decreases the application performance severely. At the end of the
>     procedure please do not forget to remove this file from the Oxygen
>     installation directory.
>
>     Regards,
>     Adrian
>
>     Adrian Buza
>     oXygen XML Editor and Author Support
>      <mailto:>
>     http://www.oxygenxml.com
>
>     Jostein Austvik Jacobsen wrote:
>
>         I'm having some (really weird) trouble, and unfortunately I'm
>         unable to reproduce it on other computers, but here's a short
>         pipeline:
>
>         <?xml version="1.0" encoding="UTF-8"?>
>         <p:pipeline xmlns:p="http://www.w3.org/ns/xproc" version="1.0">
>            <p:variable name="daisy-dir" select="'daisy-dir'"/>
>            <p:variable name="other-dir" select="'other-dir'"/>
>                <p:add-attribute match="/*" attribute-name="daisy-dir">
>                <p:with-option name="attribute-value" select="$daisy-dir"/>
>                <p:input port="source">
>                    <p:inline>
>                        <doc/>
>                    </p:inline>
>                </p:input>
>            </p:add-attribute>
>            <p:add-attribute match="/*" attribute-name="other-dir">
>                <p:with-option name="attribute-value" select="$other-dir"/>
>            </p:add-attribute>
>         </p:pipeline>
>
>         You'd expect to get:
>         <doc daisy-dir="daisy-dir" other-dir="other-dir"/>
>
>         But on my computer with <oXygen/> XML Editor 12.2, build
>         2011051714 on Ubuntu 11.04, I get:
>         <doc daisy-dir="" other-dir="other-dir"/>
>
>         This only happens in oXygen on my Ubuntu though, not if I run
>         calabash from the command line in Ubuntu or oXygen in Windows;
>         so I don't know how to reproduce the problem on other computers.
>
>         If I rename the variable from "daisy-dir" to something else,
>         it works. So for some reason, the oXygen installation is
>         ignoring variables that are called "daisy-dir" all of a
>         sudden... I changed it to "input-dir" and it worked for a
>         while, but after a few minutes, oXygen started ignoring
>         variables with that name as well. Doing a "find | xargs grep
>         -i daisy 2>/dev/null" in the oxygen directory gives no
>         relevant hits, so I'm not sure how to debug this further... Is
>         there any logfiles I can provide?
>
>         I have a hunch that it may have to do with variables and
>         options having the same name across files/steps (example
>         below), and how that's stored internally in either oxygen or
>         calabash, but I'm really not sure. I do this in the pipeline
>         I'm trying to run, but when the option name stops working - it
>         stops working in all pipelines.
>
>         <p:variable name="input-dir" select="'something'"/>
>         ...
>         <p:with-option name="input-dir" select="$input-dir"/>
>
>
>         Regards
>         Jostein
>         ------------------------------------------------------------------------
>
>         _______________________________________________
>         oXygen-user mailing list
>          <mailto:>
>         http://www.oxygenxml.com/mailman/listinfo/oxygen-user
>          
>
>
>
>     log4j.rootCategory= debug, R2
>
>     log4j.appender.R2=org.apache.log4j.RollingFileAppender
>     log4j.appender.R2.File=${user.home}/Desktop/oxygenLog/oxygen.log
>     log4j.appender.R2.MaxFileSize=12000KB
>     log4j.appender.R2.MaxBackupIndex=20
>     log4j.appender.R2.layout=org.apache.log4j.PatternLayout
>     log4j.appender.R2.layout.ConversionPattern=%r %p [ %t ] %c - %m%n
>
>




More information about the oXygen-user mailing list