Assign default namespace to XML fragment using XQuery

Hi everybody!
I need to add a default namespace declaration to a XML fragment using XQuery. I wrote following statement to assign fragment to $body:
<soap-env:Body>{
fn-bea:inlinedXML($content/text())}
</soap-env:Body>
The problem is "$content/text()" has no namespace declaration so I need to assign a default namespace (xmlns="") to it in order to apply some XQuery transformations to its content.
I know this can be easily done with a XSLT but I would like use XQuery instead.
Could anyone tell me how I could perform this task?
Thank you in advance,
Daniel.

Re: xquery function - send namespace as binding variable and define it in a tag

Similar Messages

  • Removing Default Namespaces from XML

    Hi All,
    I am having a situation where I can't remove the default
    namespace from XML mainly
    because there is no namespace prefix.
    I hope this code snipped makes better sense.
    function test():void
    document:XML =
    <test xmlns:soap="
    http://example.com" xmlns="
    http://swanmokshi.com">
    <item>peter</item>
    <item>jenny</item>
    <item>JK Angel</item>
    <test>
    // I can remove the soap namespace by doing the following
    soap:Namespace = document.namespace("soap");
    document.removeNamespace(soap).
    Alert.show(document.toXMLString()); // should now display
    the xml document without the soap namespace
    Note that removing the soap namespace is easy because of the
    first namespace is named "soap". How do
    I removed the unnamed namespace, xmlns="
    http://swanmokshi.com" ?
    regards,
    Arun

    Same problem for me.
    XPath expression failed to execute. Error while processing xpath expression, the expression is "ora:processXSLT("Transformation_2.xsl", bpws:getVariableData("PartyID", "Header"))", the reason is Character reference "&#24" is an invalid XML character.. Please verify the xpath query.
    I am getting the date from Oracle Advanced Queue

  • Convertion of String to XML node using Xquery transformation in OSB

    How to convert string to XML node elementusing a built in function using Xquery transformation in OSB?

    check this out - http://www.javamonamour.org/2011/06/fn-beainlinedxml.html
    if in SOA (BPEL & Mediator) you can use oraext:parseXML.
    you should thoroughly analyse where to implement your requirement as some good practices advise to implement more complex logic in SOA and leave OSB to only connect to the services' endpoints.
    Hope this helps,
    A.

  • How To Store XML Fragments Using Functions Such As XMLElement

    Hi
    Not sure what I am missing. I wish to store XML fragments in variables so can pass around and concatenate with other fragments to make final XML document. Even before attempting to concatenate XML fragments, I am struggling to store any XML fragment in a variable. I am trying to use simple functions such as XMLElement to generate XML so can store in variable. I have seen many examples of XMLElement in SQL select statement. Can XMLElement be used in plsql? XMLElement says it returns value of type XMLType. Functions such as XMLElement make generating XML easier than creating all tags manually.
    Below is simple example that demonstrates what I would like to do. I would like to be able to pass the XML fragment as either XMLType or clob. I receive error saying PLS-00201: identifier 'XMLELEMENT' must be declared
    declare
    vTheData XMLType;
    vTheDataClob clob;
    begin
      vTheData:= XMLelement("empno",'1234567');
      vTheDataClob:= xmlelement("empno",'1234567').getclobval();
    end;
    Where as I can use below, but surely don't have to use select into from dual method. I just expect can use XMLElement function in plsql same as sql, such as most other functions eg length, rtrim etc.
    declare
    vTheData XMLType;
    vTheDataClob clob;
    begin
      select xmlelement("empno",'1234567')
      into vTheData
      from dual;
      select xmlelement("empno",'1234567').getclobval()
      into vTheDataClob
      from dual;
    end;
    Hope this makes sense.
    Thanks

    Having said that, is there a more elegant way to achieve below. That is populate two XML fragments and concatenate together.
    Sure, why not just only one statement?
    select XMLConcat(
             XMLElement( ... )
           , XMLElement( ... )
    into vTheResult
    from dual;
    As a second question, is it better to build and pass XML fragments as XMLType or clob?
    I would say stay with XMLType but it depends on your requirement.
    I generally avoid passing around pieces of data, SQL/XML functions are powerful in the way they can be used with set operations, so using them in a piecewise approach kinda negates what they're for.

  • Not allows to assign default value to input field using values in datastore

    Hi Masters,
    Consider that I have one input field in a form. I should assign default value to it. I should assign to it, the value which i have stored in a datastore. When i run the application, if i give default value as 123 ,then it is working fine i.e., it is showing 123 in the textfield in form , but if i give the default value as STORE@ProductId, then it is not displaying that value in the form.
    Please help me out.
    Thanks & Regards,
    Kaushik Sreeram

    Hi,
    i faced this problem and here's what i concluded:
    There's no way you can set default value for input field dynamicly, since the default value of input control is caculated only once (i think on initializing of the iView). The input control and the data store are initialized at the same time, STORE@productID is empty that time...
    If you don't need to recieve value through the input field you're trying to initialize, but just to display the value from the store - I suggest you try using another control - Expression Box. It's value is calculated continiously, just like the Label's, and you can refere to it later.
    Regards,
    Yulia

  • Select data as table from xml string using xquery.

    Hi ,
    I have this xml 
    declare @xml xml
    set @xml =' <StudentsData>
    <StudentData>
    <id>1</id>
    <subjects>
    <subject>
    <subid>1</subid>
    <marks>30</marks>
    </subject>
    <subject>
    <subid>2</subid>
    <marks>40</marks>
    </subject>
    </subjects>
    </StudentData>
    <StudentData>
    <id>2</id>
    <subjects>
    <subject>
    <subid>1</subid>
    <marks>30</marks>
    </subject>
    <subject>
    <subid>2</subid>
    <marks>40</marks>
    </subject>
    </subjects>
    </StudentData>
    </StudentsData>'
    select @xml
    I wan the output to be shown as
    id subid marks
    1 1 30
    1 2 40
    2 1 30
    2 2 40
    how can i do this using XQUERY in sqlserver ?.
    Thanks in advance for any help.

    how can i do this using XQUERY in sqlserver ?
    Sure you can and it's easy:
    declare @xml xml
    set @xml =' <StudentsData>
    <StudentData>
    <id>1</id>
    <subjects>
    <subject>
    <subid>1</subid>
    <marks>30</marks>
    </subject>
    <subject>
    <subid>2</subid>
    <marks>40</marks>
    </subject>
    </subjects>
    </StudentData>
    <StudentData>
    <id>2</id>
    <subjects>
    <subject>
    <subid>1</subid>
    <marks>30</marks>
    </subject>
    <subject>
    <subid>2</subid>
    <marks>40</marks>
    </subject>
    </subjects>
    </StudentData>
    </StudentsData>'
    select students.Rows.value('subid[1]', 'int') AS id
    ,students.Rows.value('marks[1]', 'int') AS marks
    FROM @xml.nodes('/StudentsData/StudentData/subjects/subject') AS students(Rows)
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • How to Get and Update properties values from XML tag Using Xquery or PL Sql

    Hi
    I have this tag
    <Solicitud Pais = "1">
    How i can get Pais value?
    How i can update Pais Value?
    Y can use Xquery funtions or PL SQL for this?
    Thak's
    Angel

    How i can get Pais value? ExtractValue
    How i can update Pais Value?UpdateXML
    Y can use Xquery funtions or PL SQL for this?Yes
    Without knowing more about your requirements, where information resides, or even a version of Oracle, that is the best I'll do.

  • Append an XML Fragment using powershell

    I m running into an issues appending an xml attribute fragment. I had this working but now im getting the below errors. Below is the default xml structure and I want to add items under the Assignments node.
    <?xml version="1.0"?>
    <Database>
    <Info>
    <Name>FinalTest</Name>
    <TotalComputers>759</TotalComputers>
    <Assigned>0</Assigned>
    <Unassigned>759</Unassigned>
    </Info>
    <Assignments/>
    </Database>
    My Code:
    [XML]$xml = Get-Content "C:\Users\shuppz\Desktop\FinalTest.xml"
    $txt = @"
    <Assignment>
    <File>First_Last.xlsx</File>
    <Computers>Computer1, Computer2, Computer3</Computers>
    <Assigned>12/12/1212</Assigned>
    <Due>12/21/1212</Due>
    </Assignment>
    $xmlFragment=$xml.CreateDocumentFragment($txt)
    $node=$xml.SelectSingleNode('//Assignments')
    $node.AppendChild($xmlFragment)
    The Errors:
    Cannot find an overload for "CreateDocumentFragment" and the argument count: "1".
    At line:12 char:1
    + $xmlFragment=$xml.CreateDocumentFragment($txt)
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [], MethodException
    + FullyQualifiedErrorId : MethodCountCouldNotFindBest
    Exception calling "AppendChild" with "1" argument(s): "Object reference not set to an instance of
    an object."
    At line:14 char:1
    + $node.AppendChild($xmlFragment)
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : DotNetMethodException
    If I do $XML | GM I see that CreateDocumentFragment, if someone could show me what im doing wrong. Im sure im missing something simple.

    Okay. I test that out and it work but the formatting is thrown off a little. do you know if there would be a way to fix that?
    <?xml version="1.0"?>
    <Database>
    <Info>
    <Name>FinalTest</Name>
    <TotalComputers>759</TotalComputers>
    <Assigned>0</Assigned>
    <Unassigned>759</Unassigned>
    </Info>
    <Assignments> <Assignment>
    <File>First_Last.xlsx</File>
    <Computers>Computer1, Computer2, Computer3</Computers>
    <Assigned>12/12/1212</Assigned>
    <Due>12/21/1212</Due>
    </Assignment></Assignments>
    </Database>

  • Inserting Namespace in XML document using 4.6C(no XLST)

    Hi all,
    I'm writing a program in which I need to convert data into XML, all this works fine using CL_XML_DOCUMENT.Create_With_Data. I was also able to insert the encoding as asked by the EAI tool who will interpret the XML file I have generated. Now they have returned to me, saying they also need the <b>following</b> tag:
    <FILE>
            <b><asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
                    <asx:values></b>                        <CONTROL>
                            </CONTROL>
                            <DNB>
                            </DNB>
    <b>               </asx:values>
            </asx:abap></b></FILE>
    I have read about this on SDN and found several posts in which people using 4.7(CALL TRANSFORMATION) are asking to get rid of that tag, but not how to insert it without the use of XSLT.
    I have already tried the following:
      call method l_dom->set_attribute(
      name = 'xmlns:asx'
      value = 'http://www.sap.com/abapxml version=1.0' ).
    This however is not giving the expected result, if someone can help me with this, I would be very gratefull.
    In the meantime I continue trying.
    Thanks in advance

    hi, before you set the attribute, you need to create a Namespace element preliminary.
    Try the following code:
    ELEMENT = DOCUMENT->CREATE_SIMPLE_ELEMENT_NS(
    NAME = 'abap'
    PREFIX = 'asx'
    PARENT = DOCUMENT ).
    ATTRIBUTE = DOCUMENT->create_namespace_decl(
    NAME = 'XMLNS'
    PREFIX = 'asx'
    URI = 'http://www.sap.com/abapxml').
    ELEMENT->SET_ATTRIBUTE_NODE_NS(
    NEW_ATTR = ATTRIBUTE).
    Hope my reply will be useful.
    thanks

  • How to remove element namespaces in XML file using DOM or SAX?

    Hi Guys,
    I developed a JAVA mapping in XI to add name spaces for XML file, after mapping,name spaces xmlns="http://www.mro.com/mx/integration" and xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" were added correctly, but for some nodes, such as <Header> and <Content>, a name space xmlns="" was added automatically.Please check below files to compare.
    It looks like be added automatically by XI. I didn't process anything for these nodes in JAVA program.
    Now the issue is, how can I remove these redundant namespaces? Such as xmlns="".
    Can I remove them using DOM or SAX in JAVA Mapping?
    Thanks in advance.
    ====>Original XML file
    <?xml version="1.0" encoding="UTF-8"?>
    <LLYLPPInterface language="EN">
       <Header>
          <SenderID>GBIP</SenderID>
          <CreationDateTime>2008-02-13T22:49:34-05:00</CreationDateTime>
          <RecipientID/>
          <MessageID/>
       </Header>
       <Content>
          <LLY-LPP>
             <INVOICE>
                <INVOICELINE>
                   <PONUM>4780000008</PONUM>
                   <POLINENUM>1</POLINENUM>
                   <INVOICEQTY>1</INVOICEQTY>
                   <LOADEDCOST>68</LOADEDCOST>
                </INVOICELINE>
             </INVOICE>
          </LLY-LPP>
       </Content>
    </LLYLPPInterface>
    ===>Target XML file after JAVA mapping
    <?xml version="1.0" encoding="utf-8"?>
    <LLYLPPInterface language="EN" xmlns="http://www.mro.com/mx/integration" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
         <Header xmlns="">
              <SenderID>GBIP</SenderID>
              <CreationDateTime>2008-02-13T23:11:55-05:00</CreationDateTime>
              <RecipientID/>
              <MessageID/>
         </Header>
         <Content xmlns="">
              <LLY-LPP>
                   <INVOICE>
                        <INVOICELINE>
                             <PONUM>4780000008</PONUM>
                             <POLINENUM>0</POLINENUM>
                             <INVOICEQTY>1</INVOICEQTY>
                             <LOADEDCOST>68</LOADEDCOST>
                        </INVOICELINE>
                   </INVOICE>
              </LLY-LPP>
         </Content>
    </LLYLPPInterface>
    Edited by: Eddie Zhang on Feb 14, 2008 9:22 AM
    Edited by: Eddie Zhang on Feb 14, 2008 9:24 AM

    Hi Milan,
    Thanks for your replay.
    Actually when I used module XMLAnonymizerBean to convert namespaces, the header of XML, such as <?xml version="1.0" encoding="UTF-8"?> was converted to format <?xml version='1.0' encoding='UTF-8'?>, quote was converted to single quote. Although I set parameter anonymizer.quote = ", it still didn't work, single quote appeared instead of quote.
    I'm not sure why this happened. Can anyone help to clarify this?
    Thanks
    Edited by: Eddie Zhang on Feb 15, 2008 2:11 AM

  • Convertion of XML node to string using Xquery transformation in OSB

    How to convert XML node to string using a built in function using Xquery transformation in OSB? In BPEL we have the Xpath extension function ora:getContentAsString() to do the same.

    fn:bea-serialize() function converts xml node to string. but it assigns namespace prefix in every xml node during the conversion. So is there any function to remove the namespace prefix from XML node using Xquery built in function?

  • Output XML with a default namespace using XQuery

    I'm having a problem with namespaces in an XQuery within ALSB.
    We receive XML from a file which doesn't have any namespace and have to transform it into a different structure, giving it a default namespace such as below:
    Input XML
    <inputRoot>
         <inputAccountName>Joe Bloggs</inputAccountName>
         <inputAccountNumber>10938393</inputAccountNumber>
    </inputRoot>
    Desired output XML
    <outputRoot xmlns="http://www.example.org/outputSchema">
         <outputAccounts>
              <outputAccountName>Joe Bloggs</outputAccountName>
              <outputAccountNumber>10938393</outputAccountNumber>
         </outputAccounts>
    </outputRoot>
    When I attempt to do this using XQuery mapper tool, I end up with a namespace prefix on the outputRoot. The XQuery and result follows:
    XQuery
    declare namespace xf = "http://tempuri.org/XQueryProject/scratchTransformations/test/";
    declare namespace ns0 = "http://www.example.org/outputSchema";
    declare function xf:test($inputRoot1 as element(inputRoot))
    as element(ns0:outputRoot) {
    <ns0:outputRoot>
    <outputAccounts>
    <outputAccountName>{ data($inputRoot1/inputAccountName) }</outputAccountName>
    <outputAccountNumber>{ data($inputRoot1/inputAccountNumber) }</outputAccountNumber>
    </outputAccounts>
    </ns0:outputRoot>
    declare variable $inputRoot1 as element(inputRoot) external;
    xf:test($inputRoot1)
    Result
    <ns0:outputRoot xmlns:ns0="http://www.example.org/outputSchema">
         <outputAccounts>
              <outputAccountName>inputAccountName_1</outputAccountName>
              <outputAccountNumber>inputAccountNumber_1</outputAccountNumber>
         </outputAccounts>
    </ns0:outputRoot>
    How can I write the XQuery in such a way thay the namespace prefix isn't output? I've tried many different methods with no success. I can't declare a default element namespace because my input element doesn't have a namespace
    Thanks in advance

    I spoke too soon, it didn't work quite as perfectly as I'd thought :-) It turns out our client can't handle the xml with the namespace prefix but we've worked out the solution to return XML in the format we originally needed.
    Example below:
    XQuery
    declare namespace xf = "http://tempuri.org/XQueryProject/scratchTransformations/test/";
    declare default element namespace "http://www.example.org/outputSchema";
    declare namespace ns1 = ""
    declare function xf:test($inputRoot1 as element(ns1:inputRoot))
    as element(outputRoot) {
    <outputRoot>
    <outputAccounts>
    <outputAccountName>{ data($inputRoot1/inputAccountName) }</outputAccountName>
    <outputAccountNumber>{ data($inputRoot1/inputAccountNumber) }</outputAccountNumber>
    </outputAccounts>
    </outputRoot>
    declare variable $inputRoot1 as element(inputRoot) external;
    xf:test($inputRoot1)

  • XML DB: using default namespace gives different result

    In Oracle9i R2 I created an XMLTYPE table based on a XML schema. The schema uses a namespace. When I insert an instance document that has a namespace prefix for every element querying works fine. When I insert an instance document that has the namespace defined as the default namespace, the query returns an empty row for that document. It seems to me that before storing the document the namespaces must be expanded and hence there should be no difference between the two documents and the query should return a value for both rows. Any thoughts? Thanks in advance! Below is the script and the results of the queries.
    ==========
    THE SCRIPT
    ==========
    DROP TABLE islands_xsd
    BEGIN
    DBMS_XMLSCHEMA.DELETESCHEMA('http://www.cumquat.nl/xsd/island.xsd', DBMS_XMLSCHEMA.DELETE_CASCADE);
    END;
    BEGIN
    DBMS_XMLSCHEMA.REGISTERSCHEMA('http://www.cumquat.nl/xsd/island.xsd',
    '<?xml version="1.0"?>
    <schema targetNamespace="http://www.cumquat.nl/xsd/island.xsd"
    xmlns:isl="http://www.cumquat.nl/xsd/island.xsd"
    xmlns="http://www.w3.org/2001/XMLSchema">
    <element name="island" type="isl:islandType"/>
    <complexType name="islandType">
    <sequence>
    <element name="name" type="string"/>
    <element name="country" type="string"/>
    <element name="total_area" type="positiveInteger"/>
    <element name="shoreline" type="positiveInteger"/>
    <element name="pop_density" type="integer"/>
    <element name="dist_continent" type="integer"/>
    </sequence>
    </complexType>
    </schema>');
    END;
    CREATE TABLE islands_xsd OF XMLTYPE
    XMLSCHEMA "http://www.cumquat.nl/xsd/island.xsd"
    ELEMENT "island"
    INSERT INTO islands_xsd VALUES (XMLTYPE(
    '<?xml version="1.0"?>
    <isl:island xmlns:isl="http://www.cumquat.nl/xsd/island.xsd"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.cumquat.nl/xsd/island.xsd http://www.cumquat.nl/xsd/island.xsd">
    <isl:name>Aldabra</isl:name>
    <isl:country>Seychelles</isl:country>
    <isl:total_area>13</isl:total_area>
    <isl:shoreline>104</isl:shoreline>
    <isl:pop_density>0</isl:pop_density>
    <isl:dist_continent>6</isl:dist_continent>
    </isl:island>'))
    INSERT INTO islands_xsd VALUES (XMLTYPE(
    '<?xml version="1.0"?>
    <island xmlns="http://www.cumquat.nl/xsd/island.xsd"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.cumquat.nl/xsd/island.xsd http://www.cumquat.nl/xsd/island.xsd">
    <name>Amsterdam</name>
    <country>France</country>
    <total_area>9</total_area>
    <shoreline>51</shoreline>
    <pop_density>0</pop_density>
    <dist_continent>30</dist_continent>
    </island>'))
    SELECT i.EXTRACT('/isl:island/isl:name', 'xmlns:isl="http://www.cumquat.nl/xsd/island.xsd"')
    FROM islands_xsd i
    SELECT i.EXTRACT('/isl:island/isl:name', 'xmlns:isl="http://www.cumquat.nl/xsd/island.xsd"').GETSTRINGVAL()
    FROM islands_xsd i
    SELECT i.EXTRACT('/isl:island/isl:name/text()', 'xmlns:isl="http://www.cumquat.nl/xsd/island.xsd"').GETSTRINGVAL()
    FROM islands_xsd i
    =======================================
    THE RESULTS OF RUNNING THE QUERIES
    =======================================
    SQL> SELECT i.EXTRACT('/isl:island/isl:name', 'xmlns:isl="http://www.cumquat.nl/xsd/island.xsd"')
    2 FROM islands_xsd i
    3 /
    I.EXTRACT('/ISL:ISLAND/ISL:NAME','XMLNS:ISL="HTTP://WWW.CUMQUAT.NL/XSD/ISLAND.XS
    XMLTYPE()
    2 rows selected.
    SQL> SELECT i.EXTRACT('/isl:island/isl:name', 'xmlns:isl="http://www.cumquat.nl/xsd/island.xsd"').GE
    TSTRINGVAL()
    2 FROM islands_xsd i
    3 /
    I.EXTRACT('/ISL:ISLAND/ISL:NAME','XMLNS:ISL="HTTP://WWW.CUMQUAT.NL/XSD/ISLAND.XS
    <isl:name xmlns:isl="http://www.cumquat.nl/xsd/island.xsd">Aldabra</isl:name>
    2 rows selected.
    SQL> SELECT i.EXTRACT('/isl:island/isl:name/text()', 'xmlns:isl="http://www.cumquat.nl/xsd/island.xs
    d"').GETSTRINGVAL()
    2 FROM islands_xsd i
    3 /
    I.EXTRACT('/ISL:ISLAND/ISL:NAME/TEXT()','XMLNS:ISL="HTTP://WWW.CUMQUAT.NL/XSD/IS
    Aldabra
    2 rows selected.

    This seems wrong to me. I've filed Bug 2400119 to get this looked into by development.
    I'd expect any document with an appropriate qualified name to be found by your XPath expression, irrespective of whether syntactically one of the documents happened to use the default namespace syntax.

  • Using value of  a variable in XML fragment

    Hi,
    I am assigning an xml fragment to a webservice variable. The XML fragment is as mentioned below:
    <ns2:ArrayOfKeyValuePair xmlns:ns2="http://www.themindelectric.com/package/com.taw.cca.common/"
    xsi:type="soapenc:Array"
    soapenc:arrayType="ns2:KeyValuePair[1]"
    xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
    <item xsi:type="ns2:KeyValuePair">
    <key xsi:type="xsd:string">key</key>
    *<value xsi:type="xsd:string" > 1234</value>*
    </item>
    </ns2:ArrayOfKeyValuePair>
    In the above mentioned xml fragment, for the tag value I need to pass the data of a variable instead of the hardcoded string 1234. How can I resolve my issue?
    Thanks

    In the worst case, you could always resort to using scriptlets to retrieve the parameter. and set it up as an attribute in the local page scope.
    <%
    String param = (String)request.getParameter("collection");
    Collection userCollection = (Collection)request.getAttribute(param);
    pageContext.setAttribute("local_collection", userCollection);
    %>
    <forEach var="user" items="${local_collection}">
    ,,,I think this should work.
    JSTL is great, but it can't yet replace every scriptlet, much as I would like it to.

  • Problem using namespace of XML docs gerenrated by  XMLForm

    Hi community!
    I am facing a problem using namespace within a XSL stylsheet. Let me describe my problem:
    I am using the SAP XMLFormsBuilder within the SAP EnterprisePortal in order to provide a HTML based form for creating and editing specific XML documents. The data in the generated documents is finally presented as HTML using XSL Transformation.
    In the XMLFormsBuilder you define the Schema of the XML document and the HTML GUI of the form. The Schema document looks like below (extract):
    <?xml version="1.0" encoding="utf-8"?>
    <schema targetNamespace="http://www.xmlspy.com/schemas/orgchart"
            xmlns="http://www.w3.org/2001/XMLSchema"
            xmlns:xyz="http://www.xmlspy.com/schemas/orgchart" Version="6.3.0">
      <element name="commodity"
               default=""
               minOccurs="1"
               maxOccurs="1"
               ns="p2p"
               xmlns:p2p="http://www.portal.p2p.com">
        <complexType>
          <sequence>
            <element name="administrative_information"
                     default=""
                     minOccurs="1"
                     maxOccurs="1"
                     ns="p2p">
              <complexType>
                <sequence>
                  <element name="creation_date"
                           default=""
                           minOccurs="1"
                           maxOccurs="1"
                           type="date"
                           ns="p2p"/>
    As far as I understand, each element defined in the Schama belongs to the namespace "p2p" and this is exactly what I want.
    The XML document generated by the form looks like below (extract):
    <?xml version="1.0" encoding="UTF-8"?>
    <?xml-stylesheet type="text/xsl" href="show_card.xsl"?>
    <commodity xmlns:xf="http://www.sapportals.com/wcm/app/xmlforms"
               xmlns:xsi="http//www.w3.org/2001/XMLSchema-instance"
               xsi:noNamespaceSchemaLocation="/etc/xmlforms/P2PCategoryCard_TEST/P2PCategoryCard_TEST-Schema.xml">
      <administrative_information>
        <creation_date>2005-07-04</creation_date>
    Consequently, the file "show_card.xsl" is the responsible XSLT stylesheet, which looks like this:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsl:stylesheet version="1.0"
                    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                    xmlns:p2p="http://www.portal.p2p.com">
      <xsl:output method="html"/>
      <xsl:template match="p2p:commodity">
        <html>
        <body>
          <h2>XSLT Test</h2>
          Creation Date: <xsl:value-of select="p2p:administrative_information/p2p:creation_date"/>
        </body>
        </html>
      </xsl:template>
    </xsl:stylesheet>
    The problem in the XSLT stylesheet is, that I want to access the XML document elements using their namespace. And this is exactly what does not work for me. On the other hand, if I remove the reference to the namespace:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsl:stylesheet version="1.0"
                    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                    xmlns:p2p="http://www.portal.p2p.com">
      <xsl:output method="html"/>
      <xsl:template match="commodity">
        <html>
        <body>
          <h2>XSLT Test</h2>
          Creation Date: <xsl:value-of select="administrative_information/creation_date"/>
        </body>
        </html>
      </xsl:template>
    </xsl:stylesheet>
    the stylesheet works fine, but for some technical reasons, which I don't want to explain here, I have to use the namespace when accessing the XML document elements.
    For technical reasons, I cannot change the format of the Schema document and also cannot change the format of the generated XML document. The only file I can change and control is the XSLT stylsheet.
    My question is now, in the case described above, if there is any way to use the namespace in the sytlesheet when accessing the XML elements?
    Any help is appreciated.
    Cheers,
    Adam Kreuschner

    duggal.ashish wrote:
    3. Some XML files contain a "iso-8859-1" character with character code 146 which appears like apostrophes but actually it is : - &#146; and the problem is that words like can&#146;t are shown as can?t by database.http://en.wikipedia.org/wiki/ISO8859-1
    Scroll down in that page and you'll see that the character code 146 -- which would be 92 in hexadecimal -- is in the "unused" area of ISO8859-1. I don't know where you got the idea that it represents some kind of apostrophe-like character but it doesn't.
    Edit: Actually, I do know where you got that idea. You got it from Windows-1252:
    http://en.wikipedia.org/wiki/Windows-1252
    Not the same charset at all.

Maybe you are looking for

  • Custom Message Form Opens to Wrong Page

    Probably a very simple question, but I am not that experienced with Form design in Outlook 2013. I have a form provided to me for publishing in the Organizational Forms Library... It is a simple message form that has a Message Body Page (Message) and

  • PC Crashes when iPhone docks

    I have a Dell M1210 notebook running WinXP(latested updates)with Norton Anti-Virus installed. The PC runs fine as does iTunes. Plug in the iPhone dock, all OK! Plug in the iPhone and just after recognizing the phone as a digicam, the whole system cra

  • Classic and Hot Sync

    Having problem getting Classic to Hot Sync - any ideas? How do you locate IP address for the phone? Post relates to: Pre p100ueu (O2) This question was solved. View Solution.

  • Olympus Settings in ACR

    Hi Everyone; I'm an Olympus user. I've done a number of comparisons of ACR against competing Raw converters. Olympus Master or Studio which both have the same internal conversion engine and is similar to the in camera performance sharpens the photogr

  • JDev 10g : deploy to standalone OC4J

    hi (using JDeveloper 10g Preview, build 1375) I have been trying to deploy an application to a standalone OC4J, based on the JDeveloper help topics: - "Deploying ADF Business Components Web Applications to Oracle Application Server or Standalone OC4J