You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "Xiang Gao (JIRA)" <xa...@xml.apache.org> on 2005/07/19 16:59:47 UTC

[jira] Created: (XALANJ-2174) DOM parser name space issue

DOM parser name space issue
---------------------------

         Key: XALANJ-2174
         URL: http://issues.apache.org/jira/browse/XALANJ-2174
     Project: XalanJ2
        Type: Bug
  Components: XPath  
 Environment: Operating System: Windows 2K
    Reporter: Xiang Gao


I am currently working on a XML file parse problem when doing migration our system from jdk1.3.1 to jdk1.4.2. 

The scenario is 
1. Turn off the namespace aware feature of the DOM parser
2. Try to parse a XML file with name space. 

I use two environments to do the testing. One is jdk1.3.1+xalan.jar+xerces.jar, the other one is jdk1.4.2+xerces.jar. The xalan version is 1.0, the xerces version is 1.0. The expected result is the parser just ignores the name space and parses the XML file properly.

I created a program to demonstrate the defect, basically the program does the following:
·	Read a sample xml file in (with Namespace information).
·	Create a DOM parser
·	Set the namespace feature as false, parse the file 
·	Get the ("Header") node using XPath
·	Write the value of the Header note out to the console.

A) Test using jdk131_08 and our current xalan.jar and xerces.jar.

The results were the following

1) Compile the file successfully using the following command:

C:\ jdk131_08\bin\javac -classpath .;C:\temp\lib\xalan.jar;C:\temp\lib\xerces.jar  DomParsing.java

2) Run the program using the following script:

setlocal

set cp=%cp%;/temp/lib/xerces.jar
set cp=%cp%;/temp/lib/xalan.jar

C:\ jdk131_08\bin\java -cp %cp% xml.DomParsing

endlocal

3) Output result is (using this system out statement: System.out.println("header [" + header + "]");):

header [[test:Header: null]]

The test is successful as the Header node in this case is not null (The null shown here is the node value, Header does not have a value)

B) Test using jdk142_05 and our current xerces.jar. 

1) Compile the file successfully using the following command:

C:\ jdk142_05 \bin\javac -classpath .;C:\temp\lib\xerces.jar  DomParsing.java

2) Run the program using the following script:
setlocal

set cp=%cp%;/temp/lib/xerces.jar

C:\jdk142_05\bin\java -cp %cp% xml.DomParsing

endlocal

3) Output result is (using this system out statement: System.out.println("header [" + header + "]");):

header [null]

The test is a failure as the Header node in this case is null.

The actual result seems the DOM parser just doesn't recognize the name space feature has been set to false.






-- 
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-2174) DOM parser name space issue

Posted by "Christine Li (JIRA)" <xa...@xml.apache.org>.
    [ http://issues.apache.org/jira/browse/XALANJ-2174?page=comments#action_12316104 ] 

Christine Li commented on XALANJ-2174:
--------------------------------------

It sounds like a JDK 1.4 issue. If you want to use specific version of xalan and xerces with JDK 1.4+, please refer to FAQs http://xml.apache.org/xalan-j/faq.html#faq-N100CC

> DOM parser name space issue
> ---------------------------
>
>          Key: XALANJ-2174
>          URL: http://issues.apache.org/jira/browse/XALANJ-2174
>      Project: XalanJ2
>         Type: Bug
>   Components: XPath
>  Environment: Operating System: Windows 2K
>     Reporter: Xiang Gao
>  Attachments: DomParsing.java, sample.xml
>
> I am currently working on a XML file parse problem when doing migration our system from jdk1.3.1 to jdk1.4.2. 
> The scenario is 
> 1. Turn off the namespace aware feature of the DOM parser
> 2. Try to parse a XML file with name space. 
> I use two environments to do the testing. One is jdk1.3.1+xorg 1.6.2 0/1000/N

     [ http://issues.apache.org/jira/browse/XALANJ-2174?page=all ]

Xiang Gao updated XALANJ-2174:
------------------------------

    Attachment: sample.xml

> DOM parser name space issue
> ---------------------------
>
>          Key: XALANJ-2174
>          URL: http://issues.apache.org/jira/browse/XALANJ-2174
>      Project: XalanJ2
>         Type: Bug
>   Components: XPath
>  Environment: Operating System: Windows 2K
>     Reporter: Xiang Gao
>  Attachments: DomParsing.java, sample.xml
>
> I am currently working on a XML file parse problem when doing migration our system from jdk1.3.1 to jdk1.4.2. 
> The scenario is 
> 1. Turn off the namespace aware feature of the DOM parser
> 2. Try to parse a XML file with name space. 
> I use two environments to do the testing. One is jdk1.3.1+xalan.jar+xerces.jar, the other one is jdk1.4.2+xerces.jar. The xalan version is 1.0, the xerces version is 1.0. The expected result is the parser just ignores the name space and parses the XMalan.jar+xerces.jar, the other one is jdk1.4.2+xerces.jar. The xalan version is 1.0, the xerces version is 1.0. The expected result is the parser just ignores the name space and parses the XML file properly.
> I created a program to demonstrate the defect, basically the program does the following:
> ·	Read a sample xml file in (with Namespace information).
> ·	Create a DOM parser
> ·	Set the namespace feature as false, parse the file 
> ·	Get the ("Header") node using XPath
> ·	Write the value of the Header note out to the console.
> A) Test using jdk131_08 and our current xalan.jar and xerces.jar.
> The results were the following
> 1) Compile the file successfully using the following command:
> C:\ jdk131_08\bin\javac -classpath .;C:\temp\lib\xalan.jar;C:\temp\lib\xerces.jar  DomParsing.java
> 2) Run the program using the following script:
> setlocal
> set cp=%cp%;/temp/lib/xerces.jar
> set cp=%cp%;/temp/lib/xalan.jar
> C:\ jdk131_08\bin\java -cp %cp% xml.DoL file properly.
> I created a program to demonstrate the defect, basically the program does the following:
> ·	Read a sample xml file in (with Namespace information).
> ·	Create a DOM parser
> ·	Set the namespace feature as false, parse the file 
> ·	Get the ("Header") node using XPath
> ·	Write the value of the Header note out to the console.
> A) Test using jdk131_08 and our current xalan.jar and xerces.jar.
> The results were the following
> 1) Compile the file successfully using the following command:
> C:\ jdk131_08\bin\javac -classpath .;C:\temp\lib\xalan.jar;C:\temp\lib\xerces.jar  DomParsing.java
> 2) Run the program using the following script:
> setlocal
> set cp=%cp%;/temp/lib/xerces.jar
> set cp=%cp%;/temp/lib/xalan.jar
> C:\ jdk131_08\bin\java -cp %cp% xml.DomParsing
> endlocal
> 3) Output result is (using this system out statement: System.out.println("header [" + header + "]");):
> header [[test:Header: null]]
> The test is successful as the Header mParsing
> endlocal
> 3) Output result is (using this system out statement: System.out.println("header [" + header + "]");):
> header [[test:Header: null]]
> The test is successful as the Header node in this case is not null (The null shown here is the node value, Header does not have a value)
> B) Test using jdk142_05 and our current xerces.jar. 
> 1) Compile the file successfully using the following command:
> C:\ jdk142_05 \bin\javac -classpath .;C:\temp\lib\xerces.jar  DomParsing.java
> 2) Run the program using the following script:
> setlocal
> set cp=%cp%;/temp/lib/xerces.jar
> C:\jdk142_05\bin\java -cp %cp% xml.DomParsing
> endlocal
> 3) Output result is (using this system out statement: System.out.println("header [" + header + "]");):
> header [null]
> The test is a failure as the Header node in this case is null.
> The actual result seems the DOM parser just doesn't recognize the name space feature has been set to false.

-- 
This message is automatically generated by JIRA.
-
If you tnode in this case is not null (The null shown here is the node value, Header does not have a value)
> B) Test using jdk142_05 and our current xerces.jar. 
> 1) Compile the file successfully using the following command:
> C:\ jdk142_05 \bin\javac -classpath .;C:\temp\lib\xerces.jar  DomParsing.java
> 2) Run the program using the following script:
> setlocal
> set cp=%cp%;/temp/lib/xerces.jar
> C:\jdk142_05\bin\java -cp %cp% xml.DomParsing
> endlocal
> 3) Output result is (using this system out statement: System.out.println("header [" + header + "]");):
> header [null]
> The test is a failure as the Header node in this case is null.
> The actual result seems the DOM parser just doesn't recognize the name space feature has been set to false.

-- 
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/softwarehink 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


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


[jira] Commented: (XALANJ-2174) DOM parser name space issue

Posted by "Xiang Gao (JIRA)" <xa...@xml.apache.org>.
    [ http://issues.apache.org/jira/browse/XALANJ-2174?page=comments#action_12316367 ] 

Xiang Gao commented on XALANJ-2174:
-----------------------------------

Thanks for the prompt reply.  After reading your email a few times, I really don't understand what some of the points you made.  I need to go away and digest what you are trying to tell me.  So, before you decide to close this ticket, I need time to review and research your arguments.  Please do not close this ticket until I have had a chance to response to your ponints.


> DOM parser name space issue
> ---------------------------
>
>          Key: XALANJ-2174
>          URL: http://issues.apache.org/jira/browse/XALANJ-2174
>      Project: XalanJ2
>         Type: Bug
>   Components: XPath
>  Environment: Operating System: Windows 2K
>     Reporter: Xiang Gao
>  Attachments: DomParsing.java, sample.xml, xalan.jar
>
> I am currently working on a XML file parse problem when doing migration our system from jdk1.3.1 to jdk1.4.2. 
> The scenario is 
> 1. Turn off the namespace aware feature of the DOM parser
> 2. Try to parse a XML file with name space. 
> I use two environments to do the testing. One is jdk1.3.1+xalan.jar+xerces.jar, the other one is jdk1.4.2+xerces.jar. The xalan version is 1.0, the xerces version is 1.0. The expected result is the parser just ignores the name space and parses the XML file properly.
> I created a program to demonstrate the defect, basically the program does the following:
> ·	Read a sample xml file in (with Namespace information).
> ·	Create a DOM parser
> ·	Set the namespace feature as false, parse the file 
> ·	Get the ("Header") node using XPath
> ·	Write the value of the Header note out to the console.
> A) Test using jdk131_08 and our current xalan.jar and xerces.jar.
> The results were the following
> 1) Compile the file successfully using the following command:
> C:\ jdk131_08\bin\javac -classpath .;C:\temp\lib\xalan.jar;C:\temp\lib\xerces.jar  DomParsing.java
> 2) Run the program using the following script:
> setlocal
> set cp=%cp%;/temp/lib/xerces.jar
> set cp=%cp%;/temp/lib/xalan.jar
> C:\ jdk131_08\bin\java -cp %cp% xml.DomParsing
> endlocal
> 3) Output result is (using this system out statement: System.out.println("header [" + header + "]");):
> header [[test:Header: null]]
> The test is successful as the Header node in this case is not null (The null shown here is the node value, Header does not have a value)
> B) Test using jdk142_05 and our current xerces.jar. 
> 1) Compile the file successfully using the following command:
> C:\ jdk142_05 \bin\javac -classpath .;C:\temp\lib\xerces.jar  DomParsing.java
> 2) Run the program using the following script:
> setlocal
> set cp=%cp%;/temp/lib/xerces.jar
> C:\jdk142_05\bin\java -cp %cp% xml.DomParsing
> endlocal
> 3) Output result is (using this system out statement: System.out.println("header [" + header + "]");):
> header [null]
> The test is a failure as the Header node in this case is null.
> The actual result seems the DOM parser just doesn't recognize the name space feature has been set to false.

-- 
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-2174) DOM parser name space issue

Posted by "Christine Li (JIRA)" <xa...@xml.apache.org>.
    [ http://issues.apache.org/jira/browse/XALANJ-2174?page=comments#action_12316279 ] 

Christine Li commented on XALANJ-2174:
--------------------------------------

XSLT relies XPath to navigate through the xml document. In xalan, xpath implementation is integrated with XSLT implementation. It is incorrected for you to think that you are not using XSLT, but XPath. 

Xalan doesn't have it is own parser. It uses DOM parser provided from Xerces project. When you turn the namespace aware feature off, the result of traversing the generated tree structure for your input document becomes un-predicable.

The Xalan.jar that you are using is version 2.1.0. It was a really old version. During the DTM migration, the behavior of handling the resource from a non namespace aware parser was changed. So you can't get the same result when upgrade xalan. 

Besides, why do you want to turn off the namesapce-aware feature if your input source uses namespace? You may want to reconsider the usage.

Again, this is an invalid bug, therefore I marked it as resolved. 

> DOM parser name space issue
> ---------------------------
>
>          Key: XALANJ-2174
>          URL: http://issues.apache.org/jira/browse/XALANJ-2174
>      Project: XalanJ2
>         Type: Bug
>   Components: XPath
>  Environment: Operating System: Windows 2K
>     Reporter: Xiang Gao
>  Attachments: DomParsing.java, sample.xml, xalan.jar
>
> I am currently working on a XML file parse problem when doing migration our system from jdk1.3.1 to jdk1.4.2. 
> The scenario is 
> 1. Turn off the namespace aware feature of the DOM parser
> 2. Try to parse a XML file with name space. 
> I use two environments to do the testing. One is jdk1.3.1+xalan.jar+xerces.jar, the other one is jdk1.4.2+xerces.jar. The xalan version is 1.0, the xerces version is 1.0. The expected result is the parser just ignores the name space and parses the XML file properly.
> I created a program to demonstrate the defect, basically the program does the following:
> ·	Read a sample xml file in (with Namespace information).
> ·	Create a DOM parser
> ·	Set the namespace feature as false, parse the file 
> ·	Get the ("Header") node using XPath
> ·	Write the value of the Header note out to the console.
> A) Test using jdk131_08 and our current xalan.jar and xerces.jar.
> The results were the following
> 1) Compile the file successfully using the following command:
> C:\ jdk131_08\bin\javac -classpath .;C:\temp\lib\xalan.jar;C:\temp\lib\xerces.jar  DomParsing.java
> 2) Run the program using the following script:
> setlocal
> set cp=%cp%;/temp/lib/xerces.jar
> set cp=%cp%;/temp/lib/xalan.jar
> C:\ jdk131_08\bin\java -cp %cp% xml.DomParsing
> endlocal
> 3) Output result is (using this system out statement: System.out.println("header [" + header + "]");):
> header [[test:Header: null]]
> The test is successful as the Header node in this case is not null (The null shown here is the node value, Header does not have a value)
> B) Test using jdk142_05 and our current xerces.jar. 
> 1) Compile the file successfully using the following command:
> C:\ jdk142_05 \bin\javac -classpath .;C:\temp\lib\xerces.jar  DomParsing.java
> 2) Run the program using the following script:
> setlocal
> set cp=%cp%;/temp/lib/xerces.jar
> C:\jdk142_05\bin\java -cp %cp% xml.DomParsing
> endlocal
> 3) Output result is (using this system out statement: System.out.println("header [" + header + "]");):
> header [null]
> The test is a failure as the Header node in this case is null.
> The actual result seems the DOM parser just doesn't recognize the name space feature has been set to false.

-- 
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-2174) DOM parser name space issue

Posted by "Xiang Gao (JIRA)" <xa...@xml.apache.org>.
    [ http://issues.apache.org/jira/browse/XALANJ-2174?page=comments#action_12316129 ] 

Xiang Gao commented on XALANJ-2174:
-----------------------------------

Actually we did try the newer version Xalan by using JDK endorsed mechanism to let the new version Xalan override the one packaged in the JDK, unfortunately it didn't work for our system. So we have to use our current(older) version Xalan, the Manifest-Version is 1.0

We discussed with SUN, they said it is Xalan issue. We also found the problem is the XPath doesn't work as we expected. That is why we report the issue to Apache.

> DOM parser name space issue
> ---------------------------
>
>          Key: XALANJ-2174
>          URL: http://issues.apache.org/jira/browse/XALANJ-2174
>      Project: XalanJ2
>         Type: Bug
>   Components: XPath
>  Environment: Operating System: Windows 2K
>     Reporter: Xiang Gao
>  Attachments: DomParsing.java, sample.xml
>
> I am currently working on a XML file parse problem when doing migration our system from jdk1.3.1 to jdk1.4.2. 
> The scenario is 
> 1. Turn off the namespace aware feature of the DOM parser
> 2. Try to parse a XML file with name space. 
> I use two environments to do the testing. One is jdk1.3.1+xalan.jar+xerces.jar, the other one is jdk1.4.2+xerces.jar. The xalan version is 1.0, the xerces version is 1.0. The expected result is the parser just ignores the name space and parses the XML file properly.
> I created a program to demonstrate the defect, basically the program does the following:
> ·	Read a sample xml file in (with Namespace information).
> ·	Create a DOM parser
> ·	Set the namespace feature as false, parse the file 
> ·	Get the ("Header") node using XPath
> ·	Write the value of the Header note out to the console.
> A) Test using jdk131_08 and our current xalan.jar and xerces.jar.
> The results were the following
> 1) Compile the file successfully using the following command:
> C:\ jdk131_08\bin\javac -classpath .;C:\temp\lib\xalan.jar;C:\temp\lib\xerces.jar  DomParsing.java
> 2) Run the program using the following script:
> setlocal
> set cp=%cp%;/temp/lib/xerces.jar
> set cp=%cp%;/temp/lib/xalan.jar
> C:\ jdk131_08\bin\java -cp %cp% xml.DomParsing
> endlocal
> 3) Output result is (using this system out statement: System.out.println("header [" + header + "]");):
> header [[test:Header: null]]
> The test is successful as the Header node in this case is not null (The null shown here is the node value, Header does not have a value)
> B) Test using jdk142_05 and our current xerces.jar. 
> 1) Compile the file successfully using the following command:
> C:\ jdk142_05 \bin\javac -classpath .;C:\temp\lib\xerces.jar  DomParsing.java
> 2) Run the program using the following script:
> setlocal
> set cp=%cp%;/temp/lib/xerces.jar
> C:\jdk142_05\bin\java -cp %cp% xml.DomParsing
> endlocal
> 3) Output result is (using this system out statement: System.out.println("header [" + header + "]");):
> header [null]
> The test is a failure as the Header node in this case is null.
> The actual result seems the DOM parser just doesn't recognize the name space feature has been set to false.

-- 
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-2174) DOM parser name space issue

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

Brian Minchau updated XALANJ-2174:
----------------------------------

    Fix Version: 2.7

> DOM parser name space issue
> ---------------------------
>
>          Key: XALANJ-2174
>          URL: http://issues.apache.org/jira/browse/XALANJ-2174
>      Project: XalanJ2
>         Type: Bug
>   Components: XPath
>  Environment: Operating System: Windows 2K
>     Reporter: Xiang Gao
>      Fix For: 2.7
>  Attachments: DomParsing.java, sample.xml, xalan.jar
>
> I am currently working on a XML file parse problem when doing migration our system from jdk1.3.1 to jdk1.4.2. 
> The scenario is 
> 1. Turn off the namespace aware feature of the DOM parser
> 2. Try to parse a XML file with name space. 
> I use two environments to do the testing. One is jdk1.3.1+xalan.jar+xerces.jar, the other one is jdk1.4.2+xerces.jar. The xalan version is 1.0, the xerces version is 1.0. The expected result is the parser just ignores the name space and parses the XML file properly.
> I created a program to demonstrate the defect, basically the program does the following:
> ·	Read a sample xml file in (with Namespace information).
> ·	Create a DOM parser
> ·	Set the namespace feature as false, parse the file 
> ·	Get the ("Header") node using XPath
> ·	Write the value of the Header note out to the console.
> A) Test using jdk131_08 and our current xalan.jar and xerces.jar.
> The results were the following
> 1) Compile the file successfully using the following command:
> C:\ jdk131_08\bin\javac -classpath .;C:\temp\lib\xalan.jar;C:\temp\lib\xerces.jar  DomParsing.java
> 2) Run the program using the following script:
> setlocal
> set cp=%cp%;/temp/lib/xerces.jar
> set cp=%cp%;/temp/lib/xalan.jar
> C:\ jdk131_08\bin\java -cp %cp% xml.DomParsing
> endlocal
> 3) Output result is (using this system out statement: System.out.println("header [" + header + "]");):
> header [[test:Header: null]]
> The test is successful as the Header node in this case is not null (The null shown here is the node value, Header does not have a value)
> B) Test using jdk142_05 and our current xerces.jar. 
> 1) Compile the file successfully using the following command:
> C:\ jdk142_05 \bin\javac -classpath .;C:\temp\lib\xerces.jar  DomParsing.java
> 2) Run the program using the following script:
> setlocal
> set cp=%cp%;/temp/lib/xerces.jar
> C:\jdk142_05\bin\java -cp %cp% xml.DomParsing
> endlocal
> 3) Output result is (using this system out statement: System.out.println("header [" + header + "]");):
> header [null]
> The test is a failure as the Header node in this case is null.
> The actual result seems the DOM parser just doesn't recognize the name space feature has been set to false.

-- 
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-2174) DOM parser name space issue

Posted by "Xiang Gao (JIRA)" <xa...@xml.apache.org>.
    [ http://issues.apache.org/jira/browse/XALANJ-2174?page=comments#action_12316268 ] 

Xiang Gao commented on XALANJ-2174:
-----------------------------------

Can you don't close the bug, please? Actually we we are NOT using XSLT, we are trying to traverse the DOM Tree using XPATH.

I totally understand that the transformation language of JAXP provides elements that define rules for how one XML document is transformed into another XML document, but we don't use it in deed, we just use the DOM parser in Xalan. The fact is the DOM parser of new version Xalan ignores the namespace feature set as "false".

Also, we don't mind using the newest version Xalan as long as it provides the same functionalities, and we tried to use endorsed mechanism to do the test, it failed. So we want to know why the new version xalan doesn't work but the old version works well?



> DOM parser name space issue
> ---------------------------
>
>          Key: XALANJ-2174
>          URL: http://issues.apache.org/jira/browse/XALANJ-2174
>      Project: XalanJ2
>         Type: Bug
>   Components: XPath
>  Environment: Operating System: Windows 2K
>     Reporter: Xiang Gao
>  Attachments: DomParsing.java, sample.xml, xalan.jar
>
> I am currently working on a XML file parse problem when doing migration our system from jdk1.3.1 to jdk1.4.2. 
> The scenario is 
> 1. Turn off the namespace aware feature of the DOM parser
> 2. Try to parse a XML file with name space. 
> I use two environments to do the testing. One is jdk1.3.1+xalan.jar+xerces.jar, the other one is jdk1.4.2+xerces.jar. The xalan version is 1.0, the xerces version is 1.0. The expected result is the parser just ignores the name space and parses the XML file properly.
> I created a program to demonstrate the defect, basically the program does the following:
> ·	Read a sample xml file in (with Namespace information).
> ·	Create a DOM parser
> ·	Set the namespace feature as false, parse the file 
> ·	Get the ("Header") node using XPath
> ·	Write the value of the Header note out to the console.
> A) Test using jdk131_08 and our current xalan.jar and xerces.jar.
> The results were the following
> 1) Compile the file successfully using the following command:
> C:\ jdk131_08\bin\javac -classpath .;C:\temp\lib\xalan.jar;C:\temp\lib\xerces.jar  DomParsing.java
> 2) Run the program using the following script:
> setlocal
> set cp=%cp%;/temp/lib/xerces.jar
> set cp=%cp%;/temp/lib/xalan.jar
> C:\ jdk131_08\bin\java -cp %cp% xml.DomParsing
> endlocal
> 3) Output result is (using this system out statement: System.out.println("header [" + header + "]");):
> header [[test:Header: null]]
> The test is successful as the Header node in this case is not null (The null shown here is the node value, Header does not have a value)
> B) Test using jdk142_05 and our current xerces.jar. 
> 1) Compile the file successfully using the following command:
> C:\ jdk142_05 \bin\javac -classpath .;C:\temp\lib\xerces.jar  DomParsing.java
> 2) Run the program using the following script:
> setlocal
> set cp=%cp%;/temp/lib/xerces.jar
> C:\jdk142_05\bin\java -cp %cp% xml.DomParsing
> endlocal
> 3) Output result is (using this system out statement: System.out.println("header [" + header + "]");):
> header [null]
> The test is a failure as the Header node in this case is null.
> The actual result seems the DOM parser just doesn't recognize the name space feature has been set to false.

-- 
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] Resolved: (XALANJ-2174) DOM parser name space issue

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

    Resolution: Invalid

> DOM parser name space issue
> ---------------------------
>
>          Key: XALANJ-2174
>          URL: http://issues.apache.org/jira/browse/XALANJ-2174
>      Project: XalanJ2
>         Type: Bug
>   Components: XPath
>  Environment: Operating System: Windows 2K
>     Reporter: Xiang Gao
>  Attachments: DomParsing.java, sample.xml, xalan.jar
>
> I am currently working on a XML file parse problem when doing migration our system from jdk1.3.1 to jdk1.4.2. 
> The scenario is 
> 1. Turn off the namespace aware feature of the DOM parser
> 2. Try to parse a XML file with name space. 
> I use two environments to do the testing. One is jdk1.3.1+xalan.jar+xerces.jar, the other one is jdk1.4.2+xerces.jar. The xalan version is 1.0, the xerces version is 1.0. The expected result is the parser just ignores the name space and parses the XML file properly.
> I created a program to demonstrate the defect, basically the program does the following:
> ·	Read a sample xml file in (with Namespace information).
> ·	Create a DOM parser
> ·	Set the namespace feature as false, parse the file 
> ·	Get the ("Header") node using XPath
> ·	Write the value of the Header note out to the console.
> A) Test using jdk131_08 and our current xalan.jar and xerces.jar.
> The results were the following
> 1) Compile the file successfully using the following command:
> C:\ jdk131_08\bin\javac -classpath .;C:\temp\lib\xalan.jar;C:\temp\lib\xerces.jar  DomParsing.java
> 2) Run the program using the following script:
> setlocal
> set cp=%cp%;/temp/lib/xerces.jar
> set cp=%cp%;/temp/lib/xalan.jar
> C:\ jdk131_08\bin\java -cp %cp% xml.DomParsing
> endlocal
> 3) Output result is (using this system out statement: System.out.println("header [" + header + "]");):
> header [[test:Header: null]]
> The test is successful as the Header node in this case is not null (The null shown here is the node value, Header does not have a value)
> B) Test using jdk142_05 and our current xerces.jar. 
> 1) Compile the file successfully using the following command:
> C:\ jdk142_05 \bin\javac -classpath .;C:\temp\lib\xerces.jar  DomParsing.java
> 2) Run the program using the following script:
> setlocal
> set cp=%cp%;/temp/lib/xerces.jar
> C:\jdk142_05\bin\java -cp %cp% xml.DomParsing
> endlocal
> 3) Output result is (using this system out statement: System.out.println("header [" + header + "]");):
> header [null]
> The test is a failure as the Header node in this case is null.
> The actual result seems the DOM parser just doesn't recognize the name space feature has been set to false.

-- 
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-2174) DOM parser name space issue

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

Xiang Gao updated XALANJ-2174:
------------------------------

    Attachment: xalan.jar

> DOM parser name space issue
> ---------------------------
>
>          Key: XALANJ-2174
>          URL: http://issues.apache.org/jira/browse/XALANJ-2174
>      Project: XalanJ2
>         Type: Bug
>   Components: XPath
>  Environment: Operating System: Windows 2K
>     Reporter: Xiang Gao
>  Attachments: DomParsing.java, sample.xml, xalan.jar
>
> I am currently working on a XML file parse problem when doing migration our system from jdk1.3.1 to jdk1.4.2. 
> The scenario is 
> 1. Turn off the namespace aware feature of the DOM parser
> 2. Try to parse a XML file with name space. 
> I use two environments to do the testing. One is jdk1.3.1+xalan.jar+xerces.jar, the other one is jdk1.4.2+xerces.jar. The xalan version is 1.0, the xerces version is 1.0. The expected result is the parser just ignores the name space and parses the XML file properly.
> I created a program to demonstrate the defect, basically the program does the following:
> ·	Read a sample xml file in (with Namespace information).
> ·	Create a DOM parser
> ·	Set the namespace feature as false, parse the file 
> ·	Get the ("Header") node using XPath
> ·	Write the value of the Header note out to the console.
> A) Test using jdk131_08 and our current xalan.jar and xerces.jar.
> The results were the following
> 1) Compile the file successfully using the following command:
> C:\ jdk131_08\bin\javac -classpath .;C:\temp\lib\xalan.jar;C:\temp\lib\xerces.jar  DomParsing.java
> 2) Run the program using the following script:
> setlocal
> set cp=%cp%;/temp/lib/xerces.jar
> set cp=%cp%;/temp/lib/xalan.jar
> C:\ jdk131_08\bin\java -cp %cp% xml.DomParsing
> endlocal
> 3) Output result is (using this system out statement: System.out.println("header [" + header + "]");):
> header [[test:Header: null]]
> The test is successful as the Header node in this case is not null (The null shown here is the node value, Header does not have a value)
> B) Test using jdk142_05 and our current xerces.jar. 
> 1) Compile the file successfully using the following command:
> C:\ jdk142_05 \bin\javac -classpath .;C:\temp\lib\xerces.jar  DomParsing.java
> 2) Run the program using the following script:
> setlocal
> set cp=%cp%;/temp/lib/xerces.jar
> C:\jdk142_05\bin\java -cp %cp% xml.DomParsing
> endlocal
> 3) Output result is (using this system out statement: System.out.println("header [" + header + "]");):
> header [null]
> The test is a failure as the Header node in this case is null.
> The actual result seems the DOM parser just doesn't recognize the name space feature has been set to false.

-- 
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-2174) DOM parser name space issue

Posted by "Xiang Gao (JIRA)" <xa...@xml.apache.org>.
    [ http://issues.apache.org/jira/browse/XALANJ-2174?page=comments#action_12316145 ] 

Xiang Gao commented on XALANJ-2174:
-----------------------------------

The version of Xalan we are using should be 2.2 (I was wrong in my previous inputs). Also I attach the jar file. Thanks.

> DOM parser name space issue
> ---------------------------
>
>          Key: XALANJ-2174
>          URL: http://issues.apache.org/jira/browse/XALANJ-2174
>      Project: XalanJ2
>         Type: Bug
>   Components: XPath
>  Environment: Operating System: Windows 2K
>     Reporter: Xiang Gao
>  Attachments: DomParsing.java, sample.xml, xalan.jar
>
> I am currently working on a XML file parse problem when doing migration our system from jdk1.3.1 to jdk1.4.2. 
> The scenario is 
> 1. Turn off the namespace aware feature of the DOM parser
> 2. Try to parse a XML file with name space. 
> I use two environments to do the testing. One is jdk1.3.1+xalan.jar+xerces.jar, the other one is jdk1.4.2+xerces.jar. The xalan version is 1.0, the xerces version is 1.0. The expected result is the parser just ignores the name space and parses the XML file properly.
> I created a program to demonstrate the defect, basically the program does the following:
> ·	Read a sample xml file in (with Namespace information).
> ·	Create a DOM parser
> ·	Set the namespace feature as false, parse the file 
> ·	Get the ("Header") node using XPath
> ·	Write the value of the Header note out to the console.
> A) Test using jdk131_08 and our current xalan.jar and xerces.jar.
> The results were the following
> 1) Compile the file successfully using the following command:
> C:\ jdk131_08\bin\javac -classpath .;C:\temp\lib\xalan.jar;C:\temp\lib\xerces.jar  DomParsing.java
> 2) Run the program using the following script:
> setlocal
> set cp=%cp%;/temp/lib/xerces.jar
> set cp=%cp%;/temp/lib/xalan.jar
> C:\ jdk131_08\bin\java -cp %cp% xml.DomParsing
> endlocal
> 3) Output result is (using this system out statement: System.out.println("header [" + header + "]");):
> header [[test:Header: null]]
> The test is successful as the Header node in this case is not null (The null shown here is the node value, Header does not have a value)
> B) Test using jdk142_05 and our current xerces.jar. 
> 1) Compile the file successfully using the following command:
> C:\ jdk142_05 \bin\javac -classpath .;C:\temp\lib\xerces.jar  DomParsing.java
> 2) Run the program using the following script:
> setlocal
> set cp=%cp%;/temp/lib/xerces.jar
> C:\jdk142_05\bin\java -cp %cp% xml.DomParsing
> endlocal
> 3) Output result is (using this system out statement: System.out.println("header [" + header + "]");):
> header [null]
> The test is a failure as the Header node in this case is null.
> The actual result seems the DOM parser just doesn't recognize the name space feature has been set to false.

-- 
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-2174) DOM parser name space issue

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

Xiang Gao updated XALANJ-2174:
------------------------------

    Attachment: DomParsing.java

> DOM parser name space issue
> ---------------------------
>
>          Key: XALANJ-2174
>          URL: http://issues.apache.org/jira/browse/XALANJ-2174
>      Project: XalanJ2
>         Type: Bug
>   Components: XPath
>  Environment: Operating System: Windows 2K
>     Reporter: Xiang Gao
>  Attachments: DomParsing.java, sample.xml
>
> I am currently working on a XML file parse problem when doing migration our system from jdk1.3.1 to jdk1.4.2. 
> The scenario is 
> 1. Turn off the namespace aware feature of the DOM parser
> 2. Try to parse a XML file with name space. 
> I use two environments to do the testing. One is jdk1.3.1+xalan.jar+xerces.jar, the other one is jdk1.4.2+xerces.jar. The xalan version is 1.0, the xerces version is 1.0. The expected result is the parser just ignores the name space and parses the XML file properly.
> I created a program to demonstrate the defect, basically the program does the following:
> ·	Read a sample xml file in (with Namespace information).
> ·	Create a DOM parser
> ·	Set the namespace feature as false, parse the file 
> ·	Get the ("Header") node using XPath
> ·	Write the value of the Header note out to the console.
> A) Test using jdk131_08 and our current xalan.jar and xerces.jar.
> The results were the following
> 1) Compile the file successfully using the following command:
> C:\ jdk131_08\bin\javac -classpath .;C:\temp\lib\xalan.jar;C:\temp\lib\xerces.jar  DomParsing.java
> 2) Run the program using the following script:
> setlocal
> set cp=%cp%;/temp/lib/xerces.jar
> set cp=%cp%;/temp/lib/xalan.jar
> C:\ jdk131_08\bin\java -cp %cp% xml.DomParsing
> endlocal
> 3) Output result is (using this system out statement: System.out.println("header [" + header + "]");):
> header [[test:Header: null]]
> The test is successful as the Header node in this case is not null (The null shown here is the node value, Header does not have a value)
> B) Test using jdk142_05 and our current xerces.jar. 
> 1) Compile the file successfully using the following command:
> C:\ jdk142_05 \bin\javac -classpath .;C:\temp\lib\xerces.jar  DomParsing.java
> 2) Run the program using the following script:
> setlocal
> set cp=%cp%;/temp/lib/xerces.jar
> C:\jdk142_05\bin\java -cp %cp% xml.DomParsing
> endlocal
> 3) Output result is (using this system out statement: System.out.println("header [" + header + "]");):
> header [null]
> The test is a failure as the Header node in this case is null.
> The actual result seems the DOM parser just doesn't recognize the name space feature has been set to false.

-- 
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-2174) DOM parser name space issue

Posted by "Christine Li (JIRA)" <xa...@xml.apache.org>.
    [ http://issues.apache.org/jira/browse/XALANJ-2174?page=comments#action_12316160 ] 

Christine Li commented on XALANJ-2174:
--------------------------------------

The latest code of xalan supports JAXP 1.3. In Chapter 9 DOMSource of the spec., it says "Note that XSLT requires namespace support. Attempting to transform a DOM that was not contructed with a namespaceaware parser may result in errors.".  The same for SAXSource. I am going to close it as an invalid bug.

> DOM parser name space issue
> ---------------------------
>
>          Key: XALANJ-2174
>          URL: http://issues.apache.org/jira/browse/XALANJ-2174
>      Project: XalanJ2
>         Type: Bug
>   Components: XPath
>  Environment: Operating System: Windows 2K
>     Reporter: Xiang Gao
>  Attachments: DomParsing.java, sample.xml, xalan.jar
>
> I am currently working on a XML file parse problem when doing migration our system from jdk1.3.1 to jdk1.4.2. 
> The scenario is 
> 1. Turn off the namespace aware feature of the DOM parser
> 2. Try to parse a XML file with name space. 
> I use two environments to do the testing. One is jdk1.3.1+xalan.jar+xerces.jar, the other one is jdk1.4.2+xerces.jar. The xalan version is 1.0, the xerces version is 1.0. The expected result is the parser just ignores the name space and parses the XML file properly.
> I created a program to demonstrate the defect, basically the program does the following:
> ·	Read a sample xml file in (with Namespace information).
> ·	Create a DOM parser
> ·	Set the namespace feature as false, parse the file 
> ·	Get the ("Header") node using XPath
> ·	Write the value of the Header note out to the console.
> A) Test using jdk131_08 and our current xalan.jar and xerces.jar.
> The results were the following
> 1) Compile the file successfully using the following command:
> C:\ jdk131_08\bin\javac -classpath .;C:\temp\lib\xalan.jar;C:\temp\lib\xerces.jar  DomParsing.java
> 2) Run the program using the following script:
> setlocal
> set cp=%cp%;/temp/lib/xerces.jar
> set cp=%cp%;/temp/lib/xalan.jar
> C:\ jdk131_08\bin\java -cp %cp% xml.DomParsing
> endlocal
> 3) Output result is (using this system out statement: System.out.println("header [" + header + "]");):
> header [[test:Header: null]]
> The test is successful as the Header node in this case is not null (The null shown here is the node value, Header does not have a value)
> B) Test using jdk142_05 and our current xerces.jar. 
> 1) Compile the file successfully using the following command:
> C:\ jdk142_05 \bin\javac -classpath .;C:\temp\lib\xerces.jar  DomParsing.java
> 2) Run the program using the following script:
> setlocal
> set cp=%cp%;/temp/lib/xerces.jar
> C:\jdk142_05\bin\java -cp %cp% xml.DomParsing
> endlocal
> 3) Output result is (using this system out statement: System.out.println("header [" + header + "]");):
> header [null]
> The test is a failure as the Header node in this case is null.
> The actual result seems the DOM parser just doesn't recognize the name space feature has been set to false.

-- 
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