How do I change alphabetical element listing in xml to nested xml using xslt?

Have an 'Bus Card Request' indd form exported to fillable form pdf (reader enabled etc). Have 'Bus Card Template' indd to receive the BC data from the returned filled pdf form.
The tags & structure are identical on both indd docs.
The xml exported from the pdf discards the structure (nesting) and provides all the elements in alphabetical order.
I am a novice learning how to make an xslt that will transform the alphabetical listing back to the nested structure.
I want to turn this:
<?xml version="1.0" encoding="UTF-8"?>
<fields xmlns:xfdf="http://ns.adobe.com/xfdf-transition/">
<Address>1234 Take Wing</Address>
<Cell_Number>619.321.6878</Cell_Number>
<City>San Diego</City>
<Clin_Sup_Lic_Number>SL00267</Clin_Sup_Lic_Number>
<Clinical_Supervisor_Name>Jarmal Hincks</Clinical_Supervisor_Name>
<ComboBox2 xfdf:original="Combo Box 2">sdyouthservices.org</ComboBox2>
<Date_Signed_Loc_Dir>9/29/2014a</Date_Signed_Loc_Dir>
<Date_Signed_Orig>9/29/2014</Date_Signed_Orig>
<Degree>MA</Degree>
<Email_Address>s.reeves</Email_Address>
<Extension>1234</Extension>
<Fax_Number>619.123.9876</Fax_Number>
<Intern_Number>XX20</Intern_Number>
<License_Number>YY20</License_Number>
<Location>Point Loma Campus</Location>
<Name>Steve Reeves</Name>
<Notes_and_Comments>Make it a super duper bus card</Notes_and_Comments>
<Program>Learning Curve</Program>
<State>CA</State>
<Telephone_Number>619.123.4567</Telephone_Number>
<TextField27 xfdf:original="Text Field 27">www.sdyouthservices.org</TextField27>
<Title>Superman</Title>
<Zip>99999</Zip>
</fields>
into this:
<BC_Order>
<Group_Name>
   <Name></Name>
   <Degree></Degree>
   
<Title></Title>
   <Intern_Number></Intern_Number>
   <License_Number></License_Number>
</Group_Name>
<Group_Location>
   <Location></Location>
  
<Program></Program>
  
<Address></Address>

  <City></City>
  <State></State>
  <Zip></Zip>
</Group_Location>
<Group_Phone>
  <Telephone_Number></Telephone_Number>
  <Extension></Extension>

  <Fax_Number></Fax_Number>
  <Cell_Number></Cell_Number>
</Group_Phone>
<Group_Email-WS>
  <Email_Address></Email_Address>
  <eMail_Host></eMail_Host>

  <Website></Website>

  <Clinical_Supervisor_Name></Clinical_Supervisor_Name>
  <Clin_Sup_Lic_Number></Clin_Sup_Lic_Number>
</Group_Email-WS>
</BC_Order>
Is this xslt code on the right track?
(i've left out the usual header stuff)
<BC_Order>
<Group_Name>
<Name><xsl:value-of select="Name"/></Name>
<Degree><xsl:value-of select="Degree"/></Degree>
<Title><xsl:value-of select="Title"/></Title>
<Intern_Number><xsl:value-of select="Intern_Number"/></Intern_Number>
<License_Number><xsl:value-of select="License_Number"/></License_Number>
</Group_Name>
</BC_Order>
I'm just trying to figure out what the words are to make nesting occur in the resultant xml so it will match the nesting order in the Bus Card input template.
Thanks!
Paul

Hi Paul,
Is this xslt code on the right track?
Yes, no...
The root element in the XML from the form is "fields" without the quote marks. So the XSL needs the full path to the elements to include the "fields" root element. The select would therefore be "<xsl:value-of select="fields/Name" />"
Note that because I like seeing the XML with line breaks, the "<xsl:text>&#xA;</xsl:text>" precedes each line. Without that, one gets a long string. But it isn't really needed and there are other means of accomplishing it.
I think the below will do what you need.
Take care, Mike
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:text>&#xA;</xsl:text><BC_Order>
<xsl:text>&#xA;</xsl:text><Group_Name>
<xsl:text>&#xA;</xsl:text><Name><xsl:value-of select="fields/Name" /></Name>
<xsl:text>&#xA;</xsl:text><Degree><xsl:value-of select="fields/Degree" /></Degree>
<xsl:text>&#xA;</xsl:text><Title><xsl:value-of select="fields/Title" /></Title>
<xsl:text>&#xA;</xsl:text><Intern_Number><xsl:value-of select="fields/Intern_Number" /></Intern_Number>
<xsl:text>&#xA;</xsl:text><License_Number><xsl:value-of select="fields/License_Number" /></License_Number>
<xsl:text>&#xA;</xsl:text></Group_Name>
<xsl:text>&#xA;</xsl:text><Group_Location>
<xsl:text>&#xA;</xsl:text><Location><xsl:value-of select="fields/Location" /></Location>
<xsl:text>&#xA;</xsl:text><Program><xsl:value-of select="fields/Program" /></Program>
<xsl:text>&#xA;</xsl:text><Address><xsl:value-of select="fields/Address" /></Address>
<xsl:text>&#xA;</xsl:text><City><xsl:value-of select="fields/City" /></City>
<xsl:text>&#xA;</xsl:text><State><xsl:value-of select="fields/State" /></State>
<xsl:text>&#xA;</xsl:text><Zip><xsl:value-of select="fields/Zip" /></Zip>
<xsl:text>&#xA;</xsl:text></Group_Location>
<xsl:text>&#xA;</xsl:text><Group_Phone>
<xsl:text>&#xA;</xsl:text><Telephone_Number><xsl:value-of select="fields/Telephone_Number" /></Telephone_Number>
<xsl:text>&#xA;</xsl:text><Extension><xsl:value-of select="fields/Extension" /></Extension>
<xsl:text>&#xA;</xsl:text><Fax_Number><xsl:value-of select="fields/Fax_Number" /></Fax_Number>
<xsl:text>&#xA;</xsl:text><Cell_Number><xsl:value-of select="fields/Cell_Number" /></Cell_Number>
<xsl:text>&#xA;</xsl:text></Group_Phone>
<xsl:text>&#xA;</xsl:text><Group_Email-WS>
<xsl:text>&#xA;</xsl:text><Email_Address><xsl:value-of select="fields/Email_Address" /></Email_Address>
<xsl:text>&#xA;</xsl:text><eMail_Host><xsl:value-of select="fields/ComboBox2" /></eMail_Host>
<xsl:text>&#xA;</xsl:text><Website><xsl:value-of select="fields/TextField27" /></Website>
<xsl:text>&#xA;</xsl:text><Clinical_Supervisor_Name><xsl:value-of select="fields/Clinical_Supervisor_Name" /></Clinical_Supervisor_Name>
<xsl:text>&#xA;</xsl:text><Clin_Sup_Lic_Number><xsl:value-of select="fields/Clin_Sup_Lic_Number" /></Clin_Sup_Lic_Number>
<xsl:text>&#xA;</xsl:text></Group_Email-WS>
<xsl:text>&#xA;</xsl:text></BC_Order>
</xsl:template>
</xsl:stylesheet>

Similar Messages

  • HT1349 how can I change an email for authorization, the email address we used years back, is no longer a valid email address

    how can I change an email for authorization, the email address we used years back, is no longer a valid email address

    SfromW wrote: ... how can I change an email for authorization, the email address we used years back, is no longer a valid email address
    How to change account here: http://support.apple.com/kb/PH1641
    If you need more help, start here: http://www.apple.com/support/itunes/
    SfromW wrote: ... we can't remember the password from the old email address (for authorization)...
    Help Retrieving and changing passwords here: http://support.apple.com/kb/HT1911
    If you need more help, from iTunes for Windows, click  iTunes > iTunes Store > Support
    SfromW wrote: ... apple should make it easier to transfer authorization authority....I would think anyways.
    You might want to rethink your thoughts about making transferring authority easier.  Making it too easy would certainly degrade your account's security.  If you still believe it should be easier, you can send feedback directly to Apple via http://www.apple.com/feedback/itunesapp.html
    You will not get a response, but you can be certain that the responsible Apple people will see your input for consideration in FaceTime product development.
    As a new user, please understand that you are NOT directly addressing Apple here.  For more info about Apple discussions, start here: http://discussions.apple.com/static/apple/tutorial/etiquette.html 
    Message was edited by: EZ Jim
    Mac OSX 10.7.4

  • I  have just brought a preowned iPad mini which had the prev persons apple Id details still in,  I have my own I'd from my iPad I want to use. how do I change the prev persons details to enable me to use my details

    I  have just brought a preowned iPad mini which had the prev persons apple Id details still in,  I have my own I'd from my iPad I want to use. how do I change the prev persons details to enable me to use my details

    You should configure the ipad to factory settings and set up as 'new'
    settings/general/reset/erase all content and settings

  • How can you change data on a SQL 2012 application database that uses availability groups from BizTalk server?

    If you use the WCF-SQL adapter it is recommend that you set UseAmbientTransaction to true if you are changing data. I think this requires MSDTC to be enabled on the SQL server that you are changing the data on. (http://msdn.microsoft.com/en-us/library/dd787981.aspx)
    I think that Availability groups does not support MSDTC. (http://msdn.microsoft.com/en-us/library/ms366279.aspx).
    How can you change data on a SQL 2012 application database that uses availability groups from BizTalk server?

    Hi,
    Yes, Availability groups doesn't support MSDTC. Please refer to the similar discusison which maybe helpfull:
    http://dba.stackexchange.com/questions/47108/alwayson-ag-dtc-with-failover
    http://stackoverflow.com/questions/17179221/msdtc-in-always-on-availability-groups

  • How do I change template designs once a form has been created using another template design?

    How do I change template designs once a form has been created using another template design?

    I talked to a service Representative and he told me there isn't a function to change a form using one template to a different template. For example, I used template for "Accommodation registration" and wanted to change it to "admissions application." I was hoping I could just select a "Change template" rather than having to copy/paste everything to the new template. But that's what i had to do. Maybe the next version of this software will make it easier to change design templates.

  • How can i Change the Size of the selected text in JTextPane using ConboBox

    plzz help...
    How can i Change the Size of the selected text in JTextPane using ConboBox ???
    i m using if(cb.getSelectedItem=="small")
    cb.setAction(new StyledEditorKit.FontSizeAction("double click", 12);)
    if(cb.getSelectedItem=="medium")
    cb.setAction(new StyledEditorKit.FontSizeAction("double click", 14);)
    if(cb.getSelectedItem=="large")
    cb.setAction(new StyledEditorKit.FontSizeAction("double click", 16);)
    this code is not working properly according to the action i set on comboBox.
    when i select medium the previously set action on comboBox works like small action work.
    when i select large the medium action starts .
    means its not working in correct time when i select item of combox n action of that item is not working at that time..
    plzz plzz help me:(

    Action action1 = new StyledEditorKit.FontSizeAction(
    "double click", 12);
    Action action2 = new StyledEditorKit.FontSizeAction(
    "double click", 14);
    Action action3 = new StyledEditorKit.FontSizeAction(
    "double click", 18);
    s2 = (String) cb7.getSelectedItem();
    if (s2.equals("Small")) {
    cb7.setAction(action1);
    e1.setSource(cb7);
    } else
    if (s2.equals("Medium")) {
    cb7.setAction(action2);
    e1.setSource(cb7);
    } else if (s2.equals("Large")) {
    cb7.setAction(action3);
    // e1.setSource(cb7);
    when i chooze any combobox item then according to that item i set the Action on ComboBox but that action is not working properly on the selected text in the JTextPane..means selected text in JText Pane is not changes its Size according to the comboBox selected ITEM.
    PLZ plzzzzzzzzzz help me:((.i will be thankfull to u.

  • How do I change the sound that is played when you iI use the Find my IPhone feature to make it alot louder?  The current sound is very faint, difficult to find as I am hard of hearing.

    How do I change the sound that is played when you I use the Find my IPhone feature to make it alot louder?  The current sound is very faint, difficult to find as I am hard of hearing.

    Hi,
    Tap the iPod icon in the Dock. Then tap the Airplay icon just to the right of the volume slider.
    Make sure the iPad speakers are selected, not your wireless.
    Carolyn 

  • How do I change my mouse cursor back to an arrow? Using Safari, it suddenly changed to a crosshairs icon. Help pls!

    how do I change my mouse cursor back to an arrow? Using Safari, it suddenly changed to a crosshairs icon. Help pls!

    I have this question too but I found the answer at another thread. It is due to Adobe PDF plug-ins. In case you haven't seen it, the link is as follows:
    https://discussions.apple.com/message/21976207#21976207
    All the best.

  • How do I change my Discussions List Alias

    Cannot seem to change my discussion lists Alias.
    Went to "My Setting" and also to "My Public Profile" and did not see a place to edit and change my alias.
    Any help would be appreciated.

    Hi Jack!
    "Will have to decide to change my account..."
    Here is some additional info.
    As you have discerned, the Alias of the account you are using, cannot be changed, but you can create a new Discussions Account, with an Alias that you prefer.
    You cannot delete your present account. Just stop using it, after you have created a new one.
    You can use all of the same info in the new account, Email address, User name, etc, just be sure to insert a new Alias of your choosing.
    But your Level2#), Points(425), Total Posts(804), Total Posts Online(605) and Registered Date(7/6/02), will not be transferred.
    In the new account, your Post Counts, Points, & Level Status will all start at 0. Your Registered Date will be the date you create the new account.
    Your old account, with your previous counts & level, will still be viewable, under the old Alias.
    After you quit using the old account, those posts, will be archived. What that means is, that if there are no additional responses in the Threads they reside in, the Topics will get continually pushed down on the Topics list. After a certain amount of time, maybe 2 to 6 months, the Threads will be locked, so no responses can be entered. But the Threads will not disappear.
    Threads in heavily trafficked Forums, may be archived more rapidly than those in areas, with less activity.
    The Topics that you started using the old account, will show your Old Alias, in the Author field of a main forum page, but eventually, readers will have to keep going to the succeeding pages to view them.
    If someone were to do a Discussions Search, using these parameters:
    Restrict by Category or Forum: All Categories
    Restrict by Date Range: All
    Restrict by Username: Your Old Alias
    all of your posts, created since about 11/13/05, would be found.
    To create a new account,
    Log out of Discussions. Delete the Apple Cookies in your browser preferences. Then follow either of these instructions.
    -How Do I Create My Account?
    If you haven't signed up for an Apple ID for the Apple Store or AppleCare Support website (or forgot your old one), you can create a new account on the My Info webpage. Just click the "create one" link on the right side of the My Info page. Choose your country location and preferred language from the appropriate pop-up menus, then click Create Account. In the resulting page, enter a unique name (such as your email address) in the Apple ID field and fill in your other relevant information accordingly (fields marked with * are required). Click Continue to complete the process.
    -To register, click Login in the sidebar on the right side of the Discussions page. In the resulting page, click the "create one" link at the bottom of the page, then click "create one" in the subsequent page and follow the instructions to create an Apple ID. For more information, see the Apple ID FAQ page.
    ali b

  • HT3069 How can I change the content list when I change residence country?

    I bought an Apple TV in Mexico but came to came to the US to work on a project, so I brought my Apple TV with me. I already changed the credit card to an American one and all the country settings, but it still displays the Mexican list. How can I change the movie content?

    Purchases will be tied to the original account. Your US account will not have access.
    If your Apple TV is not displaying US content make sure the Apple TV location settings are correct. DNS should be on automatic.

  • HT4865 How can I change the incorrectly listed cellular number for SMS code

    I listed my iPad cellular number incorrectly to receive an SMS code which musted be listed to progress further. So I cannot retreive the four digit number
    which was sent to the incorrect number. How can I change it to the correct cellular number?

    From http://support.apple.com/kb/TS4644:
    Devices using iOS 7.0.3 or later: Tap Settings > iCloud > Account, then tap Keychain. Check that the phone number listed under Verification Number is correct. If not, enter another phone number.
    Macs using OS X Mavericks v10.9 or later: Choose Apple () menu > System Preferences. Click iCloud, then click Account Details. Check that the phone number listed under Verification number is correct. If not, enter another phone number.

  • How do I change my apple id when my email that I use with apple has been closed?

    How do I change my apple id when the email I use for apple has been deleted

    Read here:
    http://support.apple.com/kb/HT5621

  • How do I change the song order of a playlist.  I used to be able to click and drag to a new order.

    How do I change the order of songs in a playlist.  I used to be able to click and drag to the new location, but can't now.

    Ricardo, It changed in iTunes 11. 
    With the playlist open, click on the View menu, View Options, and then set the "Sort By" field to "Manual Order."  Then you can drag songs up or down.
    If you don't see the View menu, you may have your Menu bar hidden.  In that case, unhide it first, by using CTRL-B.

  • How to I change an email back to one that was previously used.

    I had an iTunes account that was hacked several years ago. How do I change my iTunes ID back to that email since that is my primary email and I just got an iPhone?

    Just make her a new AppleID - https://appleid.apple.com
    On her device, log out of iMessage with your AppleID, then log back in with her new AppleID.  For iCloud, first go into the iCloud account settings and disable find my iPhone, then delete the iCloud account.  Now add a new iCloud account using her new AppleID.
    You both can continue to use the same AppleID in the iTunes and App stores if you wish to share purchases.  If not, just scroll to the bottom of the feature page in the store, log out with your AppleID and log back in with her AppleID (she will need your AppleID and password to update anything purchased with your AppleID though).

  • HT4589 How do I change the audio to dual mono from stereo when using Share to DVD in Final Cut 10.1?

    How do I switch the audio to Dual Mono from Stereo when using Share in Final Cut Pro 10.1? Even though the audio is all in dual mono in the timeline, it lists it as stereo in the share box.

    Hi rationale1,
    Welcome to the Support Communities!
    The share to DVD settings in Final Cut Pro X use the Dolby Digital settings which are stereo for DVDs. So this can’t be done directly in Final Cut Pro X.
    The link below will explain the Dolby Digital parameters and options in Compressor 4.   You may need to research a different DVD authoring software to achieve your desired result.
    Dolby Digital - Compressor 4 User Manual
    http://help.apple.com/compressor/mac/4.1/#cpsrb71736a2
    Dolby Digital
    The built-in Dolby Digital settings (in the Create Blu-ray and Create DVD destinations, as well as the built-in AC-3 and EC-3 audio settings) use the Dolby Digital transcoding format. This format encodes Dolby Digital (AC-3) and Dolby Digital Plus (EC-3) audio files that contain multiple audio channels, including 5.1 surround sound. You can also create custom settings that use the Dolby Digital transcoding format. 
    Note:  All files intended for video and audio DVD authoring must have a 48 kHz sample rate as required by the DVD specification.
    DVD Video: Choose this option if you’re encoding for use in a DVD video authoring application.
    DVD Audio: Choose this option if you’re encoding for use in a DVD audio authoring application.
    Tip:  For stereo encoding, rates of 192 kbps and 224 kbps are typical and will produce good results. For Dolby Digital 5.1 encoding, a rate of 384 kbps is recommended. For 5.1 Dolby Digital Plus encoding, a rate of 192 kbps is recommended.
    Cheers,
    Judy

Maybe you are looking for

  • Trying to network HP Envy 4500 all in one with OSX 10.9.4

    First time installation of HP Envy 4500 all in one was going well on Mac with OSX 10.9.4.  However I can only get the printer to work with cable. HP instructions were to re-insert CD and follow instructions for 'reconfiguring without cable' however t

  • Great plug-ins coming out, but.....

    so now we get all these great new plug-ins coming out....all say they are "not destructive" but they don't work on raw files, they just make a new psd file with the setting applied (which by the way cannot be edited at that point)...i guess it is not

  • Chaning business area in asset master

    Hi gurus, Can we change business area in asset master? is there any customizing or transaction?

  • XI Template for Integration Testing

    Hi All, Can you please provide me Integration Testing templates for Testing XI scenarios? These have to be provided to the Functional team for testing. regards, Piyush

  • Mack G4 start up with just showing a folder with a ? mark and will not start

    HI I have a G4 Mac and have it for 2 weeks and I was updating software and it froze and on restart it just shows a folder with a ? mark what can I do I tried using the Control key + P+S or what ever and it did nothing. Please help so I don't go back