Leon945
08-27-2010, 06:48 PM
Hello,
Im kind of new to xpath, so this might have a simple solution..
Im trying to transform an xml documento into another using xsl..
this is my original xml document:
<?xml version="1.0" encoding="UTF-8"?>
<systemResponse uid="a127366s62242081" xmlns="http://mpowerlabs.com/jetphire/external/1">
<responseCode>0</responseCode>
</systemResponse>
this is my XSL ..
<Message xsl:version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<ContentType></ContentType>
<ResourceName></ResourceName>
<Security></Security>
<Report>
<ValueList>
<Value>
<Attribute1><xsl:value-of select="/systemResponse/responseCode"/></Attribute1>
</Value>
</ValueList>
</Report>
</Message>
Im using an apache library to do the transformation..
The problem is, its not placing any value inside the attribute1 tag.
I noticed that if a i remove the attributes (uid,xmlns) from the systemResponse root tag, so that its like this
<?xml version="1.0" encoding="UTF-8"?>
<systemResponse>
<responseCode>0</responseCode>
</systemResponse>
it works.. it places the "0" inside the attribute1 tag..
whats going on here.. what can i do?
thanks in advance..
Im kind of new to xpath, so this might have a simple solution..
Im trying to transform an xml documento into another using xsl..
this is my original xml document:
<?xml version="1.0" encoding="UTF-8"?>
<systemResponse uid="a127366s62242081" xmlns="http://mpowerlabs.com/jetphire/external/1">
<responseCode>0</responseCode>
</systemResponse>
this is my XSL ..
<Message xsl:version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<ContentType></ContentType>
<ResourceName></ResourceName>
<Security></Security>
<Report>
<ValueList>
<Value>
<Attribute1><xsl:value-of select="/systemResponse/responseCode"/></Attribute1>
</Value>
</ValueList>
</Report>
</Message>
Im using an apache library to do the transformation..
The problem is, its not placing any value inside the attribute1 tag.
I noticed that if a i remove the attributes (uid,xmlns) from the systemResponse root tag, so that its like this
<?xml version="1.0" encoding="UTF-8"?>
<systemResponse>
<responseCode>0</responseCode>
</systemResponse>
it works.. it places the "0" inside the attribute1 tag..
whats going on here.. what can i do?
thanks in advance..