You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xerces.apache.org by Sagar Sharma <sa...@ways.com> on 2001/02/04 05:57:57 UTC

RE: reuse same elements

reuse same elements        Hi,

        A solution to it is to use namespaces in youe documents so the ur
elements could be differentiated easily and ur document becomes more
readable by third parties.

Hope this helps.

Sagar
  -----Original Message-----
  From: Sebastien Marechal [mailto:Sebastien.Marechal@JobPartners.Com]
  Sent: Thursday, May 03, 2001 11:06 PM
  To: xerces-dev@xml.apache.org
  Subject: reuse same elements


  Hi all,



  I there a way of reusing same elements containing differents data?
  For example I'm generating an HR-XML document, which reuses many elements
in differents places.

  <!ELEMENT Contact  (PersonName? , PositionTitle? , PostalAddress* ,
(VoiceNumber | FaxNumber | PagerNumber | TTDNumber )* , E-mail* ,
WebSite* )>

  <!ELEMENT Recipient  (PersonName? , AdditionalText* , Organization? )>
  <!ELEMENT PersonName  (FormattedName* , GivenName* , PreferredGivenName? ,
MiddleName? , FamilyName* , Affix* )>



  I'm also want to reuse tags a number of times which is decided at runtime,
so the tag content needs to be dynamic.

          int i=1;
          while(profedu.hasNext()){
                  create element i ??
                  i++;
          }

  Regards,




  ***********************************************************************
  Sébastien Maréchal
  Analyst Programmer
  Job Partners Ltd.
  Mobile: 0044 (0) 775 994 1124
  Sebastien.Marechal@JobPartners.com
  ***********************************************************************