Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Error 22 Invalid value 'tpl1' & Error 22 Undefined attribute 'href'

Hi,

I'm trying to reuse a tumbler by defining it in a defs, but it seems that even a simple test is not working. For example:

<svg class="background">

 <use id="container" href="#panoramaview">


  <use id="item1" href="#panoramaview-item">
   <g pointer-events="visible" id="abc">

    <!--something here-->
   </g>

  </use>

 

  <use id="item2" href="#panoramaview-item">
   <g pointer-events="visible" id="xyc">

    <use href = "#tpl1" />
   </g>

  </use>

 

  <use id="pagination-dots" href="#pagination-widget" y="8">
   <use href="#pagination-dot" />
   <use href="#pagination-dot" />
   <use href="#pagination-highlight-dot" />
  </use>

 </use>

 

 <defs>
  <g id = "tpl1">

   <!--something else here-->

  <g/>

 </defs>

 

</svg>

 

I have tried adding the defs inside the id="container" but it didn't worked and also broke the panoramaview structure. Also, I tried using xlink:href, and it removes the invalid value but not the undefined attribute href. I tried the href without # (href = "tpl1"), same problem. Also, I tried using the <use href = "#tpl1" /> outside the container, but it still failing. Any suggestion? Thanks

Best Answer
0 Votes
2 REPLIES 2

Forgot to mention that I also tried using the <use href = "#tpl1" /> in the container but outside id="item2":

...

  <use id="item2" href="#panoramaview-item">
   <g pointer-events="visible" id="xyc">

    <!--something here-->
   </g>

  </use>

 

   <use href = "#tpl1" />

 

  <use id="pagination-dots" href="#pagination-widget" y="8">
   <use href="#pagination-dot" />
   <use href="#pagination-dot" />
   <use href="#pagination-highlight-dot" />
  </use>

 </use>

...

Best Answer
0 Votes

I had typo when writing the post:

 <defs>
  <g id = "tpl1">

   <!--something else here-->

  </g>

 </defs>

 

Fix the </g>. It was correct in the program. Still receiving the same error.

Best Answer
0 Votes