Jump to content
Sign in to follow this  
sacha74

[xslt] Group Tags To Prioritize The Xml File

Recommended Posts

Hello, I have 2 problems with an xml file:1. the original xml has no structure because all the tags (except the root element) are at the same level. What I want to do is to insert a tag <toto>, whose children would be one <FM1Titre> and all the tags that follow it until the next tag <FM1Titre>. 2. I would like to report the content of the tag FM1Titre as the name of the tag that I have mentionned above. Here is a part of the xml file: <XML> <FM1Titre>Description </FM1Titre> <Bloc-paragraphe>La table mère permet de paramétrer les tables. </Bloc-paragraphe> <Bloc-paragraphe>Toute nouvelle table doit être créée en premier lieu dans la table mère.</Bloc-paragraphe> <FM1Titre>Détails techniques </FM1Titre> ...</XML> What I would like to obtain after transformation : <XML> <Description> <FM1Titre>Description </FM1Titre> <Bloc-paragraphe>La table mère permet de paramétrer les tables. </Bloc-paragraphe> <Bloc-paragraphe>Toute nouvelle table doit être créée en premier lieu dans la table mère.</Bloc-paragraphe> </Description> <Détails techniques> <FM1Titre>Détails techniques </FM1Titre> </Détails techniques> ...</XML> My researches have been unsuccessful (research on the net, on proposed solutions on the forum) and I begin to think that it is maybe impossible to do that with XSLT 1.0.I use to find a solution to problem of that kind but this time I do not manage to find an answer by myself, so if anyone could have a solution or a track, please help me...Thanks in advance.

Share this post


Link to post
Share on other sites

I may have mis-understood the question here.

Edited by jlhaslip

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...