Suppress default namespace in extract() function

How can I avoid that Oracle includes the target namespace of my schema as the default namespace when using the EXTRACT function?
E.g., select xmlelement("XmlData",
xmlagg(extract(tx.transmission, '/Transmission/Item')))
from transmissions tx
returns something like
<XmlData>
<Item xmlns="http://myschematargetnamespace" N="1">abcdef</Item>
<Item xmlns="http://myschematargetnamespace" N="2">abcdef</Item>
</XmlData>
Any ideas will be appreciated very much!
P.S. Can anybody tell me how I configure sqlplus to display the complete XML instead of only two lines?

Jash
I'm not aware of the answer, not would it make sense to do. element x in the noNamespaceNamespace is not the same object as element x in a specified namespace. Techinically there is no correct way to move the element from some specific namespace to the noNamespaceNamespace. You would have to construct a new element in the noNamespaceNamespace from scratch.

Similar Messages

  • Suppress default namespace when extracting XML

    How can I avoid that Oracle includes the target namespace of my schema as the default namespace when using the EXTRACT function?
    E.g., select xmlelement("XmlData",
    xmlagg(extract(tx.transmission, '/Transmission/Item')))
    from transmissions tx
    returns something like
    <XmlData>
    <Item xmlns="http://myschematargetnamespace" N="1">abcdef</Item>
    <Item xmlns="http://myschematargetnamespace" N="2">abcdef</Item>
    </XmlData>
    Any ideas will be appreciated very much!
    P.S. Can anybody tell me how I configure sqlplus to display the complete XML instead of only two lines?

    Well not sure about your XML issue yet but as for SQLplus, you need to set certain session parameters.
    type
    SQL> show all
    for a list of possible options but for your case I think something like
    SQL> set long 10000
    will help (this means limit to 10000 chars).
    'set linesize' and 'set pagesize' could help too, eg:
    SQL> set linesize 500 (if your terminal will accept 500 cols)
    SQL> set pagesize 90
    etc...
    Voila.
    Sam.

  • How to suppress n0: default Namespace prefix in Transformations

    Hi,
    I use Simple Transformations for serialization of deep structured data.
    In the XML File the whole tree needs to use a special namespace. Therefore i use the attribute xmlns="ABC.de" without a namespace prefix in my root element. During serialization SAP generates a default namespace prefix like 'n0:'.
    Is it possible to suppress the generated namespace prefix?
    Thank you very much for reply
    René
    Edited by: René Libbert on Feb 14, 2012 8:09 AM

    Maybe somebody is interested.
    It seems to be a problem on old 640. On a NW 702 the result is as expected. NW 700 was not tested.
    Workaround for the 640 is to use as result a STRING field not an XSTRING.
    Greetings René

  • Extract Function return NULL

    Hello All,
    I am new to XML so bear with me. I have a situation where I need to extract column field name from XML file stored in table column. I am trying to use extract function but getting NULL value from below SQL. In this case I am expecting to have list of all caption text listed. Please let me know what wrong I am doing below.
    SELECT X.XML.EXTRACT('/report/criteria/columns/column/columnHeading/caption/text()').GETSTRINGVAL() FROM <Table_name>
    XML File is stored in Column name XML in table
    - <saw:report xmlns:saw="com.siebel.analytics.web/report/v1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlVersion="201008230" xmlns:sawx="com.siebel.analytics.web/expression/v1.1">
    - <saw:criteria xsi:type="saw:simpleCriteria" subjectArea=""Study Execution"" withinHierarchy="true">
    - <saw:columns>
    - <saw:column xsi:type="saw:switchGroupColumn" columnID="c997a816d5ca37338">
    - <saw:choices>
    - <saw:choice>
    - <saw:column xsi:type="saw:regularColumn" columnID="c8b17a7121096d3b2">
    - <saw:columnFormula>
    <sawx:expr xsi:type="sawx:sqlExpression">"Study"."ICON Study No."</sawx:expr>
    </saw:columnFormula>
    - <saw:displayFormat>
    - <saw:formatSpec suppress="suppress" wrapText="true" interaction="action">
    - <saw:actionLinks showPopupMenuForOneLink="false">
    - <saw:actionLink actionLinkID="c8b17a7121096d3b2_ale3731f8d930e8604">
    - <saw:action>
    <saw:actionName>Deviations - Site Summary PM Dash Board</saw:actionName>
    - <saw:parameters allowExtraParameters="true">
    - <saw:parameter name="__navigateToBIContent__" type="string" mandatory="true" removable="true" order="999" multiValues="false">
    <saw:prompt>__navigateToBIContent__</saw:prompt>
    <saw:description />
    </saw:parameter>
    </saw:parameters>
    - <saw:assignments>
    - <saw:assign name="__navigateToBIContent__" fixed="true" hidden="true" parentFixed="false" parentHidden="false" xsi:type="saw:stringAssign">
    <saw:value>/shared/Clinical Operations/Project Managment Dashboard/Quality Tab/Deviations - Site Summary PM Dash Board</saw:value>
    </saw:assign>
    </saw:assignments>
    - <saw:implementation xsi:type="saw:ScriptActionType" executeOnClient="true">
    <saw:functionName>__navigateToBIContent__</saw:functionName>
    <saw:scriptLanguage>JScript</saw:scriptLanguage>
    <saw:scriptPath />
    </saw:implementation>
    - <saw:clientImplementation>
    <saw:customisation invokeConfirmation="false" />
    </saw:clientImplementation>
    </saw:action>
    - <saw:linkText>
    <saw:text>Deviation Site Summary</saw:text>
    </saw:linkText>
    </saw:actionLink>
    </saw:actionLinks>
    </saw:formatSpec>
    </saw:displayFormat>
    - <saw:columnHeading>
    - <saw:displayFormat>
    <saw:formatSpec interaction="none" />
    </saw:displayFormat>
    </saw:columnHeading>
    </saw:column>
    </saw:choice>
    - <saw:choice>
    - <saw:column xsi:type="saw:regularColumn" columnID="cd77e27e7b33767de">
    - <saw:columnFormula>
    <sawx:expr xsi:type="sawx:sqlExpression">"Geography"."Region"</sawx:expr>
    </saw:columnFormula>
    - <saw:displayFormat>
    - <saw:formatSpec suppress="suppress" wrapText="true" interaction="action">
    - <saw:actionLinks showPopupMenuForOneLink="false">
    - <saw:actionLink actionLinkID="cd77e27e7b33767de_alad0f25191c60257b">
    - <saw:action>
    <saw:actionName>Deviations - Site Summary PM Dash Board</saw:actionName>
    - <saw:parameters allowExtraParameters="true">
    - <saw:parameter name="__navigateToBIContent__" type="string" mandatory="true" removable="true" order="999" multiValues="false">
    <saw:prompt>__navigateToBIContent__</saw:prompt>
    <saw:description />
    </saw:parameter>
    </saw:parameters>
    - <saw:assignments>
    - <saw:assign name="__navigateToBIContent__" fixed="true" hidden="true" parentFixed="false" parentHidden="false" xsi:type="saw:stringAssign">
    <saw:value>/shared/Clinical Operations/Project Managment Dashboard/Quality Tab/Deviations - Site Summary PM Dash Board</saw:value>
    </saw:assign>
    </saw:assignments>
    - <saw:implementation xsi:type="saw:ScriptActionType" executeOnClient="true">
    <saw:functionName>__navigateToBIContent__</saw:functionName>
    <saw:scriptLanguage>JScript</saw:scriptLanguage>
    <saw:scriptPath />
    </saw:implementation>
    - <saw:clientImplementation>
    <saw:customisation invokeConfirmation="false" />
    </saw:clientImplementation>
    </saw:action>
    - <saw:linkText>
    <saw:text>Deviation Site Summary</saw:text>
    </saw:linkText>
    </saw:actionLink>
    </saw:actionLinks>
    </saw:formatSpec>
    </saw:displayFormat>
    - <saw:columnHeading>
    - <saw:displayFormat>
    <saw:formatSpec />
    </saw:displayFormat>
    </saw:columnHeading>
    </saw:column>
    </saw:choice>
    - <saw:choice>
    - <saw:column xsi:type="saw:regularColumn" columnID="cb13030672571aad9">
    - <saw:columnFormula>
    <sawx:expr xsi:type="sawx:sqlExpression">"Geography"."Country"</sawx:expr>
    </saw:columnFormula>
    - <saw:displayFormat>
    - <saw:formatSpec suppress="suppress" wrapText="true" interaction="action">
    - <saw:actionLinks showPopupMenuForOneLink="false">
    - <saw:actionLink actionLinkID="cb13030672571aad9_al40e4484c67de09d6">
    - <saw:action>
    <saw:actionName>Deviations - Site Summary PM Dash Board</saw:actionName>
    - <saw:parameters allowExtraParameters="true">
    - <saw:parameter name="__navigateToBIContent__" type="string" mandatory="true" removable="true" order="999" multiValues="false">
    <saw:prompt>__navigateToBIContent__</saw:prompt>
    <saw:description />
    </saw:parameter>
    </saw:parameters>
    - <saw:assignments>
    - <saw:assign name="__navigateToBIContent__" fixed="true" hidden="true" parentFixed="false" parentHidden="false" xsi:type="saw:stringAssign">
    <saw:value>/shared/Clinical Operations/Project Managment Dashboard/Quality Tab/Deviations - Site Summary PM Dash Board</saw:value>
    </saw:assign>
    </saw:assignments>
    - <saw:implementation xsi:type="saw:ScriptActionType" executeOnClient="true">
    <saw:functionName>__navigateToBIContent__</saw:functionName>
    <saw:scriptLanguage>JScript</saw:scriptLanguage>
    <saw:scriptPath />
    </saw:implementation>
    - <saw:clientImplementation>
    <saw:customisation invokeConfirmation="false" />
    </saw:clientImplementation>
    </saw:action>
    - <saw:linkText>
    <saw:text>Deviation Site Summary</saw:text>
    </saw:linkText>
    </saw:actionLink>
    </saw:actionLinks>
    </saw:formatSpec>
    </saw:displayFormat>
    - <saw:columnHeading>
    - <saw:displayFormat>
    <saw:formatSpec interaction="none" />
    </saw:displayFormat>
    </saw:columnHeading>
    </saw:column>
    </saw:choice>
    </saw:choices>
    </saw:column>
    - <saw:column xsi:type="saw:regularColumn" columnID="cf5c435bd3d235724">
    - <saw:columnFormula>
    <sawx:expr xsi:type="sawx:sqlExpression">"Study"."Sponsor Name"</sawx:expr>
    </saw:columnFormula>
    </saw:column>
    - <saw:column xsi:type="saw:regularColumn" columnID="cf48a34febca748ff">
    - <saw:columnFormula>
    <sawx:expr xsi:type="sawx:sqlExpression">"Study"."Project Status"</sawx:expr>
    </saw:columnFormula>
    </saw:column>
    - <saw:column xsi:type="saw:regularColumn" columnID="ce51ccb4c38ed538f">
    - <saw:columnFormula>
    <sawx:expr xsi:type="sawx:sqlExpression">"Project Goverance"."Project Manager"</sawx:expr>
    </saw:columnFormula>
    </saw:column>
    - <saw:column xsi:type="saw:regularColumn" columnID="cf4bc5bea2531f3fe">
    - <saw:columnFormula>
    <sawx:expr xsi:type="sawx:sqlExpression">"Study"."Indication"</sawx:expr>
    </saw:columnFormula>
    </saw:column>
    - <saw:column xsi:type="saw:regularColumn" columnID="c430e05de61704a98">
    - <saw:columnFormula>
    <sawx:expr xsi:type="sawx:sqlExpression">"- Deviation Metrics"."# Key Deviations"</sawx:expr>
    </saw:columnFormula>
    </saw:column>
    - <saw:column xsi:type="saw:regularColumn" columnID="cf658139b454c5a7f">
    - <saw:columnFormula>
    <sawx:expr xsi:type="sawx:sqlExpression">"- Deviation Metrics"."# Non-Key Deviations"</sawx:expr>
    </saw:columnFormula>
    </saw:column>
    - <saw:column xsi:type="saw:regularColumn" columnID="c1276c4cb2684ce42">
    - <saw:columnFormula>
    <sawx:expr xsi:type="sawx:sqlExpression">"- Deviation Metrics"."# Key/Non-Key NA Deviations"</sawx:expr>
    </saw:columnFormula>
    </saw:column>
    - <saw:column xsi:type="saw:regularColumn" columnID="cea25118bedcf2772">
    - <saw:columnFormula>
    <sawx:expr xsi:type="sawx:sqlExpression">"- Site Life Cycle Metrics"."# of Sites Activated by Deviation"</sawx:expr>
    </saw:columnFormula>
    - <saw:displayFormat>
    <saw:formatSpec suppress="repeat" wrapText="true" />
    </saw:displayFormat>
    - <saw:tableHeading>
    - <saw:caption fmt="text">
    <saw:text>Site Life Cycle Metrics</saw:text>
    </saw:caption>
    </saw:tableHeading>
    - <saw:columnHeading>
    - <saw:displayFormat>
    <saw:formatSpec />
    </saw:displayFormat>
    - <saw:caption fmt="text">
    <saw:text># of Sites Activated</saw:text>
    </saw:caption>
    </saw:columnHeading>
    </saw:column>
    - <saw:column xsi:type="saw:regularColumn" columnID="cae9b8f9cb7b8daba">
    - <saw:columnFormula>
    <sawx:expr xsi:type="sawx:sqlExpression">"- Deviation Metrics"."# Key Deviations per Active Site"</sawx:expr>
    </saw:columnFormula>
    - <saw:displayFormat>
    - <saw:formatSpec suppress="repeat" wrapText="true">
    <saw:dataFormat minDigits="2" maxDigits="2" commas="true" negativeType="minus" xsi:type="saw:number" />
    </saw:formatSpec>
    </saw:displayFormat>
    - <saw:columnHeading>
    - <saw:displayFormat>
    <saw:formatSpec />
    </saw:displayFormat>
    </saw:columnHeading>
    </saw:column>
    - <saw:column xsi:type="saw:regularColumn" columnID="cbb0790d62c120f67">
    - <saw:columnFormula>
    <sawx:expr xsi:type="sawx:sqlExpression">"- Site Life Cycle Metrics"."# of Sites Activated with FPS by Deviation"</sawx:expr>
    </saw:columnFormula>
    - <saw:displayFormat>
    <saw:formatSpec suppress="repeat" wrapText="true" />
    </saw:displayFormat>
    - <saw:tableHeading>
    - <saw:caption fmt="text">
    <saw:text>Site Life Cycle Metrics</saw:text>
    </saw:caption>
    </saw:tableHeading>
    - <saw:columnHeading>
    - <saw:displayFormat>
    <saw:formatSpec />
    </saw:displayFormat>
    - <saw:caption fmt="text">
    <saw:text># of Recruiting Sites (FPS)</saw:text>
    </saw:caption>
    </saw:columnHeading>
    </saw:column>
    - <saw:column xsi:type="saw:regularColumn" columnID="cec29c1b67bd731bc">
    - <saw:columnFormula>
    <sawx:expr xsi:type="sawx:sqlExpression">"- Deviation Metrics"."# Key Deviations per Recruiting Site (FPS)"</sawx:expr>
    </saw:columnFormula>
    - <saw:displayFormat>
    - <saw:formatSpec suppress="repeat" wrapText="true">
    <saw:dataFormat minDigits="2" maxDigits="2" commas="true" negativeType="minus" xsi:type="saw:number" />
    </saw:formatSpec>
    </saw:displayFormat>
    - <saw:columnHeading>
    - <saw:displayFormat>
    <saw:formatSpec />
    </saw:displayFormat>
    </saw:columnHeading>
    </saw:column>
    - <saw:column xsi:type="saw:regularColumn" columnID="cf52f2d88d2e78ff9">
    - <saw:columnFormula>
    <sawx:expr xsi:type="sawx:sqlExpression">"- Subject Life Cycle Metrics"."# of Actual Subjects Randomized by Deviation"</sawx:expr>
    </saw:columnFormula>
    - <saw:displayFormat>
    <saw:formatSpec suppress="repeat" wrapText="true" />
    </saw:displayFormat>
    - <saw:tableHeading>
    - <saw:caption fmt="text">
    <saw:text>Subject Life Cycle Metrics</saw:text>
    </saw:caption>
    </saw:tableHeading>
    - <saw:columnHeading>
    - <saw:displayFormat>
    <saw:formatSpec />
    </saw:displayFormat>
    - <saw:caption fmt="text">
    <saw:text># of Actual Subjects Randomized</saw:text>
    </saw:caption>
    </saw:columnHeading>
    </saw:column>
    - <saw:column xsi:type="saw:regularColumn" columnID="c804cdbe82e3fa7f3">
    - <saw:columnFormula>
    <sawx:expr xsi:type="sawx:sqlExpression">"- Deviation Metrics"."# Key Deviations per Rand Patient"</sawx:expr>
    </saw:columnFormula>
    - <saw:displayFormat>
    - <saw:formatSpec suppress="repeat" wrapText="true">
    <saw:dataFormat minDigits="2" maxDigits="2" commas="true" negativeType="minus" xsi:type="saw:number" />
    </saw:formatSpec>
    </saw:displayFormat>
    - <saw:columnHeading>
    - <saw:displayFormat>
    <saw:formatSpec />
    </saw:displayFormat>
    </saw:columnHeading>
    </saw:column>
    - <saw:column xsi:type="saw:regularColumn" columnID="ce344decda5f6fd83">
    - <saw:columnFormula>
    <sawx:expr xsi:type="sawx:sqlExpression">"- Deviation Metrics"."# Total Waivers"</sawx:expr>
    </saw:columnFormula>
    - <saw:displayFormat>
    <saw:formatSpec suppress="repeat" wrapText="true" />
    </saw:displayFormat>
    - <saw:tableHeading>
    - <saw:caption fmt="text">
    <saw:text>Deviation Metrics</saw:text>
    </saw:caption>
    </saw:tableHeading>
    - <saw:columnHeading>
    - <saw:displayFormat>
    <saw:formatSpec />
    </saw:displayFormat>
    - <saw:caption fmt="text">
    <saw:text># Total Waivers</saw:text>
    </saw:caption>
    </saw:columnHeading>
    </saw:column>
    - <saw:column xsi:type="saw:regularColumn" columnID="c0d6921698af79211">
    - <saw:columnFormula>
    <sawx:expr xsi:type="sawx:sqlExpression">"- Deviation Metrics"."# Inclusion/Exclusion Waivers"</sawx:expr>
    </saw:columnFormula>
    </saw:column>
    - <saw:column xsi:type="saw:regularColumn" columnID="cef66aab5dfc4449d">
    - <saw:columnFormula>
    <sawx:expr xsi:type="sawx:sqlExpression">"- Deviation Metrics"."# Other Waivers"</sawx:expr>
    </saw:columnFormula>
    </saw:column>
    - <saw:column xsi:type="saw:regularColumn" columnID="cb963b668b55786bb">
    - <saw:columnFormula>
    <sawx:expr xsi:type="sawx:sqlExpression">"Deviation Level"."Deviation Level"</sawx:expr>
    </saw:columnFormula>
    - <saw:displayFormat>
    - <saw:formatSpec suppress="repeat" wrapText="true" interaction="clientEvent">
    <saw:clientEventSpec channel="Level" />
    </saw:formatSpec>
    </saw:displayFormat>
    - <saw:columnHeading>
    - <saw:displayFormat>
    <saw:formatSpec interaction="none" />
    </saw:displayFormat>
    </saw:columnHeading>
    </saw:column>
    - <saw:column xsi:type="saw:regularColumn" columnID="c15b89d8487d41b29">
    - <saw:columnFormula>
    <sawx:expr xsi:type="sawx:sqlExpression">"Deviation"."Deviation Type"</sawx:expr>
    </saw:columnFormula>
    </saw:column>
    </saw:columns>
    - <saw:filter>
    - <sawx:expr xsi:type="sawx:logical" op="and">
    <sawx:expr xsi:type="sawx:savedFilter" path="/shared/Clinical Operations/_filters/Study Execution/PM Dashboard - Quality" name="PM Dashboard - Quality" />
    - <sawx:expr op="prompted" xsi:type="sawx:special">
    <sawx:expr xsi:type="sawx:sqlExpression">"Deviation Level"."Deviation Level"</sawx:expr>
    </sawx:expr>
    </sawx:expr>
    </saw:filter>
    </saw:criteria>
    - <saw:views currentView="0">
    - <saw:view xsi:type="saw:compoundView" name="compoundView!1">
    - <saw:cvTable>
    - <saw:cvRow>
    - <saw:cvCell viewName="titleView!1">
    - <saw:displayFormat>
    <saw:formatSpec />
    </saw:displayFormat>
    </saw:cvCell>
    </saw:cvRow>
    - <saw:cvRow>
    <saw:cvCell viewName="columnSelectorView!1" />
    </saw:cvRow>
    - <saw:cvRow>
    - <saw:cvCell viewName="tableView!1">
    - <saw:displayFormat>
    <saw:formatSpec />
    </saw:displayFormat>
    </saw:cvCell>
    </saw:cvRow>
    - <saw:cvRow>
    <saw:cvCell viewName="filtersView!1" />
    </saw:cvRow>
    </saw:cvTable>
    </saw:view>
    <saw:view xsi:type="saw:titleView" name="titleView!1" includeName="false" startedDisplay="dateTime" />
    - <saw:view xsi:type="saw:tableView" name="tableView!1" clientEventChannels="MD1" clientEventEnabled="true">
    - <saw:edges>
    - <saw:edge axis="page" showColumnHeader="true">
    - <saw:displayGrandTotals>
    - <saw:displayGrandTotal id="t1" grandTotalPosition="none">
    - <saw:memberFormat>
    - <saw:displayFormat>
    <saw:formatSpec />
    </saw:displayFormat>
    </saw:memberFormat>
    - <saw:dataBodyFormat>
    - <saw:displayFormat>
    <saw:formatSpec />
    </saw:displayFormat>
    </saw:dataBodyFormat>
    </saw:displayGrandTotal>
    </saw:displayGrandTotals>
    </saw:edge>
    <saw:edge axis="section" />
    - <saw:edge axis="row" showColumnHeader="true">
    - <saw:displayGrandTotals>
    <saw:displayGrandTotal id="t2" grandTotalPosition="after" />
    </saw:displayGrandTotals>
    - <saw:edgeLayers>
    <saw:edgeLayer type="column" columnID="c997a816d5ca37338" />
    <saw:edgeLayer type="column" columnID="c430e05de61704a98" />
    <saw:edgeLayer type="column" columnID="cf658139b454c5a7f" />
    <saw:edgeLayer type="column" columnID="c1276c4cb2684ce42" />
    <saw:edgeLayer type="column" columnID="cea25118bedcf2772" />
    <saw:edgeLayer type="column" columnID="cae9b8f9cb7b8daba" />
    <saw:edgeLayer type="column" columnID="cbb0790d62c120f67" />
    <saw:edgeLayer type="column" columnID="cec29c1b67bd731bc" />
    <saw:edgeLayer type="column" columnID="cf52f2d88d2e78ff9" />
    <saw:edgeLayer type="column" columnID="c804cdbe82e3fa7f3" />
    - <saw:edgeLayer type="column" columnID="ce344decda5f6fd83">
    - <saw:headerFormat>
    - <saw:displayFormat>
    <saw:formatSpec />
    </saw:displayFormat>
    </saw:headerFormat>
    </saw:edgeLayer>
    <saw:edgeLayer type="column" columnID="c0d6921698af79211" />
    <saw:edgeLayer type="column" columnID="cef66aab5dfc4449d" />
    </saw:edgeLayers>
    </saw:edge>
    <saw:edge axis="column" />
    </saw:edges>
    </saw:view>
    - <saw:view xsi:type="saw:columnSelectorView" name="columnSelectorView!1" labelPosition="left" goButton="false">
    - <saw:selector prompt="true" columnID="c997a816d5ca37338">
    - <saw:label>
    - <saw:caption>
    <saw:text>Select Level</saw:text>
    </saw:caption>
    </saw:label>
    </saw:selector>
    </saw:view>
    - <saw:view xsi:type="saw:dvtchart" name="dvtchart!1">
    - <saw:display type="bar" subtype="default" renderFormat="default" mode="online" xAxisLiveScrolling="false" yAxisLiveScrolling="false" clientEventEnabled="false" animateOnDisplay="true">
    <saw:style barStyle="default" lineStyle="default" scatterStyle="default" fillStyle="default" bubblePercentSize="100" effect="2d" />
    </saw:display>
    - <saw:canvasFormat height="330" width="750" showGradient="true">
    <saw:dataLabels display="default" label="default" position="below" transparentBackground="true" valueAs="default" />
    - <saw:title mode="custom">
    - <saw:caption>
    <saw:text>Severity vs Deviation Type</saw:text>
    </saw:caption>
    </saw:title>
    - <saw:gridlines default="true">
    - <saw:horizontal>
    <saw:major visible="false" />
    <saw:minor visible="false" />
    </saw:horizontal>
    - <saw:vertical>
    <saw:major visible="false" />
    <saw:minor visible="false" />
    </saw:vertical>
    </saw:gridlines>
    </saw:canvasFormat>
    - <saw:selections>
    - <saw:categories>
    - <saw:category>
    <saw:columnRef columnID="c15b89d8487d41b29" />
    </saw:category>
    </saw:categories>
    - <saw:measures showMeasureLabelsOnCategory="false">
    - <saw:column measureType="y">
    <saw:columnRef columnID="c430e05de61704a98" />
    </saw:column>
    - <saw:column measureType="y">
    <saw:columnRef columnID="cf658139b454c5a7f" />
    </saw:column>
    - <saw:column measureType="y">
    <saw:columnRef columnID="c1276c4cb2684ce42" />
    </saw:column>
    </saw:measures>
    - <saw:seriesGenerators>
    <saw:measureLabels />
    </saw:seriesGenerators>
    - <saw:page>
    - <saw:column>
    <saw:columnRef columnID="cb963b668b55786bb" />
    </saw:column>
    </saw:page>
    <saw:sections displayAsSlider="false" />
    </saw:selections>
    - <saw:legendFormat position="default" transparentFill="true">
    <saw:textFormat />
    </saw:legendFormat>
    - <saw:axesFormats syncAxis="false">
    - <saw:axisFormat axis="Y1">
    - <saw:title mode="custom">
    - <saw:caption>
    <saw:text>Severity</saw:text>
    </saw:caption>
    </saw:title>
    <saw:labels />
    <saw:textFormat />
    <saw:scale scaleValues="auto" showMajorTicks="false" showMinorTicks="false" logarithmic="false" defaultTicks="true" />
    </saw:axisFormat>
    - <saw:axisFormat axis="X" displayScaleLabels="true">
    - <saw:title mode="custom">
    - <saw:caption>
    <saw:text>Deviation Type</saw:text>
    </saw:caption>
    </saw:title>
    <saw:labels rotate="15" rotateLabels="true" stagger="false" skip="false" abbreviation="default" />
    <saw:textFormat />
    <saw:scale scaleValues="auto" showMajorTicks="false" showMinorTicks="false" logarithmic="false" />
    </saw:axisFormat>
    </saw:axesFormats>
    - <saw:pageEdgeState>
    - <saw:QDR>
    - <saw:staticMemberGroup>
    - <saw:groupType>
    <sawx:columnRefExpr columnID="cb963b668b55786bb" />
    </saw:groupType>
    - <saw:members xsi:type="saw:stringMembers">
    <saw:value>Patient</saw:value>
    </saw:members>
    </saw:staticMemberGroup>
    </saw:QDR>
    - <saw:selectionGroups>
    <saw:selectionGroup columnID="cb963b668b55786bb" groupID="0" />
    </saw:selectionGroups>
    </saw:pageEdgeState>
    </saw:view>
    <saw:view xsi:type="saw:filtersView" name="filtersView!1" />
    </saw:views>
    <saw:prompts scope="report" subjectArea=""Study Execution"" />
    </saw:report>
    Edited by: Dinesh Chauhan on Jan 19, 2012 4:34 AM

    2) In reality I'll have another column defined in same table which will have same value as columnFormula (from xml file). I would need to extract caption from the XMLType and store in another column.OK, let's see if I understand correctly.
    You want to extract the caption text from the column where the columnFormula contains the value in COL1?
    If I'm correct, it's this one :
    <sawx:expr xsi:type="sawx:sqlExpression">" Site Life Cycle Metrics"."# of Sites Activated with FPS by Deviation"</sawx:expr>Assuming there's a unique match, you can do :
    SQL> SELECT XMLCast(
      2           XMLQuery(
      3             'declare default element namespace "com.siebel.analytics.web/report/v1.1"; (: :)
      4              declare namespace x = "com.siebel.analytics.web/expression/v1.1"; (: :)
      5              /report/criteria/columns/column[ora:contains(columnFormula/x:expr,$val)>0]/columnHeading/caption/text'
      6             passing t.xml
      7                   , t.col1 as "val"
      8             returning content
      9           )
    10           as varchar2(100)
    11         ) as caption_text
    12  FROM temp_xml t
    13  ;
    CAPTION_TEXT
    # of Recruiting Sites (FPS)
    If you want to update the same table, say COL2, you can do it directly like this :
    UPDATE temp_xml t
    SET t.col2 =
           XMLCast(
             XMLQuery(
               'declare default element namespace "com.siebel.analytics.web/report/v1.1"; (: :)
                declare namespace x = "com.siebel.analytics.web/expression/v1.1"; (: :)
                /report/criteria/columns/column[ora:contains(columnFormula/x:expr,$val)>0]/columnHeading/caption/text'
               passing t.xml
                     , t.col1 as "val"
               returning content
             as varchar2(100)
    ;

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

  • Oracle.xdb.XMLType extract function

    I have an external java program that connect to the database using a thick connection so I can use the methods extract and existsNode available with the XMLType from oracle.xdb.XMLType.
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    conn = DriverManager.getConnection(jdbc:oracle:oci8:@,"user","pwd");
    It works fine from the program. When I load the java function in the SQL database I use the default connection
    conn = DriverManager.getConnection("jdbc:default:connection:");
    and the extract function gives the error java.sql.SQLException.
    Is there a way to define the native connection as thin or thick because that was the error I was getting from the client program when I was using thin connection
    Thanks
    Mirette

    Please try and avoid duplicate posts...

  • "...Prefix when a default namespace..." error inside javascript

    I get this exception:
    The function $ must be used with a prefix when a default namespace is not specified
    in this piece of jsp code
    <html:checkbox property="copyAddress" value="true"
                           onclick="if (this.checked) { $('postal').hide()} else { $('postal').show(); }"/>Also, I get this error locally but not in the server. I use tomcat 5.5, jsp-api 2.0 and servlet-api 2.4.
    What's wrong? Please help me
    Edited by: poroto20 on Jan 13, 2010 6:56 AM

    I would move this method over to its own function and pass the arg in full.
    Also if this is JQuery then it sould read, if this is Struts then there are better ways of doing this.
    if (this.checked) { $('#postal').hide()} else { $('#postal').show(); }"
    {code}
    When you create the method wrap it up in a try catch (Javascript try catch) and see what outputs. You can also use Firefox/Firebug to get better debugging information regarding JS errors.
    Also you should read as follows, otherwise you will get a JS error
    {code}
    if (this.checked)  $('postal').hide(); else  $('postal').show();
    {code}
    Note the ";" after the hide();
    Edited by: Gizard on 13-Jan-2010 15:22                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Adding default namespace after inlinedXML() in OSB

    Hi All,
    Please suggest me for the following.
    We are sending one data in xml format from proxy service.
    Following is the message we are getting in OSB to send
    <Notification>
    <Type>Data</Type>
    <Channel>webservice</Channel>
    <Security>NONSSL</Security>
    <Message>
    <type>Transfer</type>
    <msg><![CDATA[<Transfer></Transfer>]]></msg>
    </Message>
    <Destination>XXXXXX</Destination>
    <Priority>HIGH</Priority>
    </Notification>>
    Ideally what we are sending in our CDATA there should not be any change.
    but when we are printing out body variable after inlinedxml() function.
    its adding default namespace in Transfer tag.
    <Body xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://schemas.xmlsoap.org/soap/envelope/">
    <Transfer xmlns="">
    </Transfer>
    </Body>>
    why OSB is putting xmlns="" in Transfer tag.
    Regards,
    ABHISHEK
    Edited by: abhishek on Sep 11, 2012 12:52 AM
    Edited by: abhishek on Sep 11, 2012 1:04 AM

    Hi ,
    Thanks for reply and suggestion. now I got why its adding the namespace.
    Now i got the problem. when we are not adding any namespace OSB environment is adding the default namespace.
    My use case is :
    when the body variable is
    <Transfer xmlns=''></Transfer>
    My outbound of proxy is following
    <?xml version="1.0" encoding="UTF-8"?>
    <Transfer xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"></Transfer>
    I need my outbound variable is like
    <?xml version="1.0" encoding="UTF-8"?>
    <Transfer></Transfer>
    Then I tried to send the body variable (providing default namespace) <Transfer xmlns='' xmlns:soap-env=''></Transfer>
    but still getting the
    <Transfer xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"></Transfer> as outbound variable
    Is there any way to remove this namespace from outbound variable.
    Thanks,
    Abhishek
    Edited by: abhishek on Sep 12, 2012 1:38 AM
    Edited by: abhishek on Sep 12, 2012 1:41 AM

  • 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

  • XML Extract function help

    I have below xml in oracle table, how to extract partial address data "10 Otterburn Gardens, ISLEWORTH, Middlesex TW4 5JJ" using sql
    <?xml version="1.0"?>
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
      <soap:Body>
        <qas:QASearchResult xmlns:qas="http://www.qas.com/web-2009-08" VerifyLevel="None">
          <qas:QAPicklist AutoFormatSafe="true">
            <qas:FullPicklistMoniker>0_MGBRFQbdBwAAAAABAQEAAQAAAADfKULSACEYAgAAAAAAMTYAAP..ZAAAAAD.....AAAAAAAAAAA-</qas:FullPicklistMoniker>
            <qas:PicklistEntry FullAddress="true">
              <qas:Moniker>0XOGBRFQbdBwAAAAABAwEAAAAA3ylC0gAhGAIAAAAAADE2AAD..2QAAAAA.....wAAAAAAAAAAADE2IE90dGVyYnVybiBHYXJkZW5zLCBUVzcgNUpKAA--</qas:Moniker>
              <qas:PartialAddress>10 Otterburn Gardens, ISLEWORTH, Middlesex TW4 5JJ</qas:PartialAddress>
              <qas:Picklist>16 Otterburn Gardens, ISLEWORTH, Middlesex</qas:Picklist>
              <qas:Postcode>TW7 5JJ</qas:Postcode>
              <qas:Score>100</qas:Score>
            </qas:PicklistEntry>
            <qas:Prompt>Enter selection</qas:Prompt>
            <qas:Total>1</qas:Total>
          </qas:QAPicklist>
        </qas:QASearchResult>
      </soap:Body>
    </soap:Envelope>

    Also, I can see here -- ORA-19279: XPTY0004 - XQuery dynamic type mismatch: expected singleton sequence - got multi-item sequence
    that you have used another technique XMLNamespaces() for the same.
    select x.*
    from abc t
       , xmltable(
           xmlnamespaces(
             default 'urn:swift:xsd:fin.970.2011'
           , 'urn:swift:xsd:mtmsg.2011' as "ns0"
         , '/ns0:FinMessage/ns0:Block4/Document/MT970/F61a/F61'
           passing t.col1
           columns F61ValueDate                Varchar(40) Path 'ValueDate'
                 , DebitCreditMark             Varchar(40) Path 'DebitCreditMark'
                 , Amount                      Varchar(40) Path 'Amount'
                 , TransactionType             Varchar(40) Path 'TransactionType'
                 , IdentificationCode          Varchar(40) Path 'IdentificationCode'                 
                 , ReferenceForTheAccountOwner Varchar(40) Path 'ReferenceForTheAccountOwner'
                 , SupplementaryDetails        Varchar(40) Path 'SupplementaryDetails'       
         ) x;
    What you are trying to do here? and why that "default" namespace?
    Also, I'll also go through the docs in this meantime.
    -- Ranit

  • Suppressing status bar message after function call?

    Hi,
    I'm calling a few functions in a program.
    After calling them, for example function "L_TO_CREATE_DN", I get a message in the status bar, in this case saying that a TO has been created successfully.
    How can I suppress all status bar messages for all the functions that are being called in the program?
    THX!

    Hi
    Try to use the default excption error_message
    CALL FUNCTION
    EXCEPTIONS
        error_message = 1
        OTHERS        = 2.
    Max

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

  • XPATH query behaves differently depending on presence of default namespace

    I'm curious to know why an XPATH query seems to behave differently depending on whether the default namespace is present in the query.
    My test case is as follows:
    I use a table called xml_messages (id number, message xmltype) containing two rows - one where xmlns is specified and the other without.
    1. Default namespace is specified:
    <?xml version="1.0"?>
    <Bereken xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Fout="false" Identifier="21-4-2008 12:55:02" xmlns="http://schemas.myco.nl/services/IPP">
    <Reglementen>
    <Reglement Ind="21000005" dlnsts="6">
    <Producten>
    <Product Ind="1002" ogr="27098.00" bbr="27098.00" igl="65" elt="130" pgs="63758.00" slt="65" plt="0" reg="0" orf="0" />
    <Product Ind="1032" ogr="0" bbr="0" igl="65" elt="130" pgs="63758.00" slt="65" plt="0" reg="0" orf="0" />
    <Product Ind="1052" ogr="0" bbr="0" igl="65" elt="130" pgs="63758.00" slt="65" plt="0" reg="0" orf="0" />
    <Product Ind="1062" ogr="0" bbr="2389.968" igl="65" elt="130" pgs="63758.00" slt="65" plt="0" reg="0" orf="0" />
    <Product Ind="3002" ogr="18968.00" bbr="5690.4" igl="0" elt="130" pgs="63758.00" slt="65" plt="0" reg="0" orf="0" />
    <Product Ind="3032" ogr="0" bbr="0" igl="0" elt="130" pgs="63758.00" slt="65" plt="0" reg="0" orf="0" />
    <Product Ind="3502" ogr="2845.00" bbr="2845.00" igl="65" elt="130" pgs="63758.00" slt="65" plt="0" reg="0" orf="0" />
    <Product Ind="5002" ogr="3794.00" bbr="3794.00" igl="0" elt="18" pgs="63758.00" slt="65" plt="0" reg="0" orf="0" />
    <Product Ind="7502" ogr="0" bbr="0" igl="65" elt="130" pgs="63758.00" slt="65" plt="0" reg="0" orf="0" />
    <Product Ind="7503" ogr="0" bbr="0" igl="65" elt="130" pgs="63758.00" slt="65" plt="0" reg="0" orf="0" />
    <Product Ind="8101" ogr="0" bbr="0" igl="65" elt="65" pgs="63758.00" slt="65" plt="0" reg="0" orf="0" />
    <Product Ind="7002" ogr="0" bbr="8724.6" igl="65" elt="130" pgs="0" slt="65" plt="0" reg="0" orf="0" />
    <Product Ind="7202" ogr="0" bbr="0" igl="65" elt="130" pgs="0" slt="65" plt="0" reg="0" orf="0" />
    <Product Ind="7302" ogr="0" bbr="0" igl="65" elt="130" pgs="0" slt="65" plt="0" reg="0" orf="0" />
    </Producten>
    </Reglement>
    </Reglementen>
    <Parameters gbtd="1957-12-18T00:00:00.0000000+01:00" gsl="Vrouw" pdr="2008-03-01T00:00:00.0000000+01:00" hdgs="40000" ptp="100" />
    </Bereken>
    2. No default namespace specified:
    <?xml version="1.0"?>
    <Bereken xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Fout="false" Identifier="21-4-2008 12:55:02" >
    <Reglementen>
    <Reglement Ind="21000005" dlnsts="6">
    <Producten>
    <Product Ind="1002" ogr="27098.00" bbr="27098.00" igl="65" elt="130" pgs="63758.00" slt="65" plt="0" reg="0" orf="0" />
    <Product Ind="1032" ogr="0" bbr="0" igl="65" elt="130" pgs="63758.00" slt="65" plt="0" reg="0" orf="0" />
    <Product Ind="1052" ogr="0" bbr="0" igl="65" elt="130" pgs="63758.00" slt="65" plt="0" reg="0" orf="0" />
    <Product Ind="1062" ogr="0" bbr="2389.968" igl="65" elt="130" pgs="63758.00" slt="65" plt="0" reg="0" orf="0" />
    <Product Ind="3002" ogr="18968.00" bbr="5690.4" igl="0" elt="130" pgs="63758.00" slt="65" plt="0" reg="0" orf="0" />
    <Product Ind="3032" ogr="0" bbr="0" igl="0" elt="130" pgs="63758.00" slt="65" plt="0" reg="0" orf="0" />
    <Product Ind="3502" ogr="2845.00" bbr="2845.00" igl="65" elt="130" pgs="63758.00" slt="65" plt="0" reg="0" orf="0" />
    <Product Ind="5002" ogr="3794.00" bbr="3794.00" igl="0" elt="18" pgs="63758.00" slt="65" plt="0" reg="0" orf="0" />
    <Product Ind="7502" ogr="0" bbr="0" igl="65" elt="130" pgs="63758.00" slt="65" plt="0" reg="0" orf="0" />
    <Product Ind="7503" ogr="0" bbr="0" igl="65" elt="130" pgs="63758.00" slt="65" plt="0" reg="0" orf="0" />
    <Product Ind="8101" ogr="0" bbr="0" igl="65" elt="65" pgs="63758.00" slt="65" plt="0" reg="0" orf="0" />
    <Product Ind="7002" ogr="0" bbr="8724.6" igl="65" elt="130" pgs="0" slt="65" plt="0" reg="0" orf="0" />
    <Product Ind="7202" ogr="0" bbr="0" igl="65" elt="130" pgs="0" slt="65" plt="0" reg="0" orf="0" />
    <Product Ind="7302" ogr="0" bbr="0" igl="65" elt="130" pgs="0" slt="65" plt="0" reg="0" orf="0" />
    </Producten>
    </Reglement>
    </Reglementen>
    <Parameters gbtd="1957-12-18T00:00:00.0000000+01:00" gsl="Vrouw" pdr="2008-03-01T00:00:00.0000000+01:00" hdgs="40000" ptp="100" />
    </Bereken>
    Next, I use the following two queries to get attribute values from the xml messages:
    First query using xmlns:
    select extractvalue(value(v),'/Product/@Ind' ) ind
    , extractvalue(value(v),'/*/@Ind' ) ind2
    from xml_messages f
    , TABLE(XMLSequence( extract(f.message
         ,'/Bereken/Reglementen/Reglement/Producten/Product'
                                  ,'xmlns="http://schemas.myco.nl/services/IPP"'
                                  ))) v
    where f.id = 1; -- Selects from the xmltype message that does have xmlns specified
    This returns (as the first row)
    IND IND2
    ____ 1002
    ^
    |------ Nothing is returned by the XPATH /Product/@Ind
    Second without using xmlns
    select extractvalue(value(v),'/Product/@Ind' ) ind
    , extractvalue(value(v),'/*/@Ind' ) ind2
    from xml_messages f
    , TABLE(XMLSequence( extract(f.message
         ,'/Bereken/Reglementen/Reglement/Producten/Product'
                                  ))) v
    where f.id = 2; -- Selects from the xmltype message that has no xmlns
    This returns (as the first row)
    IND IND2
    1002 1002
    According to XMLSpy, the correct XPATH to get the "Ind" attribute is "/Product/@Ind" so what I dont understand is why query one doesnt return any data when using a default namespace.
    The XPATH "/*/@Ind" works in both cases and can be used as a workaround, but it seems less elegant than using the proper XPATH.
    I've tried this test case in 9i and 10g, in sqlplus and TOAD, with the same results in all cases.
    Can anyone provide some insight as to why this behavior occurs?

    Thanks, A_Non,
    adding the third parm to the extractvalue part of the query works.
    ie:
    select extractvalue(value(v),'/Product/@Ind', 'xmlns="http://schemas.myco.nl/services/IPP"' ) ind
    , extractvalue(value(v),'/*/@Ind' ) ind2
    from xml_messages f
    , TABLE(XMLSequence( extract(f.message
         ,'/Bereken/Reglementen/Reglement/Producten/Product'
                                  ,'xmlns="http://schemas.myco.nl/services/IPP"'
                                  ))) v
    where f.id = 1;               
    I had not expected this because I thought the xml fragment returned by the extract didnt include the default namespace.
    However, when looking at the query in more detail, its clear Oracle automatically includes the xmlns part in the returned xml fragment.
    One of the rows in the xml fragment:
    <Product xmlns="http://schemas.myco.nl/services/IPP" Ind="1002" ogr="27098.00" bbr="27098.00" igl="65" elt="130" pgs="63758.00" slt="65" plt="0" reg="0" orf="0"/>

  • Is it possible to use a CONSTANT as Default Namespace?

    Hi,
    I create from a table and an XML-field a view. For the command XMLTABLE I have to use a DEFAULT namespace.
    Is it possible instead of a fixed string to use a constant variable which I read using a function?
    As example:
    CREATE OR REPLACE VIEW pain_001 AS
    SELECT i.iban_ausz_id IBAN_AUSZ_ID
    ,oc.PmtCdtInstrId PmtInf_CdtInstrId
    FROM IBAN_AUSZ_E i
    ,XMLTABLE(XmlNamespaces(DEFAULT 'http://www.six-interbank-clearing.com/de/pain.001.001.03.ch.02.xsd'),
    '/Document/CstmrCdtTrfInitn/PmtInf/CdtTrfTxInf'
    PASSING i.pain_001
    COLUMNS
    PmtCdtInstrId NUMBER PATH 'PmtId/InstrId'
    ) oc
    I want to replace 'http://www.six-interbank-clearing.com/de/pain.001.001.03.ch.02.xsd' with a function wich returns a constant variable like "package_name.get_const".
    Is this possible?
    Thanks in Advance.

    odie_63 wrote:
    Hi,
    I want to replace 'http://www.six-interbank-clearing.com/de/pain.001.001.03.ch.02.xsd' with a function wich returns a constant variable like "package_name.get_const".
    Is this possible?No, it's not possible. It has to be a string literal.but for dynamic sql (EXECUTE IMMEDIATE) looks like it's possible

  • 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

Maybe you are looking for

  • Availabili​ty of copy function on e mail

    How do I copy a tracking number that's not highlighted so I can track a package? There is no edit function showing.

  • Lightning to 30-pin adapter not working w/iHome/iPhone 6.

    Lightning to 30-pin adapter is not working correctly with iHome/iPhone 6.  When I plug phone in the music and time update will work but it won't charge the phone, unless I turn my phone around but then music won't work.  I've only had my iHome for a

  • Ses referncing contract

    Hi all I have created service masters for various trades (i.e electrical, mechanical). I am creating a framework order and setting a limit. I am not planning the services - there would be too many rows and the user interface is to complex for the use

  • Adobe Reader won't download and PDFs won't open

    All of a sudden I cannot open PDFs, so I have tried to download Adobe Reader XI and it gets to 78% then fails. It will not give me a reason for the failed installation, and when I try to open PDFs I get a message that says "Acrobat failed to load its

  • I can´t publish or export to flash

    Hello, I have installed Captivate 6.0.1 in a Mac. When I finished, I try to publish and a blank square was in the screen in time the publish menu. I try upgrade Captivate, reinstalled and the problem is continuous. When I try to export to Flash CS6 o