XML Node Extraction Help

Hi, Guys:
I have a snippet of code here as attached. The problem is
that it appears that even though my nameHolder variable returns me
with the right values, I still get all the nodes instead of one
that has @name parameter set up.
Could anyone please give me some pointers on what I have
done wrong here?
Thanks for your help.
Alice

How many conditions there are depends on the users
selections. If there user selects more than one, it is joined with
an OR clause and is supposed to filter out the options. I tried
filtering it out by using a Boolean clause as shown in the code
attached, but it appears that it is still ignoring it and gives me
the entire output no matter what.
I went back to dig through the code, and looks like what is
attached would be the closest to what I want. The problem, how can
you combine the two sets if they are both selected? Right now I get
two separate ones instead of an entire one.
Alice

Similar Messages

  • Using XSLT to extract value of a XML node with namespace

    I have a XML source code here.
    <?xml version="1.0" encoding="utf-8" ?>
    <rss version="2.0" xmlns:job="http://www.pageuppeople.com">
      <channel>
        <title>SMH Jobs</title>
        <link>internalrecruitment.smhgroup.com.au/jobsrss.ashx?stp=di</link>
        <description>A listing of jobs available here</description>
        <item>
          <title>eCommerce Optimisation Advisor</title>
          <description>A new and exciting opportunity exists for an experienced eCommerce Advisor to join</description>
          <job:location PUReferenceID="3711">Sydney - Inner Suburbs & CBD</job:location>
        </item>
      </channel>
    </rss>
    I want to use XSLT to extract value of a XML node with namespace <job:location>, and the returned value should be string 'Sydney - Inner Suburbs & CBD'. I tried a few XSL code below, but failed with error or nothing was returned.
    <xsl:value-of select="job:location" disable-output-escaping="yes"/>
    <xsl:value-of select="job/location" disable-output-escaping="yes"/>
    <xsl:value-of select="job\location" disable-output-escaping="yes"/>
    <xsl:value-of select="location" disable-output-escaping="yes"/>
    This might be an easy question for you, but I would appreciate if anyone can help.

    Hi Suncorp IT Learner,
    We need to tell the XSLT that some elements are in another namespace. Copy the xmls declarations for the prefixes you need to use. Then use the xsl format as:
    <xsl: value-of select=”job:location/@PUReferenceID”/>
    In following issue, Chriztian has a good explanation:
    http://our.umbraco.org/forum/developers/xslt/33353-XSLT-reading-XML-attribute-value
    Thanks,
    Qiao Wei
    TechNet Community Support

  • Need Xml Extraction help...not very urgent but only 6 Hrs left...

    Hi,
         I have an xml in a blob column and I need to extract the xml resultset into the (specified below) row/column format. So that i created a custom blob_to_clob function for this conversion and extracted below specified xml. Now I am executing the below specified queries for this xml to extract PanelSet, PanelId, Link values & attributes. but the problem is, I am not been able to relate the parent and child nodes or may be not able to identify, who belongs to who (parent--child). for e.g if I extract all link i.e status1, status2 etc of a particular Panel then i am not been able to access its (parent) Panel identification.please suggest me any solution.
    --query using
    --to extract PanelSet
    select
      extractValue(value(t),'/PanelSet/@name') panelset_name
      from
        (Select blob_to_clob(grp_menu) blobval
        from OUG
        WHERE user_group_seqno =9) c,
    table(xmlsequence(extract(xmltype.createxml(c.blobval),'/Menus/PanelSet'))) t
    --to extract PanelID
    select
      extractValue(value(t),'/PanelID/text()') panelid
      from
        (Select blob_to_clob(grp_menu) blobval
        from oug
        WHERE user_group_seqno =9) c,
    table(xmlsequence(extract(xmltype.createxml(c.blobval),'/Menus/PanelSet/PanelID'))) t
    --to extract Panel
    select
      extractValue(value(t),'/Panel/@id') Panel_id,
      extractValue(value(t),'/Panel/@name') Panelname
      from
        (Select blob_to_clob(grp_menu) blobval
        from oug
        WHERE user_group_seqno =9) c,
    table(xmlsequence(extract(xmltype.createxml(c.blobval),'/Menus/Panel'))) t
    --to extract link
    select
      extractValue(value(t),'/Link/@name') link_name,
      extractValue(value(t),'/Link/@type') link_type,
      extractValue(value(t),'/Link/text()') link_value 
      from
        (Select blob_to_clob(grp_menu) blobval
        from oug
        WHERE user_group_seqno =9) c,
    table(xmlsequence(extract(xmltype.createxml(c.blobval),'/Menus/Panel/Link'))) t
    --XML
    <Menus>
        <PanelSet name="0_Data center_A">
        <PanelID>1-1</PanelID>
        <PanelID>1-2</PanelID>
        <PanelID>1-3</PanelID>
        <PanelID>0-0</PanelID>
        <PanelID>1-6</PanelID>
        <PanelID>1-7</PanelID>
    </PanelSet>
       <PanelSet name="1_Data center_B">
          <PanelID>2-4</PanelID>
          <PanelID>2-5</PanelID>
          <PanelID>2-6</PanelID>
          <PanelID>0-0</PanelID>
          <PanelID>2-7</PanelID>
          <PanelID>2-8</PanelID>
    </PanelSet>
       <PanelSet name="2_Data center_C">
          <PanelID>3-2</PanelID>
          <PanelID>3-4</PanelID>
          <PanelID>0-0</PanelID>
          <PanelID>3-9</PanelID>
          <PanelID>3-10</PanelID>
          <PanelID>3-11</PanelID>
    </PanelSet>
          <Panel id="1-1" name="Sts">
            <Link name="status 1" type="Module">forbidden</Link>
            <Link name="status 2" type="Module">/forbidden</Link>
            <Link name="status 3" type="Module">/forbidden</Link>
            <Link name="status 4" type="Module">/forbidden</Link>
            <Link name="status 5" type="Module">/forbidden</Link>
          </Panel>
          <Panel id="1-2" name="Adm">
             <Link name="View 1" type="Module">forbidden</Link>
             <Link name="View 2" type="Module">forbidden</Link>
             <Link name="View 3" type="Module">forbidden</Link>
             <Link name="View 4" type="Module">forbidden</Link>
             <Link name="View 5" type="Module">forbidden</Link>
             <Link name="View 6" type="Module">forbidden</Link>
             <Link name="View 7" type="Module">forbidden</Link>
          </Panel>
          <Panel id="2-4" name="Position">
             <Link name="viewer 1" type="Module">forbidden</Link>
             <Link name="viewer 2" type="Module">forbidden</Link>
          </Panel>
          <Panel id="3-2" name="Administration">
             <Link name="inquiry 1" type="Module">forbidden</Link>
          </Panel>
          <Panel id="3-4" name="Reconciliation">
            <Link name="reconciliation 1" type="Module">forbidden</Link>
            <Link name="reconciliation 2" type="Module">forbidden</Link>
            <Link name="reconciliation 3" type="Module">forbidden</Link>
          </Panel> 
    </Menus>
    --Structure
                                       -----Link abc
                                      -     Link abd
                                  -      Link abe
                -----Panel ID 1-1-                
                  -     Panel ID 1-2--------link a--z (more than one)
    --------    -      Panel ID 1-3--------link N...
    |PanelSet 0|-
                  ------PanelID 2-1--------link N...
               -     PanelID 2-2--------link N...
    --------     -      PanelID 2-3--------link N...
    |PanelSet 1|-      
                  ------PanelID 3-1--------link N...
    --------     -      PanelID 3-2--------link N...
    |PanelSet 2|-       PanelID 3-1--------link N...
    --resultset required
    Panel_set         Panel_id          link
    0_Data center_A    1-1               Status1
    0_Data center_A    1-1               Status2
    0_Data center_A    1-1               Status3
    0_Data center_A    1-1               Status4
    0_Data center_A    1-1               Status5
    0_Data center_A    1-2               View 1
    0_Data center_A    1-2               View 2
    0_Data center_A    1-2               View 3
    0_Data center_A    1-2               View 4
    0_Data center_A    1-2               View 1
    1_Data center_B    2-4              viewer 1
    1_Data center_B    2-4              viewer 2Message was edited by:
    Sachin.Singh

    with t as
    (select xmltype(
    '... your xml here ...
    ') as xml from dual),
    panel_sets as ( select extractvalue(t2.column_value, '//*/@name') as panel_set,
                           extractvalue(t3.column_value, '//*'      ) as panel_id
                      from t, table(xmlsequence(extract(t.xml,           '//Menus/PanelSet'))) t2,
                              table(xmlsequence(extract(t2.column_value, '//*/PanelID'     ))) t3
        panels as ( select extractvalue(t2.column_value, '//*/@id'  ) as panel_id,
                           extractvalue(t3.column_value, '//*/@name') as link
                      from t, table(xmlsequence(extract(t.xml,           '//Menus/Panel'))) t2,
                              table(xmlsequence(extract(t2.column_value, '//*/Link'     ))) t3
    select s.panel_set, s.panel_id, p.link
      from panel_sets s, panels p
      where p.panel_id = s.panel_id
    PANEL_SET            PANEL_ID LINK
    0_Data center_A      1-1      status 1
    0_Data center_A      1-1      status 2
    0_Data center_A      1-1      status 3
    0_Data center_A      1-1      status 4
    0_Data center_A      1-1      status 5
    0_Data center_A      1-2      View 1
    0_Data center_A      1-2      View 2
    0_Data center_A      1-2      View 3
    0_Data center_A      1-2      View 4
    0_Data center_A      1-2      View 5
    0_Data center_A      1-2      View 6
    0_Data center_A      1-2      View 7
    1_Data center_B      2-4      viewer 1
    1_Data center_B      2-4      viewer 2
    2_Data center_C      3-2      inquiry 1
    2_Data center_C      3-4      reconciliation 1
    2_Data center_C      3-4      reconciliation 2
    2_Data center_C      3-4      reconciliation 3
    18 rows selected.

  • Failed to decrypt protected XML node "DTS:Password" with error 0x8009000B "Key not valid for use in specified state

    we have developed packages to do the followings
    Extract data from DB2 Source and put it in MS Sql Server 2008 database (Lets Say DatabaseA).From MS Sql Server 2008 (DatabaseA)
    we will process the data and place it in another database MS Sql Server 2008 (DatabaseB)
    We have created packages in BIDS..We created datasource connection in Datasource folder in BIDS..Which has DB2 Connection and both Ms Sql Server connection (Windows authentication-Let
    say its pointing to the server -ServerA which has DatabaseA and DatabaseB).The datasource connections will be used in packages during development.
    For deployment we have created Package Configuration which will have both DB2 Connection and MS SqlServer connection in the config
    We deployed the packages in different MS SqlServer by changing the connectionstring in the config for DB2 and MS SqlServer...
    While runing the package we are getting the following error message
    Code: 0xC0016016     Source:       Description: Failed to decrypt protected XML node "DTS:Password" with error 0x8009000B "Key not valid for
    use in specified state.". You may not be authorized to access this information. This error occurs when there is a cryptographic error. Verify that the correct key is available.
    ilikemicrosoft

    Hi Surendiran,
    This is because the package has been created by somebody else and the package is being deployed under sombody else's account. e.g. If you are the creator then the package is encryption set according to your account and the package setup in SQL server is
    under a different user account.
    This happens because the package protection level is set to EncryptSensitiveWithUserKey which encrypts
    sensitive information using creator's account name.
    As a solution:
    Either you have to set up the package in SQL server under your account (which some infrastructures do not allow).
    OR
    Set the package property Protection Level to "DontSaveSensitive" and add a configuration file
    to the package and set the initial values for all the variables and all the connection manager in that configuration file (which might be tedious of-course).
    OR
    The third options (which I like do) is to open the package file and delete the password encryption entries from the package. Do note that this is not supported by designer and every time you make changes to the connection managers these encryption entries come
    back.
    Hope this helps. 
    Please mark the post as answered if it answers your question

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

  • Getting Error 'Root XML Node nqw not found in island!'

    I have upgraded my setup from OBIEE 11.1.1.5.0 to 11.1.1.5.1 and then uploaded a catalog created in older version, 11g itself.
    I'm able to run the dashboards and see all reports. They run absolutely fine, show all correct data.
    However if I try to edit report or try to open them in Answers module .... from anywhere (Catalog Link/ Edit option below reports in Dashboard) it gives me this error.
    " Root XML Node nqw not found in island! "
    It's strange. I tried following:
    1. doing a Upgrade of catalog by setting up parameter in instanceconfig.xml file
    <Catalog>
    <UpgradeAndExit>true</UpgradeAndExit>
    </Catalog>
    and then reverting back to false.
    2. Also tried the GUID upgarde by setting parameters in instanceconfig.xml file and NQSConfig.ini file
    none helped.
    Any help?

    Hi Naresh,
    I hope you have resolved the issue by this time.
    In my case, it was related to an invalid filter on the report.
    I have removed the filter by updating the report .xml file from Catalog Manager.
    Hope this helps other with similar issue.
    Thanks,
    Ravi

  • How to create xml nodes based on a value

    Dear friends,
    I've a question about graphical mapping in SAP PI...
    How can I create XML nodes on the target side based on a value in a XML field on the source side.
    For example:
    This XML field on the source:
    <NO_OF_LINES>4</NO_OF_LINES>
    Must result on 4 Lines on the Target:
    <LINE></LINES>
    <LINE></LINES>
    <LINE></LINES>
    <LINE></LINES>
    So it's actually the opposite of the Count function...
    I appreciate your help,
    Thank you in Advance,
    Kind regards,
    John

    Hi ,
    Try this
    NO_OF_LINES---> count---> UDF---> LINE
    example :
    UDF Code :
    for (int i=0;i<var1[0];i++)
    result.addValue("");

  • Map several records to different elements in the same xml node

    Hi,
    I am trying to map data from relational tables to elements as per my xml schema. One of my tables has several records that I need to map to different elements in the same xml node.
    For example:
    Customer_Id | Param_Id |Param_Name
    212 | 1 |State
    212 | 2 |Country
    212 | 3 |ZipCode
    I can not change the structure of this existing table and need to work with it.
    How do I map the different params for a specific customer to my Customer node in the schema?
    One option is to join on the parameters table several times, but there ought to be a better way!
    PLEASE HELP!!!
    Thanks,

    First I question the design that contains/allows 600 attributes on an element. They sound like they really should be elements in the XML.
    Regardless, the following (NOT TESTED) should work for you (assuming you want to write one SQL with 600 columns)
    CREATE OR REPLACE VIEW APPLICATION_XML
    OF XMLTYPE
    Element "LOAN_APPLICATION"
    with object ID
    substr(extractValue(object_value,'/LOAN_APPLICATION/APPLICATION_DATA/@CallID'),1,5)
    AS
    WITH parm_tb AS
    SELECT MAX(DECODE(prv_valu, 1, prv_value)) BusinessType,
           MAX(DECODE(param_id, 2, prv_value)) Product,
           MAX(DECODE(param_id, 3, prv_value)) SomethingElse
      FROM parameter_details
    WHERE prv_pmh_header_id = 1
    SELECT xmlElement
       ("APPLICATION_DATA",
         xmlAttributes
          p.prv_detail_id as "CallID",
          p.PRV_PRM_PARAM_ID as "RandomID",
          p.prv_value as AppInitDate
         xmlElement
         ("PRODUCER_DATA",
           xmlAttributes
            parm_tb.BusinessType as "BusinessType" ,
            parm_tb.Product as "Product"
      FROM parameters_table p
    WHERE p.PRV_PMH_HEADER_ID = 1

  • OBIEE Error 'Root XML Node nqw not found in island!'

    Hello,
    After I altered my Hyperion Essbase structure, my OBIEE Reports don't open.
    I increase one generation in my accounts hierachy, and now when I try open my OBIEE reports, I get the follow error:
    "Root XML Node nqw not found in island"
    Any help?
    Thanks,

    Hi Naresh,
    I hope you have resolved the issue by this time.
    In my case, it was related to an invalid filter on the report.
    I have removed the filter by updating the report .xml file from Catalog Manager.
    Hope this helps other with similar issue.
    Thanks,
    Ravi

  • Unknown tag name: [session] in XML node: [toplink-configuration].

    I get this exception at runtime, running TOPLink as persistence manager for my BMP WL7 beans. My sessions.xml validates according to the sessions_4_5.dtd file supplied with TOPLink, but yet I get this excpetion. Below is my complete sessions.xml, as well as teh header of the exception stack
    Sessions.xml
    <?xml version="1.0" encoding="US-ASCII"?>
    <!DOCTYPE toplink-configuration PUBLIC "-//Oracle Corp.//DTD TopLink for JAVA 4.5//EN" "sessions_4_5.dtd">
    <toplink-configuration>
         <session>
              <name>entitySession</name>
              <project-class>za.co.discovery.legalentity.persistence.TOPLinkProject</project-class>
              <session-type>
                   <server-session/>
              </session-type>
              <login>
                   <uses-external-connection-pool>true</uses-external-connection-pool>
                   <uses-external-transaction-controller>true</uses-external-transaction-controller>
              </login>
              <external-transaction-controller-class>oracle.toplink.jts.wls.WebLogicJTSExternalTransactionController</external-transaction-controller-class>
              <enable-logging>true</enable-logging>
              <logging-options>
                   <log-debug>false</log-debug>
                   <log-exceptions>true</log-exceptions>
                   <log-exception-stacktrace>true</log-exception-stacktrace>
                   <print-thread>false</print-thread>
                   <print-session>true</print-session>
                   <print-connection>true</print-connection>
                   <print-date>false</print-date>
              </logging-options>
         </session>
    </toplink-configuration>
    and the stack trace:
    1) testAll(za.co.discovery.legalentity.ejb.test.ClassVersionTest)java.rmi.RemoteException: Exception in ejbFindByPrimaryKey; nested exception is:
         EXCEPTION [TOPLINK-7094] (TopLink - 9.0.3 (Build 423)): oracle.toplink.exceptions.ValidationException
    EXCEPTION DESCRIPTION: LOCAL EXCEPTION STACK:
    EXCEPTION DESCRIPTION: Several [2] SessionLoaderExceptions were thrown:
    EXCEPTION [TOPLINK-9002] (TopLink - 9.0.3 (Build 423)): oracle.toplink.exceptions.SessionLoaderException
    EXCEPTION DESCRIPTION: Unable to load Project class [za.co.discovery.legalentity.persistence.TOPLinkProject].
    INTERNAL EXCEPTION: java.lang.ExceptionInInitializerError
    EXCEPTION [TOPLINK-9001] (TopLink - 9.0.3 (Build 423)): oracle.toplink.exceptions.SessionLoaderException
    EXCEPTION DESCRIPTION: Unknown tag name: [session] in XML node: [toplink-configuration].
    INTERNAL EXCEPTION: java.lang.reflect.InvocationTargetException
    TARGET INVOCATION EXCEPTION: java.lang.NullPointerException
         at oracle.toplink.exceptions.SessionLoaderException.finalException(Unknown Source)
         at oracle.toplink.tools.sessionconfiguration.XMLLoader.load(Unknown Source)
         at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unknown Source)
         at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unknown Source)
         at oracle.toplink.ejb.EJBDataStore.getSession(Unknown Source)
         at oracle.toplink.ejb.EJBDataStore.getDescriptor(Unknown Source)
         at oracle.toplink.ejb.EJBDataStore.getWrapperPolicy(Unknown Source)
         at oracle.toplink.ejb.EJBDataStore.findByPrimaryKey(Unknown Source)
         at oracle.toplink.ejb.bmp.BMPEntityBase.findByPrimaryKey(Unknown Source)
         at za.co.discovery.legalentity.ejb.LegalEntityEJB.ejbFindByPrimaryKey(LegalEntityEJB.java:67)
    all help appreciated!
    thanks
    Alwyn ([email protected])

    Hi Alwyn
    I've seen this exact problem before when the sessions.xml file has been parsed by a different version of xerces from the one provided in TopLink. Is this a possibility?
    JIM

  • Failed to decrypt protected XML node "DTS:Password" with error 0x8009000B

    Hi,
    I have developed several SSIS packages with the last Beta of VS2005 / SQL Server CTP. After the public release I tried to uninstall the CTP-Versions to install the msdn finals but this time I got lost and was not able to satisfy the requirements of the final setup of VS2005. So I decided to install the whole pc again and after some hours I had a clean machine (XP with latest SQL Server 2005 Standard and VS2005 Professional).   Now I have tried to open my SSIS-Project but getting the following error:   Error loading ImpNetqNewsRss.dtsx: Failed to decrypt protected XML node "DTS:Password" with error 0x8009000B "Schlüssel ist im angegebenen Status nicht gültig.". You may not be authorized to access this information. This error occurs when there is a cryptographic error. Verify that the correct key is available.
    After some “googleing” I found this thread: http://forums.microsoft.com/msdn/showpost.aspx?postid=22739&siteid=1   If I’m right the solution should be to use a Package Password, but I can’t figure out where I have to go enter/change a password. I even can’t remember I that ever used a password on my old installation for a dtsx-package??   Any help is welcome…   Regards, Dirk

      Let's Say your package name is MyPackage
      In Visual Studio  Go to Control Flow Tab.
      Righ Click on an empty area inside the window not clicking  "Data Flow Component" .  pop up menu click the the properties to get to the properties window of MyPackage package.
    Under the Security Area -> You will see 
            ProtectionLevel              -- Change that to EncryptSensitiveWithPassword
            PackagePassword          -- enter password->  temp
    This should do the trick however to be sure:
    Below you will connection managers:
    Database Connections (if more than one preform on all) 
      Double Click your connection to get the property pages. Click "ALL" under the Connection Link on Left Side. Scroll Down to Security Area.
      Provide the followings:
       Password  (for the sql userid being used)
       Persist Security Info  = True
    Save the Package and connect to SQL Integration Srvices in SQL Manager  (To Server e.g; DBServer (Integration Services) 
      Stored Packages -> MSDB -->  Right Click --> choose Import Package
      in the property dialog box 
                  Package Location :   File System 
                  Package Path  -- Choose the location of your dtsx file.  (MyPackage.dtsx)
      Leave everything default.
      Click OK.
      Dialog box will appear asking for the Package Password 
      Provide the password-> temp
      You have successfully imported the package called MyPackage.
      In order to create a job.   
      In the job Step->
           Type:  SQL Server Integration Services Package
           In the General Tab:
                     Package Source :  SSIS Package Store
                     Server : DBServer  (Where we stored our package above)
        Click the button for the package:  Choose your package  (MyPackage)
       Click OK :
        It will ask the package password again :  temp
                    Package has successfully been loaded to Job Step.  Now you can schedule and do a test run on the job.
      Thanks for the patience of reading for those who are expert.
      - Azhar

  • Asign paragraph styles to xml nodes

    Hello all,
    I try to asign paragraph styles to xml nodes. I tried to autoasign the styles to tags and also to assign the styles directly to the xml tags with aid:pstyle. None of it with success. I think that this happens because there is a paragraph formating missing in my xml. I tried to change this with <aid:br/> but also no success.
    This is how my xsl looks like:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
      <xsl:output method = "xml" version="1.0" encoding="UTF-8" indent="yes"/>
      <xsl:strip-space elements="*"/>
      <xsl:template match="ooo_sheet">
        <Root>
          <xsl:for-each select="ooo_row">
              <Artikel>
              <xsl:copy-of select="Artikelnummer"/>
                  <Bild>
                        <xsl:attribute name="href">
                      <xsl:text>file:///</xsl:text>
                      <xsl:value-of select="Bildpfad"/>
                        </xsl:attribute>
                  </Bild>
                  <Text xmlns:aid="http://ns.adobe.com/AdobeInDesign/4.0/" xmlns:aid5="http://ns.adobe.com/AdobeInDesign/5.0/">
                        <EK aid5:pstyle="EK"><xsl:value-of select="EK"/><aid:br/></EK>
                    <Details aid5:pstyle="Details"><xsl:value-of select="Details"/><aid:br/></Details>
                    <Abmessungen aid5:pstyle="Abmessungen"><xsl:value-of select="Abmessungen"/><aid:br/></Abmessungen>
                    <Artikelnummer aid5:pstyle="Artikelnummer"><xsl:value-of select="Artikelnummer"/><aid:br/></Artikelnummer>
                  </Text>
              </Artikel>
          </xsl:for-each>
        </Root>
      </xsl:template>
    </xsl:stylesheet>
    I want to achieve that I can pull the the following tag from the structure view in Indesign to a textframe and the text gets the different formating.
    <Text xmlns:aid="http://ns.adobe.com/AdobeInDesign/4.0/" xmlns:aid5="http://ns.adobe.com/AdobeInDesign/5.0/">
                        <EK aid5:pstyle="EK"><xsl:value-of select="EK"/><aid:br/></EK>
                    <Details aid5:pstyle="Details"><xsl:value-of select="Details"/><aid:br/></Details>
                    <Abmessungen aid5:pstyle="Abmessungen"><xsl:value-of select="Abmessungen"/><aid:br/></Abmessungen>
                    <Artikelnummer aid5:pstyle="Artikelnummer"><xsl:value-of select="Artikelnummer"/><aid:br/></Artikelnummer>
    </Text>
    Could anyone point me to the right direction? Any help is very welcome. Thank you for your help.

    Sorry, my last example was the xsl instead of the xml. Here is the xml I got. I want to pull the Root/Artikel/Text Tag to a frame and all Child tags within should be formated with the corresponding pstyles.
    But it looks like as if Indesign just does not tranform the aid5 style upon xml/xlst import. The <aid:br> tags you see are just a try of myself to get the tags within the Text tag separated as paragraph.
    But Indesign just interprets them as normal tags and also shows them in the structure pane.
    Thank you very much for your help. I also tried to format the text with the paragraph styles by hand and export the whole thing as xml from Indesign. But Indesign just the xml the same way I imported it. The same happens when I manually create a xml structure in Indesign, assign the styles to the text within the frame. Indesign just exports the raw xml structure. But no style declarations. So I can't see how to format the tags the right way.
    This is how my xml looks like when I import it with the upper xsl.
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <Root>
        <Artikel>
            <Artikelnummer>C12-34567</Artikelnummer>
            <Bild href="file:///Users/Diamondgroup/Desktop/KatalogBeispiel/cmyk/C12-34567.PSD"></Bild>
            <Text xmlns:aid="http://ns.adobe.com/AdobeInDesign/4.0/" xmlns:aid5="http://ns.adobe.com/AdobeInDesign/5.0/">
                <EK aid5:pstyle="EK">1234,-<aid:br></aid:br></EK>
                <Details aid5:pstyle="Details">AAA AAA AAA AAA<aid:br></aid:br></Details>
                <Abmessungen aid5:pstyle="Abmessungen"><aid:br></aid:br></Abmessungen>
                <Artikelnummer aid5:pstyle="Artikelnummer">C12-34567<aid:br></aid:br></Artikelnummer>
            </Text>
        </Artikel>
        <Artikel>
            <Artikelnummer>C23-45678</Artikelnummer>
            <Bild href="file:///Users/Diamondgroup/Desktop/KatalogBeispiel/cmyk/C23-45678.PSD"></Bild>
            <Text xmlns:aid="http://ns.adobe.com/AdobeInDesign/4.0/" xmlns:aid5="http://ns.adobe.com/AdobeInDesign/5.0/">
                <EK aid5:pstyle="EK">2345,-<aid:br></aid:br></EK>
                <Details aid5:pstyle="Details">BBB BBB BBB BBB<aid:br></aid:br></Details>
                <Abmessungen aid5:pstyle="Abmessungen"><aid:br></aid:br></Abmessungen>
                <Artikelnummer aid5:pstyle="Artikelnummer">C23-45678<aid:br></aid:br></Artikelnummer>
            </Text>
         </Artikel>
    </Root>
    All the xsl: transformations work but the aid: and aid5: transformations just show in the xml as they where in the xsl.

  • Xs:group refs and "ORA-30936: Maximum number (1) of XML nodes exceeded'

    We registered a subset of the IBM DITA schemas in Oracle XDB. These schemas contain a lot of xs:group definitions where references to these groups contain "minOccurs" and "maxOccurs" atttributes, for instance:
    <xs:group name="category">
    <xs:sequence>
    <xs:element ref="category"/>
    </xs:sequence>
    </xs:group>
    <xs:complexType name="metadata.class">
    <xs:sequence>
    <xs:group ref="audience" minOccurs="0" maxOccurs="unbounded"/>
    <xs:group ref="category" minOccurs="0" maxOccurs="unbounded"/>
    <xs:group ref="keywords" minOccurs="0" maxOccurs="unbounded"/>
    <xs:group ref="prodinfo" minOccurs="0" maxOccurs="unbounded"/>
    <xs:group ref="othermeta" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="mapkeyref" type="xs:string"/>
    <xs:attributeGroup ref="global-atts"/>
    <xs:attribute ref="class" default="- topic/metadata "/>
    </xs:complexType>
    When we create an instance document that contains more than one "category" element under the element "metadata" element, like:
    <metadata>
    <audience type="purchaser" othertype="" job="using" otherjob="" experiencelevel="general"/>
    <category/>
    <category/>
    </metadata>
    we get the error: ORA-30936: Maximum number (1) of 'category' XML node elements exceeded
    This error is not consistent with the schema and XML parsers like Xerces and the Oracle "XDK parser" think the instance is fine.
    When we skip the reference to the group and reference the element definition "category" directly the problem is gone:
    <xs:complexType name="metadata.class">
    <xs:sequence>
    <xs:group ref="audience" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element ref="category" minOccurs="0" maxOccurs="unbounded"/>
    <xs:group ref="keywords" minOccurs="0" maxOccurs="unbounded"/>
    <xs:group ref="prodinfo" minOccurs="0" maxOccurs="unbounded"/>
    <xs:group ref="othermeta" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="mapkeyref" type="xs:string"/>
    <xs:attributeGroup ref="global-atts"/>
    <xs:attribute ref="class" default="- topic/metadata "/>
    </xs:complexType>
    In this case the problems for the other group references like "audience" remain.
    It looks like Oracle XDB doesn't honor the cardinality attributes "minOccurs" and "maxOccurs" on xs:group elements that are references. Does anyone experienced similar problems?
    Thanks,
    Maarten

    This sounds like bug 5204107. You'll need to open a tar with Oracle Support if you need a fix for this..
    It happens when a group is used once without a maxOccurs and then later with a maxOccurs.
    The workaround is 'in-line' the group before registering the XML Schema. This can be done as follows (assuming the group definition and reference are in the same XML Schema)..
    procedure expandGroup(xmlschema in out xmltype, groupName varchar2,xsdDirectory varchar2)
    is
      xsdSchemaPath varchar2(512);
      groupModel xmltype;
      sequenceModel xmlType := xmlType('<xsd:sequence ' || xdb_namespaces.XMLSCHEMA_PREFIX_XSD || '><xsd:sequence/></xsd:sequence>');
      maxOccursValue binary_integer;
    begin
      -- FInd the Group Definition
      if xmlSchema.existsNode('/xsd:schema//xsd:group[@ref="' || groupName || '"]',NAMESPACES) = 1 then
        if xmlSchema.existsNode('/xsd:schema/xsd:group[@name="' || groupName || '"]',NAMESPACES) = 1 then
          select extract
                   xmlSchema,
                   '/xsd:schema/xsd:group[@name="' || groupName || '"]',
                   NAMESPACES
            into groupModel
            from dual; 
        else
          dbms_output.put_line('xsdDirectory = ' || xsdDirectory);
          select PATH,
                 extract
                   CONTENTS,
                   '/xsd:schema/xsd:group[@name="' || groupName || '"]',
                   NAMESPACES
            into xsdSchemaPath, groupModel
            from (
                   select PATH, xdburitype(path).getXML() CONTENTS
                     from PATH_VIEW
                    where under_path(res,xsdDirectory) = 1
           where existsNode
                   CONTENTS,
                   '/xsd:schema/xsd:group[@name="' || groupName || '"]',
                   NAMESPACES
                 ) = 1;
           dbms_output.put_line('Resolved ' || groupModel.extract('/xsd:group/@name',NAMESPACES).getStringVal() || ' in Schema ' || xsdSchemaPath);
        end if;
        if groupModel.existsNode('/xsd:group/xsd:annotation',NAMESPACES) = 1 then
          select deleteXML
                   groupModel,
                   '/xsd:group/xsd:annotation',
                   NAMESPACES
            into groupModel
            from dual;
        end if;
        -- create a sequence that can be placed in-line in the XML Schema to replace the <group ref=""/>
        groupModel := groupModel.extract('/xsd:group/*',NAMESPACES);
        select updateXML
                 sequenceModel,
                 '/xsd:sequence/xsd:sequence',
                groupModel,
                 NAMESPACES
          into sequenceModel
          from dual;
        if xmlSchema.existsNode('/xsd:schema//xsd:group[@ref="' || groupName || '" and not(@maxOccurs)]',NAMESPACES) = 1 then
          select updateXML
                   xmlSchema,
                   '/xsd:schema//xsd:group[@ref="' || groupName || '" and not(@maxOccurs)]',
                  sequenceModel,
                   NAMESPACES
            into xmlSchema
            from dual;
        end if;
        select insertChildXML
                 sequenceModel,
                 '/xsd:sequence',
                 '@maxOccurs',
                 'unbounded',
                 NAMESPACES
          into sequenceModel
          from dual;
        if xmlSchema.existsNode('/xsd:schema//xsd:group[@ref="' || groupName || '" and @maxOccurs="unbounded"]',NAMESPACES) = 1 then
          select updateXML
                   xmlSchema,
                   '/xsd:schema//xsd:group[@ref="' || groupName || '" and @maxOccurs="unbounded"]',
                   sequenceModel,
                   NAMESPACES
            into xmlSchema
            from dual;
        end if;
        while xmlschema.existsNode('/xsd:schema//xsd:group[@ref="' || groupName || '"]',NAMESPACES) = 1 loop
          maxOccursValue := xmlSchema.extract('/xsd:schema//xsd:group[@ref="' || groupName || '"]/@maxOccurs').getNumberVal();
          select updateXML
                   sequenceModel,
                  '/xsd:sequence/@maxOccurs',
                   maxOccursValue,
                   NAMESPACES
            into sequenceModel
            from dual;
          select updateXML
                   xmlSchema,
                   '/xsd:schema//xsd:group[@ref="' || groupName || '" and @maxOccurs="' || maxOccursValue || '"]',
                   sequenceModel,
                   NAMESPACES
            into xmlSchema
            from dual;
        end loop;
      end if;
    end;
    --

  • GET XML NODE NAME FOR LOOPING

    Hi,
    i hv a procedure to get the xml data's(values of the xml) from a clob. in a table.it works fine the parent tags but if the same tag is there for two times then i am not able to loop it because i dont know the tag name for which the loop should be run.
    to be clear.
    <root>
    <tag1>value1
    </tag1>
    <tag1>value2
    </tag1>
    </root>
    i need to run some fns for each node value so i need to loop for each node having same value pls help me to get the node name.

    You can simply alter get xml node name in loop to return a count on just the node you are looking for. Not sure why you need to know the count when you can have the logic iterate through the nodes for you, either as an XMLType or a DOMDocument (see nodelist).

  • Edit XML node using actionscript?

    How would I go about editing an XML node from within
    actionscript?
    I load the XML from a file, and before I pass it to an
    HTTPService I would like to set the field DateTime. The XML file
    that I am using can be seen here:
    XML Document
    When I try doing something like
    myXML.fiAPI.fiHeader.Service.DateTime="time here", it creates a new
    fiAPI node with all new children. However, I wish to edit the
    current DateTime field without creating a new one.
    All help is appreciated.

    Thanks to both of you.
    ctzn99: I tried that as well, after realizing my mistake.
    However, it still does not work. I'm certain I have the path right,
    but nothing is set (or in other cases, returned). Even when I use
    myXML.fiHeader..., It creates a new fiHeader node and the
    corresponding nodes underneath it.
    ntsiii: That's a very complex example, like you said...
    almost overkill for my problem?
    Thanks though!

Maybe you are looking for

  • HFR Issues - "5200: Error executing query: Invalid Item ID"

    Hi All, We are using Hyperion HFM application 11.1.1.3. Recently we have upgraded the Oralce Database to 11.2.0.2 and reconfigured the HFM application with this new database version. When I tried to run the Financial reporting through the HFR studio,

  • Audigy 4 pro probl

    Hi, I am having problems getting dts sound from my audigy 4 pro soundcard. i am using inspire t7900 speakers. when i play a movie in powerdvd i only get 2 front channel working, even though i select dts format. what am i doing wrong? i get the same e

  • How to make database read only?

    Hi All, I have restored my production database to development. I want to make these database available only for reading purpose means nobody can make any changes to that database only thing is that they can see the data. Is there any feature availabl

  • BW Bookmark is not working correctly

    Hi, I have created a bookmark for one of the queries built on infocube. Later, i have done some changes to the queries by adding/removing some info cubes. When i am opening my earlier bookmark, it is not opening the report directly, instead it is sho

  • BAPI_LEAD_CREATEMULTI  .. Partner issue

    Hello, I am using bapi "bapi_lead_createmulti" to create lead documents from a file. The lead is getting created, however the Partner data is not being filled. Really dont understand what values need to passed..       l_partner-REF_GUID       l_partn